cancel
Showing results for 
Search instead for 
Did you mean: 

retrieving the modified items from wcm

meetmrharish
Champ on-the-rise
Champ on-the-rise
Hi

I want to retrieve the items from the WCM which are modified within a given time period. But I have not found any method provided in the API javadoc (Alfresco Labs 3). Can anyone suggest a way out!

Thanks in advance

Harish
6 REPLIES 6

mrogers
Star Contributor
Star Contributor
You would typically want to compare items between snapshots rather than time based query.

Could you give a little more information of what you are trying to do.

meetmrharish
Champ on-the-rise
Champ on-the-rise
My task is to periodically update an external database with the metadata of content present in the WCM. So if there are any changes(newly created, modified, deleted) in the repository from the last updated time, the changes must be updated in the database.

I have previously worked with websphere. It is providing a method such as
findContentModifiedBetween(java.util.Date startDate, java.util.Date endDate)    &
findContentModifiedSince(java.util.Date modifiedDate)


I am not able to find such option in Alfresco

meetmrharish
Champ on-the-rise
Champ on-the-rise
Does anyone help me out in resolving the above issue

Regards
Harish

mrogers
Star Contributor
Star Contributor
Your assets have "created" and "modified" properties so you can do a search for the assets by modification date.

Or as I said above you are probably better off comparing snapshots.    And that will give you "deleted" files as well.

meetmrharish
Champ on-the-rise
Champ on-the-rise
Thanks for the reply dude. I guess retrieving all the documents and comparing the modified time with the given value is a bit lengthy. Rather dont we have any query methods for it, provided by Alfresco?

Regards
Harish

mrogers
Star Contributor
Star Contributor
This thread shows the syntax for how to query by date range.

http://forums.alfresco.com/en/viewtopic.php?f=36&t=15029