org.alfresco.web.bean.repository
Class Node

java.lang.Object
  extended by org.alfresco.web.bean.repository.Node
All Implemented Interfaces:
java.io.Serializable, org.alfresco.service.namespace.NamespacePrefixResolverProvider
Direct Known Subclasses:
AVMNode, MapNode, TransientNode

public class Node
extends java.lang.Object
implements java.io.Serializable, org.alfresco.service.namespace.NamespacePrefixResolverProvider

Lighweight client side representation of a node held in the repository.

See Also:
Serialized Form

Field Summary
protected  java.util.Set aspects
           
protected  QNameNodeMap associations
           
protected  boolean assocsRetrieved
           
protected  QNameNodeMap childAssociations
           
protected  boolean childAssocsRetrieved
           
protected  java.lang.String id
           
protected  java.lang.Boolean locked
           
protected  java.lang.String name
           
protected  org.alfresco.service.cmr.repository.NodeRef nodeRef
           
protected  org.alfresco.service.cmr.repository.Path path
           
protected  java.util.Map permissions
           
protected  QNameNodeMap properties
           
protected  boolean propsRetrieved
           
protected  org.alfresco.service.ServiceRegistry services
           
protected  org.alfresco.service.namespace.QName type
           
protected  java.lang.Boolean workingCopyOwner
           
 
Constructor Summary
Node(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Constructor
 
Method Summary
 void addPropertyResolver(java.lang.String name, NodePropertyResolver resolver)
          Register a property resolver for the named property.
 boolean containsPropertyResolver(java.lang.String name)
          Returns if a property resolver with a specific name has been applied to the Node
 java.util.Map getAddedAssociations()
          Returns all the associations added to this node in this UI session
 java.util.Map getAddedChildAssociations()
          Returns all the child associations added to this node in this UI session
 java.util.Set getAspects()
           
 java.util.Map getAssociations()
           
 java.util.Map getChildAssociations()
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 org.alfresco.service.namespace.NamespacePrefixResolver getNamespacePrefixResolver()
           
 org.alfresco.service.cmr.repository.Path getNodePath()
           
 org.alfresco.service.cmr.repository.NodeRef getNodeRef()
           
 java.lang.String getNodeRefAsString()
           
 java.lang.String getPath()
           
 java.util.Map getProperties()
           
 java.util.Map getRemovedAssociations()
          Returns all the associations removed from this node is this UI session
 java.util.Map getRemovedChildAssociations()
          Returns all the child associations removed from this node is this UI session
protected  org.alfresco.service.ServiceRegistry getServiceRegistry()
           
 org.alfresco.service.namespace.QName getType()
           
 boolean hasAspect(org.alfresco.service.namespace.QName aspect)
           
 boolean hasPermission(java.lang.String permission)
          Return whether the current user has the specified access permission on this Node
 boolean hasProperty(java.lang.String propertyName)
          Determines whether the given property name is held by this node
 boolean isLocked()
           
 boolean isWorkingCopyOwner()
           
 void reset()
          Resets the state of the node to force re-retrieval of the data
 java.lang.String toString()
          Override Object.toString() to provide useful debug output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nodeRef

protected org.alfresco.service.cmr.repository.NodeRef nodeRef

name

protected java.lang.String name

type

protected org.alfresco.service.namespace.QName type

path

protected org.alfresco.service.cmr.repository.Path path

id

protected java.lang.String id

aspects

protected java.util.Set aspects

permissions

protected java.util.Map permissions

locked

protected java.lang.Boolean locked

workingCopyOwner

protected java.lang.Boolean workingCopyOwner

properties

protected QNameNodeMap properties

propsRetrieved

protected boolean propsRetrieved

services

protected transient org.alfresco.service.ServiceRegistry services

childAssocsRetrieved

protected boolean childAssocsRetrieved

childAssociations

protected QNameNodeMap childAssociations

assocsRetrieved

protected boolean assocsRetrieved

associations

protected QNameNodeMap associations
Constructor Detail

Node

public Node(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Constructor

Parameters:
nodeRef - The NodeRef this Node wrapper represents
Method Detail

getProperties

public java.util.Map getProperties()
Returns:
All the properties known about this node.

getAssociations

public final java.util.Map getAssociations()
Returns:
All the associations this node has as a Map, using the association type as the key

getAddedAssociations

public final java.util.Map getAddedAssociations()
Returns all the associations added to this node in this UI session

Returns:
Map of Maps of AssociationRefs

getRemovedAssociations

public final java.util.Map getRemovedAssociations()
Returns all the associations removed from this node is this UI session

Returns:
Map of Maps of AssociationRefs

getChildAssociations

public final java.util.Map getChildAssociations()
Returns:
All the child associations this node has as a Map, using the association type as the key

getAddedChildAssociations

public final java.util.Map getAddedChildAssociations()
Returns all the child associations added to this node in this UI session

Returns:
Map of Maps of ChildAssociationRefs

getRemovedChildAssociations

public final java.util.Map getRemovedChildAssociations()
Returns all the child associations removed from this node is this UI session

Returns:
Map of Maps of ChildAssociationRefs

addPropertyResolver

public final void addPropertyResolver(java.lang.String name,
                                      NodePropertyResolver resolver)
Register a property resolver for the named property.

Parameters:
name - Name of the property this resolver is for
resolver - Property resolver to register

containsPropertyResolver

public final boolean containsPropertyResolver(java.lang.String name)
Returns if a property resolver with a specific name has been applied to the Node

Parameters:
name - of property resolver to look for
Returns:
true if a resolver with the name is found, false otherwise

hasProperty

public final boolean hasProperty(java.lang.String propertyName)
Determines whether the given property name is held by this node

Parameters:
propertyName - Property to test existence of
Returns:
true if property exists, false otherwise

getNodeRef

public final org.alfresco.service.cmr.repository.NodeRef getNodeRef()
Returns:
Returns the NodeRef this Node object represents

getNodeRefAsString

public final java.lang.String getNodeRefAsString()
Returns:
Returns the string form of the NodeRef this Node represents

getType

public org.alfresco.service.namespace.QName getType()
Returns:
Returns the type.

getName

public java.lang.String getName()
Returns:
The display name for the node

getAspects

public final java.util.Set getAspects()
Returns:
The list of aspects applied to this node

hasAspect

public final boolean hasAspect(org.alfresco.service.namespace.QName aspect)
Parameters:
aspect - The aspect to test for
Returns:
true if the node has the aspect false otherwise

hasPermission

public boolean hasPermission(java.lang.String permission)
Return whether the current user has the specified access permission on this Node

Parameters:
permission - Permission to validate against
Returns:
true if the permission is applied to the node for this user, false otherwise

getId

public final java.lang.String getId()
Returns:
The GUID for the node

getPath

public java.lang.String getPath()
Returns:
The simple display path for the node

getNodePath

public org.alfresco.service.cmr.repository.Path getNodePath()
Returns:
the repo Path to the node

isLocked

public final boolean isLocked()
Returns:
If the node is currently locked

isWorkingCopyOwner

public final boolean isWorkingCopyOwner()
Returns:
whether a the Node is a WorkingCopy owned by the current User

reset

public void reset()
Resets the state of the node to force re-retrieval of the data


toString

public java.lang.String toString()
Override Object.toString() to provide useful debug output

Overrides:
toString in class java.lang.Object

getServiceRegistry

protected org.alfresco.service.ServiceRegistry getServiceRegistry()

getNamespacePrefixResolver

public org.alfresco.service.namespace.NamespacePrefixResolver getNamespacePrefixResolver()
Specified by:
getNamespacePrefixResolver in interface org.alfresco.service.namespace.NamespacePrefixResolverProvider


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.