org.alfresco.web.bean.repository
Class TransientNode

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

public class TransientNode
extends Node

Represents a transient node i.e. it is not and will not be present in the repository.

This type of node is typically used to drive the property sheet when data collection is required for a type but the node does not need to be stored in the repository. An example use is the workflow, transient nodes are used to collect workitem metadata.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.alfresco.web.bean.repository.Node
aspects, associations, assocsRetrieved, childAssociations, childAssocsRetrieved, id, locked, name, nodeRef, path, permissions, properties, propsRetrieved, services, type, workingCopyOwner
 
Constructor Summary
TransientNode(org.alfresco.service.namespace.QName type, java.lang.String name, java.util.Map data)
          Constructor.
 
Method Summary
static TransientNode createNew(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.dictionary.TypeDefinition typeDef, java.lang.String name, java.util.Map data)
          Construct a transient node for an item yet to be created in the Repository.
 boolean hasPermission(java.lang.String permission)
          Return whether the current user has the specified access permission on this Node
protected  void initNode(java.util.Map data)
          Initialises the node.
 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 org.alfresco.web.bean.repository.Node
addPropertyResolver, containsPropertyResolver, getAddedAssociations, getAddedChildAssociations, getAspects, getAssociations, getChildAssociations, getId, getName, getNamespacePrefixResolver, getNodePath, getNodeRef, getNodeRefAsString, getPath, getProperties, getRemovedAssociations, getRemovedChildAssociations, getServiceRegistry, getType, hasAspect, hasProperty, isLocked, isWorkingCopyOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransientNode

public TransientNode(org.alfresco.service.namespace.QName type,
                     java.lang.String name,
                     java.util.Map data)
Constructor.

NOTE: The name is NOT automatically added to the map of properties, if you need the name of this node to be in the map then add it to the map passed in to this constructor.

Parameters:
type - The type this node will represent
name - The name of the node
data - The properties and associations this node will have
Method Detail

createNew

public static TransientNode createNew(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                      org.alfresco.service.cmr.dictionary.TypeDefinition typeDef,
                                      java.lang.String name,
                                      java.util.Map data)
Construct a transient node for an item yet to be created in the Repository. This will apply any one-time initialisation required upon creation of the node e.g. assignment of default values.

Parameters:
dictionaryService - dictionary service
typeDef - The type definition this node will represent
name - The name of the node
data - The properties and associations this node will have
Returns:
transient node

initNode

protected void initNode(java.util.Map data)
Initialises the node.

Parameters:
data - The properties and associations to initialise the node with

hasPermission

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

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

reset

public void reset()
Description copied from class: Node
Resets the state of the node to force re-retrieval of the data

Overrides:
reset in class Node

toString

public java.lang.String toString()
Description copied from class: Node
Override Object.toString() to provide useful debug output

Overrides:
toString in class Node


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