Package org.apache.jackrabbit.spi
Interface IdFactory
-
- All Known Implementing Classes:
AbstractIdFactory
,IdFactoryImpl
,IdFactoryLogger
public interface IdFactory
IdFactory
defines methods to construct newItemId
s. This factory is intended to buildItemId
s 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 ofPath
s. Similarly the SPI implementation namely theRepositoryService
must be able to deal with the various formats of anItemId
, since a caller may not (yet) be aware of the uniqueID part of an ItemId.
-
-
Method Summary
All Methods Instance Methods Abstract 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.String
toJcrIdentifier(NodeId nodeId)
Returns the JCR string representation of the givennodeId
.
-
-
-
Method Detail
-
createPropertyId
PropertyId createPropertyId(NodeId parentId, Name propertyName)
Creates a newPropertyId
from the given parent id and property name.- Parameters:
parentId
-propertyName
-- Returns:
- a new
PropertyId
.
-
createNodeId
NodeId createNodeId(NodeId parentId, Path path)
Creates a newNodeId
from the given parent id and the givenPath
object.- Parameters:
parentId
-path
-- Returns:
- a new
NodeId
.
-
createNodeId
NodeId createNodeId(String uniqueID, Path path)
Creates a newNodeId
from the given unique id (which identifies an ancestorNode
) and the givenPath
object.- Parameters:
uniqueID
-path
-- Returns:
- a new
NodeId
. - See Also:
ItemId for a description of the uniqueID defined by the SPI item identifiers.
-
createNodeId
NodeId createNodeId(String uniqueID)
Creates a newNodeId
from the given unique id.- Parameters:
uniqueID
-- Returns:
- a new
NodeId
. - See Also:
ItemId for a description of the uniqueID defined by the SPI item identifiers.
-
toJcrIdentifier
String toJcrIdentifier(NodeId nodeId)
Returns the JCR string representation of the givennodeId
.- Returns:
- a JCR node identifier string.
- See Also:
fromJcrIdentifier(String)
-
fromJcrIdentifier
NodeId fromJcrIdentifier(String jcrIdentifier)
Create a newNodeId
from the given JCR string representation.- Parameters:
jcrIdentifier
-- Returns:
- a new
NodeId
. - See Also:
toJcrIdentifier(NodeId)
-
-