public class AbstractCommandStep extends AbstractAdminCommand implements CommandStep
AbstractAdminCommand.CmdNotificationListener| Modifier and Type | Field and Description |
|---|---|
protected AbstractTaskCommand |
taskCmd |
ASYNC_CUSTOM_TAG, asyncCmdSession, cmdMgrType, cnh, DYNAMIC_CUSTOM_TAG, listSetParamsTable, PRIVATE_CUSTOM_TAG| Constructor and Description |
|---|
AbstractCommandStep(AbstractTaskCommand parent,
com.ibm.websphere.management.cmdframework.commanddata.CommandData commandData) |
AbstractCommandStep(AbstractTaskCommand parent,
com.ibm.websphere.management.cmdframework.commandmetadata.CommandMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(javax.management.AttributeList rowData,
int rowIndex)
Add a row to the table at the specified position.
|
void |
commandParamModified()
This method is called whenever the parameter data in the parent task command
are changed.
|
protected org.eclipse.emf.ecore.EObject |
createParamEObject()
Create an EObject to store the command's parameter values.
|
void |
deleteRow(int rowIndex)
Remove a row at the specified position from the table.
|
boolean |
equals(java.lang.Object obj)
If two instance of command step have same name, we consider them eaqual.
|
void |
execute()
Step can not be executed independently, therefore this method is not supported.
|
void |
execute(CommandHistory cmdHistory)
Step can not be executed independently, therefore this method is not supported.
|
protected void |
executeStep()
Execute the current step.
|
java.lang.Object[] |
getChoices(java.lang.String paramName,
int rowIndex)
Returns valid values for the specified parameter.
|
static com.ibm.websphere.management.cmdframework.commandmetadata.CommandMetadata |
getCommandMetadata(java.lang.String cmdName) |
com.ibm.websphere.management.cmdframework.commanddata.CommandStepData |
getCommandStepData()
A convienent method that returns more type specific value than the generic CommandData.
|
Session |
getConfigSession()
Returns user's config session.
|
int |
getNumberOfRows()
Gets the number of rows in the table.
|
java.lang.Object |
getParameter(java.lang.String parameterName,
int rowIndex)
Gets the parameter value for a specified parameter and row index.
|
int |
hashcode()
Hash the command step according to the command name.
|
protected com.ibm.websphere.management.cmdframework.commanddata.CommandData |
initCommandData()
Construct proper type of command data instance.
|
protected void |
initializeRow(javax.management.AttributeList rowData,
int rowIndex) |
protected void |
initializeStep()
Initialize the current step.
|
boolean |
isEnabled()
Tests if this command step is enabled or not.
|
protected boolean |
isLocalMode() |
boolean |
isRequired()
Check if step has required data missing
|
boolean |
isRequired(int rowIndex)
Check if row at the specified position has required data missing
|
protected boolean |
isTable() |
java.util.Collection |
listSetParams(int rowIndex)
Lists all the parameters are set.
|
void |
resetCommandData(com.ibm.websphere.management.cmdframework.commanddata.CommandData stepData)
Reset the command data for the step.
|
void |
setParameter(java.lang.String paramName,
java.lang.Object value,
int rowIndex)
Sets a parameter value.
|
void |
stepModified(java.lang.String stepName)
This method is called whenever the parameter data in another task step
are changed.
|
protected void |
taskCommandExecuted(boolean success,
boolean executed)
This method is called when the task command completes the execution.
|
void |
validate()
Providers a default implmentation for the method.
|
cleanupUploadedFiles, createParameterMetadata, generateScript, getChoices, getCmdHandler, getCmdMgrType, getCommandData, getCommandMetadata, getCommandResult, getCommandSession, getConfigService, getLocale, getName, getOrigParameterValue, getParameter, getParameterMetadata, getResult, getTargetObject, getTargetObjectChoices, getUserData, initializeParameter, initializeParameter, isAsyncCommand, isDynamicStepCommand, isParamReadonly, isPrivateParameter, listAllParameterName, listParameterName, listSetParams, redo, resetCommandMetadata, save, sendNotification, setCmdHandler, setCmdMgrType, setCommandMetadata, setCommandResult, setCommandSession, setConfigSession, setListSetParamsTable, setLocale, setOrigParameterValue, setParameter, setTargetObject, setupListenercanExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, prepare, setDescription, setLabel, toString, undoclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateParameterMetadata, generateScript, getChoices, getCmdHandler, getCommandMetadata, getCommandResult, getLocale, getName, getOrigParameterValue, getParameter, getTargetObject, getTargetObjectChoices, isAsyncCommand, isDynamicStepCommand, isPrivateParameter, listAllParameterName, listParameterName, listSetParams, save, setCmdHandler, setConfigSession, setLocale, setOrigParameterValue, setParameter, setTargetObjectprotected AbstractTaskCommand taskCmd
public AbstractCommandStep(AbstractTaskCommand parent, com.ibm.websphere.management.cmdframework.commandmetadata.CommandMetadata metadata)
public AbstractCommandStep(AbstractTaskCommand parent, com.ibm.websphere.management.cmdframework.commanddata.CommandData commandData) throws CommandNotFoundException
CommandNotFoundExceptionpublic static com.ibm.websphere.management.cmdframework.commandmetadata.CommandMetadata getCommandMetadata(java.lang.String cmdName)
throws CommandNotFoundException
CommandNotFoundExceptionpublic boolean isEnabled()
CommandStepisEnabled in interface CommandStepprotected boolean isLocalMode()
isLocalMode in class AbstractAdminCommandpublic final int hashcode()
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected com.ibm.websphere.management.cmdframework.commanddata.CommandData initCommandData()
AbstractAdminCommandinitCommandData in class AbstractAdminCommandpublic final com.ibm.websphere.management.cmdframework.commanddata.CommandStepData getCommandStepData()
public final void resetCommandData(com.ibm.websphere.management.cmdframework.commanddata.CommandData stepData)
resetCommandData in class AbstractAdminCommandstepData - the new command data for the step.public final void execute(CommandHistory cmdHistory)
execute in interface AdminCommandexecute in class AbstractAdminCommandcmdHistory - an implementation of command historypublic final void execute()
execute in interface org.eclipse.emf.common.command.Commandexecute in class AbstractAdminCommandpublic java.util.Collection listSetParams(int rowIndex)
throws java.lang.IndexOutOfBoundsException
CommandSteplistSetParams in interface CommandSteplistSetParams in class AbstractAdminCommandrowIndex - the row index in the table. Ignored if the command step parameter data is not a table.java.lang.IndexOutOfBoundsExceptionpublic java.lang.Object getParameter(java.lang.String parameterName,
int rowIndex)
throws InvalidParameterNameException,
java.lang.IndexOutOfBoundsException
CommandStepgetParameter in interface CommandStepgetParameter in class AbstractAdminCommandparameterName - the name of a paramterrowIndex - the row index in the table. Ignored if the command step parameter data is not a table.InvalidParameterNameExceptionjava.lang.IndexOutOfBoundsExceptionpublic void setParameter(java.lang.String paramName,
java.lang.Object value,
int rowIndex)
throws InvalidParameterValueException,
InvalidParameterNameException,
java.lang.IndexOutOfBoundsException
CommandStepsetParameter in interface CommandStepsetParameter in class AbstractAdminCommandparamName - the name of a parameter.value - the value of a parameter.rowIndex - the row index in the table. Ignored if the command step parameter data is not a table.InvalidParameterValueExceptionInvalidParameterNameExceptionjava.lang.IndexOutOfBoundsExceptionpublic int getNumberOfRows()
CommandStepgetNumberOfRows in interface CommandStepprotected void initializeRow(javax.management.AttributeList rowData,
int rowIndex)
throws InvalidParameterValueException,
java.lang.IndexOutOfBoundsException
InvalidParameterValueExceptionjava.lang.IndexOutOfBoundsExceptionpublic void addRow(javax.management.AttributeList rowData,
int rowIndex)
throws InvalidParameterValueException,
java.lang.IndexOutOfBoundsException
CommandStepaddRow in interface CommandSteprowData - the parameter data in a row. The attribute name is a
parameter name and the attribute value is the value for the parameter.rowIndex - the row index in the table. Ignored if the command step parameter data is not a table.InvalidParameterValueExceptionjava.lang.IndexOutOfBoundsExceptionpublic void deleteRow(int rowIndex)
throws java.lang.UnsupportedOperationException
CommandStepdeleteRow in interface CommandSteprowIndex - the row index in the table.java.lang.UnsupportedOperationException - if the command step parameter data is not a table.protected final boolean isTable()
isTable in class AbstractAdminCommandprotected final org.eclipse.emf.ecore.EObject createParamEObject()
throws CommandNotFoundException
AbstractAdminCommandcreateParamEObject in class AbstractAdminCommandCommandNotFoundExceptionpublic void stepModified(java.lang.String stepName)
throws CommandException
stepName - the step name.CommandException - if not able to change task step by subclass.public void commandParamModified()
public void validate()
throws CommandValidationException
AbstractAdminCommandvalidate in interface AdminCommandvalidate in class AbstractAdminCommandCommandValidationException - if there is any invalid command parameter.protected void taskCommandExecuted(boolean success,
boolean executed)
success - true if the task command executed successfully, false otherwise.executed - true if this step is ever executed, false otherwise.protected void executeStep()
protected void initializeStep()
throws CommandException
This method is called when this step is returned to command user first time.
CommandExceptionpublic boolean isRequired()
CommandStepisRequired in interface CommandSteppublic Session getConfigSession()
AdminCommandgetConfigSession in interface AdminCommandgetConfigSession in class AbstractAdminCommandpublic boolean isRequired(int rowIndex)
CommandStepisRequired in interface CommandSteprowIndex - the row index in the table.public java.lang.Object[] getChoices(java.lang.String paramName,
int rowIndex)
CommandStepgetChoices in interface CommandStepparamName - the parameter name.rowIndex - the row index in the table.