DAMUtil findExpiringAssets not returning anything | Community
Skip to main content
October 16, 2015
Solved

DAMUtil findExpiringAssets not returning anything

  • October 16, 2015
  • 1 reply
  • 633 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

Using jmx find out what query is getting executed. 

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Using jmx find out what query is getting executed.