Search in sources :

Example 31 with NodeState

use of org.apache.jackrabbit.jcr2spi.state.NodeState in project jackrabbit by apache.

the class VersionManagerImpl method getVersionableNodeEntry.

public NodeEntry getVersionableNodeEntry(NodeState versionState) throws RepositoryException {
    NodeState ns = versionState.getChildNodeState(NameConstants.JCR_FROZENNODE, Path.INDEX_DEFAULT);
    PropertyState ps = ns.getPropertyState(NameConstants.JCR_FROZENUUID);
    String uniqueID = ps.getValue().getString();
    NodeId versionableId = workspaceManager.getIdFactory().createNodeId(uniqueID);
    return workspaceManager.getHierarchyManager().getNodeEntry(versionableId);
}
Also used : NodeState(org.apache.jackrabbit.jcr2spi.state.NodeState) NodeId(org.apache.jackrabbit.spi.NodeId) PropertyState(org.apache.jackrabbit.jcr2spi.state.PropertyState)

Aggregations

NodeState (org.apache.jackrabbit.jcr2spi.state.NodeState)31 Name (org.apache.jackrabbit.spi.Name)8 ItemNotFoundException (javax.jcr.ItemNotFoundException)5 RepositoryException (javax.jcr.RepositoryException)5 PropertyState (org.apache.jackrabbit.jcr2spi.state.PropertyState)5 Path (org.apache.jackrabbit.spi.Path)5 NodeEntry (org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry)4 ItemExistsException (javax.jcr.ItemExistsException)3 Operation (org.apache.jackrabbit.jcr2spi.operation.Operation)3 NodeId (org.apache.jackrabbit.spi.NodeId)3 Item (javax.jcr.Item)2 ConstraintViolationException (javax.jcr.nodetype.ConstraintViolationException)2 AccessControlException (javax.jcr.security.AccessControlException)2 Privilege (javax.jcr.security.Privilege)2 Version (javax.jcr.version.Version)2 VersionException (javax.jcr.version.VersionException)2 AddNode (org.apache.jackrabbit.jcr2spi.operation.AddNode)2 QNodeDefinition (org.apache.jackrabbit.spi.QNodeDefinition)2 QValue (org.apache.jackrabbit.spi.QValue)2 ArrayList (java.util.ArrayList)1