|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.command.AbstractCommand
com.ibm.websphere.management.cmdframework.provider.AbstractAdminCommand
com.ibm.websphere.management.cmdframework.provider.AbstractTaskCommand
public abstract class AbstractTaskCommand
The class is the base class for any task command implementation. Any specific task command implementation should derive from this class and only override the methods that javadoc recommends to override.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ibm.websphere.management.cmdframework.provider.AbstractAdminCommand |
---|
AbstractAdminCommand.CmdNotificationListener |
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
org.eclipse.emf.common.command.AbstractCommand.NonDirtying |
Field Summary |
---|
Fields inherited from class com.ibm.websphere.management.cmdframework.provider.AbstractAdminCommand |
---|
ASYNC_CUSTOM_TAG, asyncCmdSession, cmdMgrType, cnh, DYNAMIC_CUSTOM_TAG, listSetParamsTable, PRIVATE_CUSTOM_TAG |
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
description, isExecutable, isPrepared, label |
Constructor Summary | |
---|---|
AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commanddata.CommandData commandData)
|
|
AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata inMetadata)
|
Method Summary | |
---|---|
protected void |
addNewStep(com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata metadata,
com.ibm.websphere.management.cmdframework.commanddata.CommandStepData stepData,
int i)
|
void |
addStep(AbstractCommandStep step,
int index)
add an additional step for the task. |
protected void |
afterStepsExecuted()
This method is called after the steps are executed. |
protected void |
beforeStepsExecuted()
This method is called before the steps are executed. |
void |
commandParamsModified()
This method is called before the user starts to navigate through steps. |
protected void |
contructSteps()
|
void |
execute()
Implements the execution flow for a task command. |
CommandStep |
getCommandStep(java.lang.String stepName)
Gets the command step of the specified command step name. |
CommandStep |
getCurrentStep(int operation)
|
CommandStep |
getCurrentStep(int operation,
java.lang.String stepName)
|
int |
getCurrentStepIndex()
|
com.ibm.websphere.management.cmdframework.commanddata.TaskCommandData |
getTaskCommandData()
|
com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata |
getTaskCommandMetadata()
|
TaskCommandResult |
getTaskCommandResult()
Gets the task command result. |
CommandStep |
gotoStep(java.lang.String stepName)
Goes to the specified step. |
boolean |
hasNextStep()
Tests if there is an enabled step after the cursor. |
boolean |
hasPreviousStep()
Tests if there is an enabled step before the cursor. |
protected com.ibm.websphere.management.cmdframework.commanddata.CommandData |
initCommandData()
Construct proper type of command data instance. |
void |
listAllStepParamsData()
|
java.lang.String[] |
listCommandSteps()
Lists the command step names contained in this task command including the disabled command steps. |
CommandStep |
nextStep()
Gets the next enabled command step. |
CommandStep |
previousStep()
Gets the previous enabled step in the task command. |
void |
processTaskParameters()
This method is called to process task parameters. |
void |
resetCommandData(com.ibm.websphere.management.cmdframework.commanddata.CommandData cmdData)
Reset the command data. |
void |
setCurrentStep(AbstractCommandStep newCurrentStep)
|
void |
setCurrentStepIndex(int index)
|
protected java.lang.String |
showArrayContents(java.lang.Object[] array)
|
protected java.lang.String |
showListContents(java.util.List list)
|
protected void |
stepModified(java.lang.String stepName)
This method is called whenever the user navigates away from the specified step. |
protected void |
taskCommandExecuted(boolean success)
This method is called after the task command is executed. |
void |
validate()
This provides a basic implementation for command parameter validation. |
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
canExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, prepare, setDescription, setLabel, toString, undo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.websphere.management.cmdframework.AdminCommand |
---|
createParameterMetadata, execute, generateScript, getChoices, getCommandMetadata, getCommandResult, getConfigSession, getLocale, getName, getOrigParameterValue, getParameter, getTargetObject, getTargetObjectChoices, isAsyncCommand, isDynamicStepCommand, isPrivateParameter, listAllParameterName, listParameterName, listSetParams, save, setCmdHandler, setConfigSession, setLocale, setOrigParameterValue, setParameter, setTargetObject |
Methods inherited from interface org.eclipse.emf.common.command.Command |
---|
canExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, getResult, redo, undo |
Constructor Detail |
---|
public AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata inMetadata) throws CommandNotFoundException
CommandNotFoundException
public AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commanddata.CommandData commandData) throws CommandNotFoundException, CommandLoadException
CommandNotFoundException
CommandLoadException
Method Detail |
---|
protected void contructSteps() throws CommandNotFoundException
CommandNotFoundException
protected com.ibm.websphere.management.cmdframework.commanddata.CommandData initCommandData()
AbstractAdminCommand
initCommandData
in class AbstractAdminCommand
public CommandStep getCurrentStep(int operation)
public CommandStep getCurrentStep(int operation, java.lang.String stepName)
public void setCurrentStep(AbstractCommandStep newCurrentStep)
public int getCurrentStepIndex()
public void setCurrentStepIndex(int index)
public java.lang.String[] listCommandSteps()
TaskCommand
listCommandSteps
in interface TaskCommand
public final CommandStep nextStep() throws java.util.NoSuchElementException
TaskCommand
nextStep
in interface TaskCommand
java.util.NoSuchElementException
- if there is no enabled step after the cursor.public final CommandStep previousStep() throws java.util.NoSuchElementException
TaskCommand
previousStep
in interface TaskCommand
java.util.NoSuchElementException
- if there is no enabled step before the cursor.public final boolean hasNextStep()
TaskCommand
hasNextStep
in interface TaskCommand
public final boolean hasPreviousStep()
TaskCommand
hasPreviousStep
in interface TaskCommand
public final CommandStep gotoStep(java.lang.String stepName) throws java.util.NoSuchElementException
TaskCommand
gotoStep
in interface TaskCommand
stepName
- the step name
java.util.NoSuchElementException
- if the step is not found or not enabled.public CommandStep getCommandStep(java.lang.String stepName) throws CommandNotFoundException
TaskCommand
gotoStep
method, this method does not change
the cursor position. Typically this method is called when the task command
is executed in batch mode.
getCommandStep
in interface TaskCommand
stepName
- the command step name
CommandNotFoundException
public final com.ibm.websphere.management.cmdframework.commanddata.TaskCommandData getTaskCommandData()
public final com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata getTaskCommandMetadata()
public void addStep(AbstractCommandStep step, int index)
step
- - the step instance.index
- - the position of added step in the step list. If index is
out of range, then the step will be added at the end.public void resetCommandData(com.ibm.websphere.management.cmdframework.commanddata.CommandData cmdData)
resetCommandData
in class AbstractAdminCommand
cmdData
- the new command data.protected void addNewStep(com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata metadata, com.ibm.websphere.management.cmdframework.commanddata.CommandStepData stepData, int i)
public void validate() throws CommandValidationException
validate
in interface AdminCommand
validate
in class AbstractAdminCommand
CommandValidationException
- if there is any invalid command parameter.public void processTaskParameters()
processTaskParameters
in interface TaskCommand
protected void beforeStepsExecuted()
protected void afterStepsExecuted()
protected void taskCommandExecuted(boolean success)
success
- true if the command is executed successfully; false otherwise.protected java.lang.String showArrayContents(java.lang.Object[] array)
protected java.lang.String showListContents(java.util.List list)
protected void stepModified(java.lang.String stepName)
stepName
- the name of the step.public void commandParamsModified()
public void execute()
execute
in interface org.eclipse.emf.common.command.Command
execute
in class AbstractAdminCommand
public TaskCommandResult getTaskCommandResult()
TaskCommand
getTaskCommandResult
in interface TaskCommand
public void listAllStepParamsData()
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |