Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Updating the "Document Expiration Date" on a document

Avatar

Former Community Member

Hi!

Does anybody know if it is possible to update the "Document Expiration Date" on a document through code?

I have a workflow where i would like to extend the current expiration date on a document based on the License ID.  That is, i do not want to update the policy itself, but only the setting for a single document.

If i understand correctly, this is the "Validity period" setting in the "Edit Policy" page of adminui.

Could anyone tell me if this is possible to achieve in any way?

Regards

Stian

6 Replies

Avatar

Former Community Member

The validity period is a policy level property, meaning that it will affect all documents that have had the policy applied.  There is no way to override this on an indvidual document basis.

One option may be to "switch" the policy used on a particular document with a new policy that has a longer\new validity period.

Regards

Steve

Avatar

Former Community Member

Hi!

Thank you for the tip. That might just work.

Regards

Stian

Avatar

Former Community Member

Hi!

I tried what you said. I have now switched between 2 policies. The policy on the document updates, but the expiration date does not change.

It seems all rules for the new policy are applied to the document, except the new expiration date.

Any ide why this happens? Or how it can be resolved?

Regards

Stian

Avatar

Former Community Member

Stian

I tested this, and it worked for me.  I created 2 policies, the first I set the expiration date to April 30, 2011.  For the second policy I set the expiration date to May 24, 2011.

Steps...

1)  I applied the first policy (Apr 30) to a PDF

2)  I opened it in Acrobat and confirmed the security settings indicated that the expiry date was Apr 30.

3)  I closed the document and Acrobat

4)  I logged into the LiveCycle Admin UI > Rights Management

5)  I switched the policy to the May 24 expiry date policy

6)  I opened it in Acrobat and confirmed the security settings indicated that the expiry date was May 24.

I'm not sure why this didn't work for you.

Regards

Steve

Avatar

Former Community Member

Hi!

Ok, i see the difference. I set the "Document will not be valid after" to 1 day, and not to a given date.

When i see details for the policy it says: "Expires 1 days after the document is published "

So that probably means that even if the policy is switched, it is not considered as beeing published again.

And so i guess i am back at the beginning, having to edit the policy itself and not the document,

which i cannot since it would affect all documents for that policy.

Regards

Stian

Avatar

Former Community Member

Stian

There are full APIs for Rights management.  You could create a new policy (with a new validity period) via the APIs, and then "switch" the policy on the document you wish to affect, to the new policy that was generated automatically via the API.

Regards

Steve