Package org.apache.jackrabbit.spi
Interface IdFactory
- All Known Implementing Classes:
AbstractIdFactory,IdFactoryImpl,IdFactoryLogger
public interface IdFactory
IdFactory defines methods to construct new ItemIds.
This factory is intended to build ItemIds from the parameters
passed to the various create methods and should not make an attempt to
apply additional logic such as e.g. roundtrips to the server or resolution of
Paths. Similarly the SPI implementation namely the
RepositoryService must be able to deal with the various formats of
an ItemId, since a caller may not (yet) be aware of the uniqueID
part of an ItemId.-
Method Summary
Modifier and TypeMethodDescriptioncreateNodeId(String uniqueID) Creates a newNodeIdfrom the given unique id.createNodeId(String uniqueID, Path path) Creates a newNodeIdfrom the given unique id (which identifies an ancestorNode) and the givenPathobject.createNodeId(NodeId parentId, Path path) Creates a newNodeIdfrom the given parent id and the givenPathobject.createPropertyId(NodeId parentId, Name propertyName) Creates a newPropertyIdfrom the given parent id and property name.fromJcrIdentifier(String jcrIdentifier) Create a newNodeIdfrom the given JCR string representation.toJcrIdentifier(NodeId nodeId) Returns the JCR string representation of the givennodeId.
-
Method Details
-
createPropertyId
Creates a newPropertyIdfrom the given parent id and property name.- Parameters:
parentId-propertyName-- Returns:
- a new
PropertyId.
-
createNodeId
Creates a newNodeIdfrom the given parent id and the givenPathobject.- Parameters:
parentId-path-- Returns:
- a new
NodeId.
-
createNodeId
Creates a newNodeIdfrom the given unique id (which identifies an ancestorNode) and the givenPathobject.- Parameters:
uniqueID-path-- Returns:
- a new
NodeId. - See Also:
-
createNodeId
Creates a newNodeIdfrom the given unique id.- Parameters:
uniqueID-- Returns:
- a new
NodeId. - See Also:
-
toJcrIdentifier
Returns the JCR string representation of the givennodeId.- Returns:
- a JCR node identifier string.
- See Also:
-
fromJcrIdentifier
Create a newNodeIdfrom the given JCR string representation.- Parameters:
jcrIdentifier-- Returns:
- a new
NodeId. - See Also:
-