-
1. Re: ModeShape - how to work out the next version name for a versionable node
rhauch Jul 31, 2013 9:23 AM (in response to singhl1)No, there is no public way to predetermine the next version for a versionable node, other than replicating the same logic as described in the JavaDoc for the nextNameForVersionNode method. That method is protected and not available for public use.
I'm curious why you want/need to know ahead of time.
-
2. Re: ModeShape - how to work out the next version name for a versionable node
singhl1 Jul 31, 2013 9:26 AM (in response to rhauch)I have been asked to display the version number that a node will be when it is edited and checked in....
-
3. Re: ModeShape - how to work out the next version name for a versionable node
rhauch Jul 31, 2013 9:31 AM (in response to singhl1)The name can not for certain be predetermined ahead of time, because between the time that you determine the "next" version number and the time that your client checks in the node, some other client process might check in the same node. Of course, this does depend on how your application(s) are written.
However, at this point, the only way for your application to know this is to use the same logic described in the SystemContent.nextNameForVersionNode. That's quite unappealing if you ask me.