jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpmihai <dpmi...@yahoo.com>
Subject Is it possible to change the property of a version node from versionStorage?
Date Fri, 02 Mar 2012 14:13:09 GMT
I have some xml files kept inside jcr which also have versions.

I want to update my xml data with other xml (obtained with xslt from the
older one) on all my nodes. I can do this for all nodes in my repository,
except the versions nodes. 

I get all my version nodes with an xpath like :

/jcr:root/jcr:system/jcr:versionStorage//*[@className='....' and
@type='...']//*[fn:name()='jcr:content' and @jcr:mimeType='text/xml']

I get my xml content property:

node.getProperty("jcr:data")

I convert this xml to the new xml format with an xslt transformation.

Then I want to  save the new content:

node.setProperty ("jcr:data", binaryValue); 

An exception is raised:

ConstraintViolationException: Unable to perform operation. Node is protected

Is this because version nodes are read only? Is it possible to change the
property of a version node?

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Is-it-possible-to-change-the-property-of-a-version-node-from-versionStorage-tp4438579p4438579.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message