cancel
Showing results for 
Search instead for 
Did you mean: 

Versions not handled by the contentStore selector ?

jservajean
Confirmed Champ
Confirmed Champ
Hi all,

I have set a new store in order to stream some selected content to a specfic hard drive, by means of the contentStoreSelector.
Using the "cm:storeSelector" aspect and "cm:storeName" works really fine for the main document (content is moved to the new drive), but all the older versions of the document (cm:versionnable) remains in the older content store.

Is there a way (by configuration/tweaking) to have the versions moved along with the current version during the operation ?

Thanks
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

the store selector aspect only works on those nodes that have the aspect applied. Every version is a "frozen" node with the metadata/aspects the document had at the point the version was created. If you add the aspect to the document later on, the existing versions will not be modified and thus not have their content moved to the alternative store.

I currently see no way using pure configuration / tweaking to get your requirement to work. But I can think of an implementation option: code a behaviour logic that modifies the "frozen" version nodes (in violation of their "frozen" state) and applies the selector aspect to them as well whenn applied to the actual document. A potential problem here might be that some internals handling the versioning may get in your way and enforce the "frozen" logic for the content move (i.e. throw an exception) even if you can get the aspect applied.

Regards
Axel

I implemented an action executor which deactivates versionnable and auditable aspects. When trying to add the cm:contentSelector aspect to a frozen noderef, the system tells me :

2014-10-31 14:36:21,581  WARN  [com.foo.action.ArchiveNodeActionExecuter] [http-80-12] Impossible d'archiver la version : This operation is not supported by a version store implementation of the node service.


So we have to stick with the fact that old versions (potentially many) cannot be moved to a custom storeSelector, which is a disapointing.

Cheers

jservajean
Confirmed Champ
Confirmed Champ
Ok, Alex, I'll try to update the frozen nodes using the java apis, as the javascript apis won't let me interact with the versionned nodes.
I'll keep you updated if you want.