Class AbstractIdFactory
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.identifier.AbstractIdFactory
-
- All Implemented Interfaces:
IdFactory
- Direct Known Subclasses:
IdFactoryImpl
public abstract class AbstractIdFactory extends Object implements IdFactory
AbstractIdFactory
...
-
-
Constructor Summary
Constructors Constructor Description AbstractIdFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description NodeId
createNodeId(String uniqueID)
Creates a newNodeId
from the given unique id.NodeId
createNodeId(String uniqueID, Path path)
Creates a newNodeId
from the given unique id (which identifies an ancestorNode
) and the givenPath
object.NodeId
createNodeId(NodeId parentId, Path path)
Creates a newNodeId
from the given parent id and the givenPath
object.PropertyId
createPropertyId(NodeId parentId, Name propertyName)
Creates a newPropertyId
from the given parent id and property name.NodeId
fromJcrIdentifier(String jcrIdentifier)
Create a newNodeId
from the given JCR string representation.protected abstract PathFactory
getPathFactory()
Subclassed need to define a PathFactory used to create IDsString
toJcrIdentifier(NodeId nodeId)
Returns the JCR string representation of the givennodeId
.
-
-
-
Method Detail
-
createNodeId
public NodeId createNodeId(NodeId parentId, Path path)
Creates a newNodeId
from the given parent id and the givenPath
object.- Specified by:
createNodeId
in interfaceIdFactory
- Returns:
- a new
NodeId
. - See Also:
IdFactory.createNodeId(NodeId, Path)
-
createNodeId
public NodeId createNodeId(String uniqueID, Path path)
Creates a newNodeId
from the given unique id (which identifies an ancestorNode
) and the givenPath
object.- Specified by:
createNodeId
in interfaceIdFactory
- Returns:
- a new
NodeId
. - See Also:
IdFactory.createNodeId(String, Path)
-
createNodeId
public NodeId createNodeId(String uniqueID)
Creates a newNodeId
from the given unique id.- Specified by:
createNodeId
in interfaceIdFactory
- Returns:
- a new
NodeId
. - See Also:
IdFactory.createNodeId(String)
-
createPropertyId
public PropertyId createPropertyId(NodeId parentId, Name propertyName)
Creates a newPropertyId
from the given parent id and property name.- Specified by:
createPropertyId
in interfaceIdFactory
- Returns:
- a new
PropertyId
. - See Also:
IdFactory.createPropertyId(NodeId,Name)
-
toJcrIdentifier
public String toJcrIdentifier(NodeId nodeId)
Description copied from interface:IdFactory
Returns the JCR string representation of the givennodeId
.- Specified by:
toJcrIdentifier
in interfaceIdFactory
- Returns:
- a JCR node identifier string.
- See Also:
IdFactory.toJcrIdentifier(NodeId)
-
fromJcrIdentifier
public NodeId fromJcrIdentifier(String jcrIdentifier)
Description copied from interface:IdFactory
Create a newNodeId
from the given JCR string representation.- Specified by:
fromJcrIdentifier
in interfaceIdFactory
- Returns:
- a new
NodeId
. - See Also:
IdFactory.fromJcrIdentifier(String)
-
getPathFactory
protected abstract PathFactory getPathFactory()
Subclassed need to define a PathFactory used to create IDs- Returns:
- a implementation of
PathFactory
.
-
-