Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

DAMUtil findExpiringAssets not returning anything

Avatar

Former Community Member

Hi,

I am using the DAMUtil 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

1 Accepted Solution

Avatar

Correct answer by
Level 10

Using jmx find out what query is getting executed. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Using jmx find out what query is getting executed.