Class NodeRef
- java.lang.Object
-
- org.alfresco.service.cmr.repository.NodeRef
-
- All Implemented Interfaces:
Serializable
,EntityRef
@AlfrescoPublicApi public final class NodeRef extends Object implements EntityRef, Serializable
Reference to a node- Author:
- Derek Hulley
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeRef.Status
Helper class to convey the status of a node.
-
Constructor Summary
Constructors Constructor Description NodeRef(String nodeRef)
Construct a Node Reference from a string representation of a Node Reference.NodeRef(String protocol, String identifier, String id)
NodeRef(StoreRef storeRef, String id)
Construct a Node Reference from a Store Reference and Node Id
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Override equals for this ref typeString
getId()
static List<NodeRef>
getNodeRefs(String values)
static List<NodeRef>
getNodeRefs(String values, org.apache.commons.logging.Log logger)
StoreRef
getStoreRef()
int
hashCode()
Hashes on ID alone.static boolean
isNodeRef(String nodeRef)
Determine if passed string conforms to the pattern of a node referenceString
toString()
-
-
-
Constructor Detail
-
NodeRef
public NodeRef(StoreRef storeRef, String id)
Construct a Node Reference from a Store Reference and Node Id- Parameters:
storeRef
- store referenceid
- the manually assigned identifier of the node
-
NodeRef
public NodeRef(String nodeRef)
Construct a Node Reference from a string representation of a Node Reference.The string representation of a Node Reference is as follows:
/ - Parameters:
nodeRef
- the string representation of a node ref
-
-
Method Detail
-
equals
public boolean equals(Object obj)
Override equals for this ref type- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Hashes on ID alone. As the number of copies of a particular node will be minimal, this is acceptable
-
getStoreRef
public final StoreRef getStoreRef()
- Returns:
- The StoreRef part of this reference
-
getId
public final String getId()
- Returns:
- The Node Id part of this reference
-
isNodeRef
public static boolean isNodeRef(String nodeRef)
Determine if passed string conforms to the pattern of a node reference- Parameters:
nodeRef
- the node reference as a string- Returns:
- true => it matches the pattern of a node reference
-
-