org.jboss.dna.graph.commands.basic
Class BasicGraphCommand

java.lang.Object
  extended by org.jboss.dna.graph.commands.basic.BasicGraphCommand
All Implemented Interfaces:
GraphCommand
Direct Known Subclasses:
BasicCompositeCommand, BasicCopyNodeCommand, BasicCreateNodeCommand, BasicDeleteBranchCommand, BasicGetChildrenCommand, BasicGetPropertiesCommand, BasicMoveBranchCommand, BasicRecordBranchCommand, BasicSetPropertiesCommand, GraphImporter.ImporterCommands

@NotThreadSafe
public abstract class BasicGraphCommand
extends Object
implements GraphCommand

Author:
Randall Hauch

Constructor Summary
BasicGraphCommand()
           
 
Method Summary
protected  List<Path.Segment> createChildrenList(Iterable<Path.Segment> namesOfChildren)
           
protected  List<Path.Segment> createChildrenList(Iterator<Path.Segment> namesOfChildren)
           
protected  List<Path.Segment> createChildrenList(Name nameOfChild)
           
protected static List<Path.Segment> createChildrenList(Path.Segment... namesOfChildren)
           
 Throwable getError()
          Get the error for this command.
 boolean hasError()
          Return true if this command has an error.
 boolean hasNoError()
          Convenience method that is equivalent to !
 boolean isCancelled()
          Return whether this command has been cancelled.
 void setCancelled(boolean cancelled)
           
 void setError(Throwable t)
          Set the error for this command.
protected static void setProperty(Map<Name,List<Object>> propertyValues, Name propertyName, Iterable<?> values)
           
protected static void setProperty(Map<Name,List<Object>> propertyValues, Name propertyName, Iterator<?> values)
           
protected static void setProperty(Map<Name,List<Object>> propertyValues, Name propertyName, Object... values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicGraphCommand

public BasicGraphCommand()
Method Detail

isCancelled

public boolean isCancelled()
Return whether this command has been cancelled.

Specified by:
isCancelled in interface GraphCommand
Returns:
true if this command has been cancelled, or false otherwise.

setCancelled

public void setCancelled(boolean cancelled)
Parameters:
cancelled - Sets cancelled to the specified value.

setError

public void setError(Throwable t)
Set the error for this command.

Specified by:
setError in interface GraphCommand
Parameters:
t - the exception
See Also:
GraphCommand.setError(java.lang.Throwable)

getError

public Throwable getError()
Get the error for this command.

Specified by:
getError in interface GraphCommand
Returns:
the error, or null if there is no error
See Also:
GraphCommand.getError()

hasError

public boolean hasError()
Return true if this command has an error.

Specified by:
hasError in interface GraphCommand
Returns:
true if the command has an error, or false otherwise
See Also:
GraphCommand.hasError()

hasNoError

public boolean hasNoError()
Description copied from interface: GraphCommand
Convenience method that is equivalent to !hasError().

Specified by:
hasNoError in interface GraphCommand
Returns:
true if the command has no error, or false otherwise
See Also:
GraphCommand.getError(), GraphCommand.setError(Throwable), GraphCommand.hasError()

createChildrenList

protected List<Path.Segment> createChildrenList(Name nameOfChild)

createChildrenList

protected List<Path.Segment> createChildrenList(Iterator<Path.Segment> namesOfChildren)

createChildrenList

protected List<Path.Segment> createChildrenList(Iterable<Path.Segment> namesOfChildren)

createChildrenList

protected static List<Path.Segment> createChildrenList(Path.Segment... namesOfChildren)

setProperty

protected static void setProperty(Map<Name,List<Object>> propertyValues,
                                  Name propertyName,
                                  Object... values)

setProperty

protected static void setProperty(Map<Name,List<Object>> propertyValues,
                                  Name propertyName,
                                  Iterable<?> values)

setProperty

protected static void setProperty(Map<Name,List<Object>> propertyValues,
                                  Name propertyName,
                                  Iterator<?> values)


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