public abstract class AbstractTaskCommand extends AbstractAdminCommand implements TaskCommand
AbstractAdminCommand.CmdNotificationListenerASYNC_CUSTOM_TAG, asyncCmdSession, cmdMgrType, cnh, DYNAMIC_CUSTOM_TAG, listSetParamsTable, PRIVATE_CUSTOM_TAG| Constructor and Description |
|---|
AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commanddata.CommandData commandData) |
AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata inMetadata) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
cleanupUploadedFiles, createParamEObject, createParameterMetadata, execute, generateScript, getChoices, getCmdHandler, getCmdMgrType, getCommandData, getCommandMetadata, getCommandMetadata, getCommandResult, getCommandSession, getConfigService, getConfigSession, getLocale, getName, getOrigParameterValue, getParameter, getParameter, getParameterMetadata, getResult, getTargetObject, getTargetObjectChoices, getUserData, initializeParameter, initializeParameter, isAsyncCommand, isDynamicStepCommand, isLocalMode, isParamReadonly, isPrivateParameter, isTable, listAllParameterName, listParameterName, listSetParams, listSetParams, redo, resetCommandMetadata, save, sendNotification, setCmdHandler, setCmdMgrType, setCommandMetadata, setCommandResult, setCommandSession, setConfigSession, setListSetParamsTable, setLocale, setOrigParameterValue, setParameter, setParameter, setTargetObject, setupListenercanExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, prepare, setDescription, setLabel, toString, undoclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateParameterMetadata, execute, generateScript, getChoices, getCmdHandler, getCommandMetadata, getCommandResult, getConfigSession, getLocale, getName, getOrigParameterValue, getParameter, getTargetObject, getTargetObjectChoices, isAsyncCommand, isDynamicStepCommand, isPrivateParameter, listAllParameterName, listParameterName, listSetParams, save, setCmdHandler, setConfigSession, setLocale, setOrigParameterValue, setParameter, setTargetObjectpublic AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commandmetadata.TaskCommandMetadata inMetadata)
throws CommandNotFoundException
CommandNotFoundExceptionpublic AbstractTaskCommand(com.ibm.websphere.management.cmdframework.commanddata.CommandData commandData)
throws CommandNotFoundException,
CommandLoadException
protected void contructSteps()
throws CommandNotFoundException
CommandNotFoundExceptionprotected com.ibm.websphere.management.cmdframework.commanddata.CommandData initCommandData()
AbstractAdminCommandinitCommandData in class AbstractAdminCommandpublic 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()
TaskCommandlistCommandSteps in interface TaskCommandpublic final CommandStep nextStep() throws java.util.NoSuchElementException
TaskCommandnextStep in interface TaskCommandjava.util.NoSuchElementException - if there is no enabled step after the cursor.public final CommandStep previousStep() throws java.util.NoSuchElementException
TaskCommandpreviousStep in interface TaskCommandjava.util.NoSuchElementException - if there is no enabled step before the cursor.public final boolean hasNextStep()
TaskCommandhasNextStep in interface TaskCommandpublic final boolean hasPreviousStep()
TaskCommandhasPreviousStep in interface TaskCommandpublic final CommandStep gotoStep(java.lang.String stepName) throws java.util.NoSuchElementException
TaskCommandgotoStep in interface TaskCommandstepName - the step namejava.util.NoSuchElementException - if the step is not found or not enabled.public CommandStep getCommandStep(java.lang.String stepName) throws CommandNotFoundException
TaskCommandgotoStep 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 TaskCommandstepName - the command step nameCommandNotFoundExceptionpublic 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 AbstractAdminCommandcmdData - 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 AdminCommandvalidate in class AbstractAdminCommandCommandValidationException - if there is any invalid command parameter.public void processTaskParameters()
processTaskParameters in interface TaskCommandprotected 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.Commandexecute in class AbstractAdminCommandpublic TaskCommandResult getTaskCommandResult()
TaskCommandgetTaskCommandResult in interface TaskCommandpublic void listAllStepParamsData()