cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply versioning on metadata ?

power
Champ in-the-making
Champ in-the-making
Hi,

We have version control out of box in alfresco or once we apply rule for versioning aspect it will version the content.
I am using alfresco 2.2.2(sp2).  but I want to versioning my metadata. Even though versionable aspect is applied I am not able to get the version for that.
Is there any way I can version metadata in DM not WCM ??


Thanks,
3 REPLIES 3

derek
Star Contributor
Star Contributor
Hi,
The WCM persistence layer (AVM) is completely different and from DM.  If you have the versionable aspect applied in DM, then versioning should be applied.

Are you saying that you update the metadata on a DM node but the node is not versioned?

Regards

power
Champ in-the-making
Champ in-the-making
yes derek,

I am not able to versioning my node if I change any metadata content in my file.
not file content but file metadata. ( its 0byte content file)

any clue ?\
let me know if you still not get, since I am using alfresco 2.2.2  DM.

derek
Star Contributor
Star Contributor
Hi,
The VersionableAspect class uses the onContentUpdate policy.  The latter will never fire if you don't have content; it only fires when the content changes.
If you want to version nodes that don't have content, the best is to write your own VersionableAspect handler and register it to listen to onUpdateProperties or onUpdateNode (methods defined on NodeServicePolicies interface).  You can look at the RoutingContentService which translates the onUpdateProperties into onUpdateContent.
Regards