copying properties node with the new version
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2013 11:49 PM
I have two node, old and new version. I want to copy the properties from the old to the new without damaging the version information.
Now I do so:
as a result I overwrites the properties and version information.
And when you try to create a new version get an error "The current version label of the node does not exist in the version history."
Now I do so:
Map<String, Serializable> properties = new HashMap<String, Serializable>();properties.put(VersionModel.PROP_VERSION_TYPE,VersionType.MAJOR); getServiceRegistry().getVersionService().createVersion(oldTestNodeRef, properties);getServiceRegistry().getNodeService().setProperties(oldTestNodeRef, getServiceRegistry().getNodeService().getProperties(testNodeRef));
as a result I overwrites the properties and version information.
And when you try to create a new version get an error "The current version label of the node does not exist in the version history."
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2013 01:49 AM
I do not understand your requirement.
When you create new version the only property which you have modified get changed in new version.
Rest of them are already there in new version.
Why you trying to do this?
When you create new version the only property which you have modified get changed in new version.
Rest of them are already there in new version.
Why you trying to do this?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2013 02:11 AM
I copy node(test) in the new folder then am submitting changes, after the changes I need to make it a new version of the source node in the source folder
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2013 02:12 AM
the old version continues to be used as long as there is a development of a new
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2013 06:05 AM
If you simply enable the versioning on any file then also I think you will be able to achieve this.
If versioning is enabled and you try to check in the changes it will always ask for creation of new version you can give new version no and then new file will act base for all futures use.
I do not see anything which you cannot achieve with the out of box features.
If versioning is enabled and you try to check in the changes it will always ask for creation of new version you can give new version no and then new file will act base for all futures use.
I do not see anything which you cannot achieve with the out of box features.