Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Is there an OOTB Asset Expiration Notification service in AEM/DAM?

Avatar

Level 2

I am working on implementing an asset management system based on the Adobe DAM. I have noticed that there is an Expires field as part of the asset metadata but I can't figure out how this is used. Through some searches in the documentation there was a one sentence reference saying that this is used in the Asset Expiration Notification service. I can't seem to find this service or how to configure it or use it. Does this exist out of the box or does a custom workflow need to be written to take advantage of this field?

Thank you in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

I searched the AEM documentation, this does not look like an OOTB CQ service. However -- you can write a custom service that uses this API:

http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/commons/util/DamUtil.html

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

I searched the AEM documentation, this does not look like an OOTB CQ service. However -- you can write a custom service that uses this API:

http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/commons/util/DamUtil.html

Avatar

Former Community Member

Hi,

I am using the same API and calling the findExpiringAssets function but it is returning nothing. I am storing the result in a list and the size of this list is 0. best guess is that it is not able to compare the 2 dates (lower bound and upper bound). as there is no exception log.

Is there a specific format in which these dates needs to be for a proper comparison? I have checked the value of the property (prism:expirationDate). it is in format 2015-07-01T11:00:00.000+05:30. 

This is ISO8601 standard timeformat. We can format a date in this format using the methods provided in class ISO8601 in org.apache.jackrabbit.util package. but still I am not getting any result. 

 

-List <String> expiringAssets = DamUtil.findExpiringAssets(sess, lb, ub);

--Calendar lb = DateToCalendarLB();
  Calendar ub = DateToCalendarUB();

The method DateToCalendarLB():

Calendar cal=Calendar.getInstance();
        cal.setTime(new Date());
        String dateString = ISO8601.format(cal);
        Calendar cal1 = ISO8601.parse(dateString);
        return cal1;

Still not getting any result on this. ANy pointer would be helpful.

 

Thanks