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

@NotThreadSafe
public abstract class BasicGraphCommand
extends Object
implements GraphCommand

Author:
Randall Hauch

Constructor Summary
BasicGraphCommand()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, 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()


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