Get Node content modification time
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2013 05:46 AM
Is it possible to get the modification date of one node's content?
I know there is the auditable aspect's proerty cm:modified, but it gets updated even if you edit any of the node's properties.
Do I have to add a custom property to be updated onContentUpdate?
Do I have to modify the auditable behaviour?
I've searched the forum and the issues, but found only topics relatesd to preserve node content creation time and so.
Thank in advance for any answer or hint.
Regards,
Angelo
I know there is the auditable aspect's proerty cm:modified, but it gets updated even if you edit any of the node's properties.
Do I have to add a custom property to be updated onContentUpdate?
Do I have to modify the auditable behaviour?
I've searched the forum and the issues, but found only topics relatesd to preserve node content creation time and so.
Thank in advance for any answer or hint.
Regards,
Angelo
Labels:
- Labels:
-
Archive
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2013 12:21 PM
I think what you are looking for is the date on which the document itself is updated not its metadata is it the case?
Please confirm
Please confirm
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2013 12:45 PM
There are no separate properties for the modification time of properties of type content.
Further thoughts:
a) It would be fairly easy to add a new custom property driven by a policy when content is updated.
Further thoughts:
a) It would be fairly easy to add a new custom property driven by a policy when content is updated.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2013 11:05 PM
Hi,
I think that Alfresco stores the content in the content store depending on the date it was modified.
So you only have to parse the contentUrl metadata property on the node. You can check if this is true on a node browser.
Regards
I think that Alfresco stores the content in the content store depending on the date it was modified.
So you only have to parse the contentUrl metadata property on the node. You can check if this is true on a node browser.
Regards
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2013 06:47 AM
While that may work for some cases the layout of the content store is not intended to be queried like that. Yes the repository is by default laid out in that way in order to assist with incremental back up, however be aware that you can add content on any path so its not guaranteed to work.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2013 06:48 AM
Hi all,
thanks for all your replies.
Yes, I was thinking to the date when the content of the node is actually updated. I think I can add a property to my base class and bind a behaviour to the onContentUpdatePolicy that update this property.
My concern is how to handle all the nodes already there in the repository.
Is it somehow possible to default the property value of my newly added modifcation time property to the value of last cm:modified?
@jspuchau
I need a property to exec lucene queries agaainst. I don't think i can retrieve that information, am I wrong?
Regards
thanks for all your replies.
Yes, I was thinking to the date when the content of the node is actually updated. I think I can add a property to my base class and bind a behaviour to the onContentUpdatePolicy that update this property.
My concern is how to handle all the nodes already there in the repository.
Is it somehow possible to default the property value of my newly added modifcation time property to the value of last cm:modified?
@jspuchau
I need a property to exec lucene queries agaainst. I don't think i can retrieve that information, am I wrong?
Regards
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2013 07:24 AM
Yes you can do it easily.
You can simply create a script which will copy default modified date value to your new property for all the existing contents.
And you can attache that script with rule and apply that rule to folder under which all your contents are lying.
You can simply create a script which will copy default modified date value to your new property for all the existing contents.
And you can attache that script with rule and apply that rule to folder under which all your contents are lying.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2013 10:42 AM
@mitpatoliya: it doesn't work because you can apply a space rule to content that
1) are created or inserted in the folder
2) are udated
3) are moved ore delted
Content already there doesn't get picked by any of these condition
1) are created or inserted in the folder
2) are udated
3) are moved ore delted
Content already there doesn't get picked by any of these condition

