org.jboss.dna.graph.commands
Interface RecordBranchCommand

All Superinterfaces:
ActsOnPath, GraphCommand
All Known Implementing Classes:
BasicRecordBranchCommand, ProjectedRecordBranchCommand

public interface RecordBranchCommand
extends GraphCommand, ActsOnPath

Command that records the structure of a branch. To process this command, the recipient should walk the branch rooted at ActsOnPath.getPath() and, for each node in the branch, record(Path, Iterable) the node's information. If record(Path, Iterable) returns true, then the children of that node should also be recorded; if false, then the recording the children of that node can be ignored.

Author:
Randall Hauch

Method Summary
 boolean record(Path path, Iterable<Property> properties)
          Sets the properties of the supplied node.
 boolean record(Path path, Iterator<Property> properties)
          Sets the properties of the supplied node.
 boolean record(Path path, Property... properties)
          Sets the properties of the supplied node.
 
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
 

Method Detail

record

boolean record(Path path,
               Iterable<Property> properties)
Sets the properties of the supplied node.

If the supplied path is a relative path, it is assumed to be relative to the branch root. If the supplied path is an absolute path, it must be a decendant of the branch root; if not, this method returns false and ignores the call.

This method should not be called multiple times with the same path. The behavior for such cases is not defined.

Parameters:
path - the path for the node; may not be null
properties - the properties for the node; may be null if there are no properties
Returns:
true if the children of the node should be recorded, or false if this new node is as deep as the recording should go

record

boolean record(Path path,
               Iterator<Property> properties)
Sets the properties of the supplied node.

If the supplied path is a relative path, it is assumed to be relative to the branch root. If the supplied path is an absolute path, it must be a decendant of the branch root; if not, this method returns false and ignores the call.

This method should not be called multiple times with the same path. The behavior for such cases is not defined.

Parameters:
path - the path for the node; may not be null
properties - the properties for the node; may be null if there are no properties
Returns:
true if the children of the node should be recorded, or false if this new node is as deep as the recording should go

record

boolean record(Path path,
               Property... properties)
Sets the properties of the supplied node.

If the supplied path is a relative path, it is assumed to be relative to the branch root. If the supplied path is an absolute path, it must be a decendant of the branch root; if not, this method returns false and ignores the call.

This method should not be called multiple times with the same path. The behavior for such cases is not defined.

Parameters:
path - the path for the node; may not be null
properties - the properties for the node; may be null if there are no properties
Returns:
true if the children of the node should be recorded, or false if this new node is as deep as the recording should go


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