|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dna.graph.commands.basic.BasicGraphCommand
org.jboss.dna.graph.commands.basic.BasicRecordBranchCommand
@NotThreadSafe public class BasicRecordBranchCommand
Constructor Summary | |
---|---|
BasicRecordBranchCommand(Path topOfBranch,
NodeConflictBehavior conflictBehavior)
|
|
BasicRecordBranchCommand(Path topOfBranch,
NodeConflictBehavior conflictBehavior,
List<CreateNodeCommand> commands)
|
|
BasicRecordBranchCommand(Path topOfBranch,
NodeConflictBehavior conflictBehavior,
List<CreateNodeCommand> commands,
int maxDepthOfBranch)
|
Method Summary | |
---|---|
List<CreateNodeCommand> |
getCreateNodeCommands()
Return the commands to create the nodes, in the order they were recorded. |
int |
getMaxDepth()
|
Path |
getPath()
Get the path to which this command applies. |
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. |
String |
toString()
|
Methods inherited from class org.jboss.dna.graph.commands.basic.BasicGraphCommand |
---|
getError, hasError, hasNoError, isCancelled, setCancelled, setError |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.dna.graph.commands.GraphCommand |
---|
getError, hasError, hasNoError, isCancelled, setError |
Constructor Detail |
---|
public BasicRecordBranchCommand(Path topOfBranch, NodeConflictBehavior conflictBehavior)
topOfBranch
- the top node in the branch that is to be recorded; may not be nullconflictBehavior
- the desired behavior when a node exists at the path
; may not be nullpublic BasicRecordBranchCommand(Path topOfBranch, NodeConflictBehavior conflictBehavior, List<CreateNodeCommand> commands)
topOfBranch
- the top node in the branch that is to be recorded; may not be nullconflictBehavior
- the desired behavior when a node exists at the path
; may not be nullcommands
- the list into which the CreateNodeCommand
s should be place; may be nullpublic BasicRecordBranchCommand(Path topOfBranch, NodeConflictBehavior conflictBehavior, List<CreateNodeCommand> commands, int maxDepthOfBranch)
topOfBranch
- the top node in the branch that is to be recorded; may not be nullconflictBehavior
- the desired behavior when a node exists at the path
; may not be nullcommands
- the list into which the CreateNodeCommand
s should be place; may be nullmaxDepthOfBranch
- the maximum depth of the branch that should be recorded, or Integer.MAX_VALUE
if there is
no limitMethod Detail |
---|
public Path getPath()
PathNotFoundException
exception should
be recorded as an error
.
getPath
in interface ActsOnPath
public boolean record(Path path, Iterable<Property> properties)
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.
record
in interface RecordBranchCommand
path
- the path for the node; may not be nullproperties
- the properties for the node; may be null if there are no properties
public boolean record(Path path, Iterator<Property> properties)
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.
record
in interface RecordBranchCommand
path
- the path for the node; may not be nullproperties
- the properties for the node; may be null if there are no properties
public boolean record(Path path, Property... properties)
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.
record
in interface RecordBranchCommand
path
- the path for the node; may not be nullproperties
- the properties for the node; may be null if there are no properties
public int getMaxDepth()
public List<CreateNodeCommand> getCreateNodeCommands()
create node commands
; never nullpublic String toString()
toString
in class Object
Object.toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |