org.keridwen.sample.helloworld.command
Class AbstractHelloWorldCommand<ResultType extends Serializable,MessageType extends Serializable>
java.lang.Object
org.keridwen.core.messaging.AbstractCommand<ResultType,MessageType>
org.keridwen.sample.helloworld.command.AbstractHelloWorldCommand<ResultType,MessageType>
- Type Parameters:
ResultType
- The generic type of result returned by the Command
upon completionMessageType
- The generic type of argument provided to the Command
- All Implemented Interfaces:
- Controllable, Progressable, Command<ResultType,MessageType>
- Direct Known Subclasses:
- PrintRootNameCommand
public abstract class AbstractHelloWorldCommand<ResultType extends Serializable,MessageType extends Serializable>
- extends AbstractCommand<ResultType,MessageType>
This class is the an adapted version of Keridwen AbstractCommand
to this sample HelloWorld module. Its
purpose is to provide the appropriate signatures for its methods, preventing further type casts and thus potential
runtime errors.
- Author:
- Benoit Thiebault
Constructor Summary |
AbstractHelloWorldCommand(String aLabel,
String aDescription,
boolean isInterruptible,
boolean isUndoable,
boolean isPausable,
boolean isProgressDetermined)
Builds a Command with the given label, description and control properties. |
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, pause, removeControllableListener, removeProgressableListener, resume, run, setCommandStatus, setProgress, undo, validatePostConditions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractHelloWorldCommand
public AbstractHelloWorldCommand(String aLabel,
String aDescription,
boolean isInterruptible,
boolean isUndoable,
boolean isPausable,
boolean isProgressDetermined)
- Builds a
Command
with the given label, description and control properties.
- Parameters:
aLabel
- the localized name of the Command
aDescription
- the localized description of the Command
.isInterruptible
- boolean indicating whether the Command
can be interrupted.isUndoable
- boolean indicating whether the Command
can be undone.isPausable
- boolean indicating whether the Command
can be paused.isProgressDetermined
- boolean indicating whether the Command
progress can be monitored or if it is undetermined
setModels
public void setModels(DataModel anApplicationModel,
DataModel aBundleModel)
- Specified by:
setModels
in interface Command<ResultType extends Serializable,MessageType extends Serializable>
- Overrides:
setModels
in class AbstractCommand<ResultType extends Serializable,MessageType extends Serializable>
getApplicationModel
public DefaultDataModel getApplicationModel()
- Specified by:
getApplicationModel
in interface Command<ResultType extends Serializable,MessageType extends Serializable>
- Overrides:
getApplicationModel
in class AbstractCommand<ResultType extends Serializable,MessageType extends Serializable>
getBundleModel
public DataModel getBundleModel()
- Specified by:
getBundleModel
in interface Command<ResultType extends Serializable,MessageType extends Serializable>
- Overrides:
getBundleModel
in class AbstractCommand<ResultType extends Serializable,MessageType extends Serializable>
Copyright © 2011-2013 Artenum. All Rights Reserved.