Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.service.cmr.repository
Class NodeRef
java.lang.Object
  org.alfresco.service.cmr.repository.NodeRef
All Implemented Interfaces:
EntityRef, Serializable

@org.alfresco.api.AlfrescoPublicApi
public final class NodeRef
extends Object
implements EntityRef, Serializable
Reference to a node
Author:
Derek Hulley
See Also:
Serialized Form

Constructor Summary
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
boolean
equals(Object obj)
          Override equals for this ref type
getId()
static List<NodeRef>
getNodeRefs(String values)
          Converts a String containing a comma-separated list of NodeRef Ids into NodeRefs.
static List<NodeRef>
getNodeRefs(String values, org.apache.commons.logging.Log logger)
          Converts a String containing a comma-separated list of NodeRef Ids into NodeRefs.
getStoreRef()
int
hashCode()
          Hashes on ID alone.
static boolean
isNodeRef(String nodeRef)
          Determine if passed string conforms to the pattern of a node reference
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Constructor Detail
NodeRef
public NodeRef(String protocol,
               String identifier,
               String id)
See Also:
NodeRef(StoreRef, String), StoreRef.StoreRef(String, String)

NodeRef
public NodeRef(StoreRef storeRef,
               String id)
Construct a Node Reference from a Store Reference and Node Id
Parameters:
storeRef - store reference
id - 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
toString
public String toString()
Overrides:
toString in class Object

equals
public boolean equals(Object obj)
Override equals for this ref type
Overrides:
equals in class Object
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
Overrides:
hashCode in class Object

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

getNodeRefs
public static List<NodeRefgetNodeRefs(String values)
Converts a String containing a comma-separated list of NodeRef Ids into NodeRefs.
Parameters:
values - the String of NodeRef ids.
Returns:
A List of NodeRefs.

getNodeRefs
public static List<NodeRefgetNodeRefs(String values,
                                        org.apache.commons.logging.Log logger)
Converts a String containing a comma-separated list of NodeRef Ids into NodeRefs. If a logger is supplied then invalid ids are logged as warnings.
Parameters:
values - the String of NodeRef ids.
logger - Log
Returns:
A List of NodeRefs.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.