org.keridwen.sample.helloworld.command
Class PrintRootNameCommand

java.lang.Object
  extended by org.keridwen.core.messaging.AbstractCommand<ResultType,MessageType>
      extended by org.keridwen.sample.helloworld.command.AbstractHelloWorldCommand<Boolean,String>
          extended by org.keridwen.sample.helloworld.command.PrintRootNameCommand
All Implemented Interfaces:
Controllable, Progressable, Command<Boolean,String>

public class PrintRootNameCommand
extends AbstractHelloWorldCommand<Boolean,String>

This Command simply prints the name of the root Node of Keridwen DataModel. It demonstrates the basic usage of Keridwen Commands and how they can access the central application DataModel.

Author:
Benoit Thiebault

Constructor Summary
PrintRootNameCommand()
          Default constructor.
 
Method Summary
 void pause()
           
 void resume()
           
 Boolean run(String message)
           
 void undo()
           
 boolean validatePostConditions()
           
 
Methods inherited from class org.keridwen.sample.helloworld.command.AbstractHelloWorldCommand
getApplicationModel, getBundleModel, setModels
 
Methods inherited from class org.keridwen.core.messaging.AbstractCommand
addControllableListener, addProgressableListener, checkPreConditions, clearControllableListener, clearProgressableListener, execute, getDescription, getLabel, getLogLevel, getProgress, getState, interrupt, isDetermined, isInterrupted, isInterruptible, isPausable, isUndoable, notifyProgressChanged, notifyStatusChanged, removeControllableListener, removeProgressableListener, setCommandStatus, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintRootNameCommand

public PrintRootNameCommand()
Default constructor.

Method Detail

undo

public final void undo()
Specified by:
undo in interface Command<Boolean,String>
Specified by:
undo in class AbstractCommand<Boolean,String>

validatePostConditions

public final boolean validatePostConditions()
Specified by:
validatePostConditions in interface Command<Boolean,String>
Specified by:
validatePostConditions in class AbstractCommand<Boolean,String>

run

public final Boolean run(String message)
                  throws CommandException
Specified by:
run in class AbstractCommand<Boolean,String>
Throws:
CommandException

pause

public void pause()
Specified by:
pause in interface Controllable
Specified by:
pause in class AbstractCommand<Boolean,String>

resume

public void resume()
Specified by:
resume in interface Controllable
Specified by:
resume in class AbstractCommand<Boolean,String>


Copyright © 2011-2013 Artenum. All Rights Reserved.