org.jboss.dna.connector.federation.executor
Class ProjectedGetNodeCommand

java.lang.Object
  extended by org.jboss.dna.connector.federation.executor.ActsOnProjectedPathCommand<GetNodeCommand>
      extended by org.jboss.dna.connector.federation.executor.ProjectedGetNodeCommand
All Implemented Interfaces:
Serializable, Cacheable, ActsOnPath, GetChildrenCommand, GetNodeCommand, GetPropertiesCommand, GraphCommand

public class ProjectedGetNodeCommand
extends ActsOnProjectedPathCommand<GetNodeCommand>
implements GetNodeCommand

Author:
Randall Hauch
See Also:
Serialized Form

Constructor Summary
ProjectedGetNodeCommand(GetNodeCommand delegate, Path projectedPath)
           
 
Method Summary
 void addChild(Path.Segment nameOfChild, Property... identityProperties)
          Add the child to this node.
 CachePolicy getCachePolicy()
          Get the caching policy to be used for this object.
 DateTime getTimeLoaded()
          Get the time that this node data was originally loaded.
 void setCachePolicy(CachePolicy cachePolicy)
          Set the caching policy for this object.
 void setNoChildren()
          Set that this node has no children.
 void setProperty(Property property)
          Set the values for the named property.
 
Methods inherited from class org.jboss.dna.connector.federation.executor.ActsOnProjectedPathCommand
getError, getPath, hasError, hasNoError, isCancelled, setError
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.dna.graph.commands.GraphCommand
getError, hasError, hasNoError, isCancelled, setError
 
Methods inherited from interface org.jboss.dna.graph.commands.ActsOnPath
getPath
 
Methods inherited from interface org.jboss.dna.graph.commands.GraphCommand
getError, hasError, hasNoError, isCancelled, setError
 
Methods inherited from interface org.jboss.dna.graph.commands.ActsOnPath
getPath
 

Constructor Detail

ProjectedGetNodeCommand

public ProjectedGetNodeCommand(GetNodeCommand delegate,
                               Path projectedPath)
Method Detail

addChild

public void addChild(Path.Segment nameOfChild,
                     Property... identityProperties)
Add the child to this node. This method does not affect existing children, so callers of this method should not add a child with the same segment as an existing child (this is not checked by this method).

Specified by:
addChild in interface GetChildrenCommand
Parameters:
nameOfChild - the name of the child; should not be the same as an existing child (not checked)
identityProperties - the property/properties that are considered identity properties (other than the name) for the child
See Also:
GetChildrenCommand.addChild(org.jboss.dna.graph.properties.Path.Segment, org.jboss.dna.graph.properties.Property[])

setNoChildren

public void setNoChildren()
Set that this node has no children. Any existing child references already set on this command will be removed.

Specified by:
setNoChildren in interface GetChildrenCommand
See Also:
GetChildrenCommand.setNoChildren()

getCachePolicy

public CachePolicy getCachePolicy()
Get the caching policy to be used for this object.

Note that the values of the policy are relative to the time the node was loaded, so the same instance can be used for many nodes.

Specified by:
getCachePolicy in interface Cacheable
Returns:
cachePolicy the caching policy, which may not be null
See Also:
Cacheable.getCachePolicy()

getTimeLoaded

public DateTime getTimeLoaded()
Get the time that this node data was originally loaded.

Specified by:
getTimeLoaded in interface Cacheable
Returns:
the system time (in milliseconds) that the node data was loaded
See Also:
Cacheable.getTimeLoaded()

setCachePolicy

public void setCachePolicy(CachePolicy cachePolicy)
Set the caching policy for this object.

Specified by:
setCachePolicy in interface Cacheable
Parameters:
cachePolicy - the caching policy to use for this object
See Also:
Cacheable.setCachePolicy(org.jboss.dna.graph.cache.CachePolicy)

setProperty

public void setProperty(Property property)
Set the values for the named property. Any existing property values, if previously set, will be overwritten. If there are no property vlaues or if all of the property values are null, the property will be removed.

Specified by:
setProperty in interface GetPropertiesCommand
Parameters:
property - the property
See Also:
GetPropertiesCommand.setProperty(org.jboss.dna.graph.properties.Property)


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.