org.sakaiproject.component.common.superstructure
Class NodeImpl

java.lang.Object
  extended byorg.sakaiproject.component.common.manager.PersistableImpl
      extended byorg.sakaiproject.component.common.manager.TypeablePersistableImpl
          extended byorg.sakaiproject.component.common.superstructure.NodeImpl
All Implemented Interfaces:
Node, Persistable, Typeable

public class NodeImpl
extends TypeablePersistableImpl
implements Node, Persistable, Typeable

Version:
$Id: NodeImpl.java 632 2005-07-14 21:22:50Z janderse@umich.edu $
Author:
Lance Speelmon

Field Summary
 
Fields inherited from class org.sakaiproject.component.common.manager.TypeablePersistableImpl
type
 
Fields inherited from class org.sakaiproject.component.common.manager.PersistableImpl
createdBy, createdDate, id, lastModifiedBy, lastModifiedDate, uuid, version
 
Constructor Summary
NodeImpl()
           
 
Method Summary
 void addChild(Node childNode)
          A convenience method which simplifies adding a child to a Node.
 boolean equals(Object obj)
           
 Set getChildren()
          Provides direct access to the underlying Collection containing children.
 Integer getDepth()
          Returns the depth of the Node in the tree (0 based).
 String getDescription()
          Typically this value will contain more verbose text than the displayName.
 String getDisplayName()
           
 Node getParent()
           
 String getReferenceUuid()
          This is the pointer back to the referenced object.
 int hashCode()
           
 void removeChild(Node child)
          Removes a child Node from this Node.
 void setChildren(Set children)
           
 void setDepth(Integer depth)
           
 void setDescription(String description)
           
 void setDisplayName(String displayName)
           
 void setParent(Node parent)
           
 void setReferenceUuid(String referenceUuid)
          This is the pointer back to the referenced object.
 String toString()
           
 
Methods inherited from class org.sakaiproject.component.common.manager.TypeablePersistableImpl
getType, setType
 
Methods inherited from class org.sakaiproject.component.common.manager.PersistableImpl
getCreatedBy, getCreatedDate, getId, getLastModifiedBy, getLastModifiedDate, getUuid, getVersion, setCreatedBy, setCreatedDate, setId, setLastModifiedBy, setLastModifiedDate, setUuid, setVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.api.common.manager.Persistable
getCreatedBy, getCreatedDate, getLastModifiedBy, getLastModifiedDate, getUuid
 
Methods inherited from interface org.sakaiproject.api.common.type.Typeable
getType, setType
 

Constructor Detail

NodeImpl

public NodeImpl()
Method Detail

addChild

public void addChild(Node childNode)
Description copied from interface: Node
A convenience method which simplifies adding a child to a Node.

Specified by:
addChild in interface Node
Parameters:
childNode -
See Also:
Node.addChild(org.sakaiproject.api.common.superstructure.Node)

removeChild

public void removeChild(Node child)
Description copied from interface: Node
Removes a child Node from this Node.

Specified by:
removeChild in interface Node
Parameters:
child -
See Also:
Node.removeChild(org.sakaiproject.api.common.superstructure.Node)

getChildren

public Set getChildren()
Description copied from interface: Node
Provides direct access to the underlying Collection containing children. Mutations of this Set will not be persisted unless you save the Node through the Manager.

Specified by:
getChildren in interface Node
Returns:
Returns the children.

setChildren

public void setChildren(Set children)
Parameters:
children - The children to set.

getDescription

public String getDescription()
Description copied from interface: Node
Typically this value will contain more verbose text than the displayName.

Specified by:
getDescription in interface Node
Returns:
Returns the description.

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface Node
Parameters:
description - The description to set.

getParent

public Node getParent()
Specified by:
getParent in interface Node
Returns:
Returns the parent of the Node.
See Also:
org.sakaiproject.service.osid.authorization.Node#getParent()

setParent

public void setParent(Node parent)
Specified by:
setParent in interface Node
See Also:
org.sakaiproject.service.osid.authorization.Node#setParent(org.sakaiproject.service.osid.authorization.Node)

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface Node
Returns:
Returns the displayName.

setDisplayName

public void setDisplayName(String displayName)
Specified by:
setDisplayName in interface Node
Parameters:
displayName - The displayName to set.

getReferenceUuid

public String getReferenceUuid()
Description copied from interface: Node
This is the pointer back to the referenced object.

Specified by:
getReferenceUuid in interface Node
Returns:
See Also:
Node.getReferenceUuid()

setReferenceUuid

public void setReferenceUuid(String referenceUuid)
Description copied from interface: Node
This is the pointer back to the referenced object.

Specified by:
setReferenceUuid in interface Node
Parameters:
referenceUuid -
See Also:
Node.setReferenceUuid(java.lang.String)

equals

public boolean equals(Object obj)
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class TypeablePersistableImpl
See Also:
Object.toString()

getDepth

public Integer getDepth()
Description copied from interface: Node
Returns the depth of the Node in the tree (0 based).

Specified by:
getDepth in interface Node
Returns:
Returns the depth.

setDepth

public void setDepth(Integer depth)
Parameters:
depth - The depth to set.