com.ibm.websphere.management.cmdframework
Interface CommandStep
-
- All Superinterfaces:
- AdminCommand, org.eclipse.emf.common.command.Command
- All Known Implementing Classes:
- AbstractCommandStep
public interface CommandStep extends AdminCommand
Represents a step in a TaskCommand. CommandStep extends from AdminCommand, thus it has most functionalities AdminCommand offer. Besides it has couple of unique characteristics of its own. A command step can not exist outside TaskCommand. In another word, you can not create a command step from CommandMgr throughcreateCommand
. The only way you can get a command step is through a TaskCommand instance. For the same reason, you can not execute command step directly. A command step may be enabled or disabled. user can not access the step if a command step is disabled. Disabled steps are skipped when the user navigates through steps. The parameter data of a command step can be a table. Each column represents the values for one specific parameter and each row represents one set of parameter values in the table. The row index starts from 0. User can read or modify any element in the table by parameter name and row index in the table. User can also add rows or delete rows through row index.
-
-
Method Summary
Methods 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
deleteRow(int rowIndex)
Remove a row at the specified position from the table.java.lang.Object[]
getChoices(java.lang.String paramName, int rowIndex)
Returns valid values for the specified parameter.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.boolean
isEnabled()
Tests if this command step is enabled or not.boolean
isRequired()
Check if step has required data missingboolean
isRequired(int rowIndex)
Check if row at the specified position has required data missingjava.util.Collection
listSetParams(int rowIndex)
Lists all the parameters are set.void
setParameter(java.lang.String paramName, java.lang.Object value, int rowIndex)
Sets a parameter value.-
Methods inherited from interface com.ibm.websphere.management.cmdframework.AdminCommand
createParameterMetadata, 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, setTargetObject, validate
-
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Tests if this command step is enabled or not.- Returns:
- true if this command step is enabled; false otherwise.
-
listSetParams
java.util.Collection listSetParams(int rowIndex) throws java.lang.IndexOutOfBoundsException
Lists all the parameters are set.- Parameters:
rowIndex
- the row index in the table. Ignored if the command step parameter data is not a table.- Returns:
- a collection of parameter names whose value are set.
- Throws:
java.lang.IndexOutOfBoundsException
-
getParameter
java.lang.Object getParameter(java.lang.String parameterName, int rowIndex) throws InvalidParameterNameException, java.lang.IndexOutOfBoundsException
Gets the parameter value for a specified parameter and row index.- Parameters:
parameterName
- the name of a paramterrowIndex
- the row index in the table. Ignored if the command step parameter data is not a table.- Returns:
- the parameter value for the specified parameter at the specified row index.
- Throws:
InvalidParameterNameException
java.lang.IndexOutOfBoundsException
-
setParameter
void setParameter(java.lang.String paramName, java.lang.Object value, int rowIndex) throws InvalidParameterValueException, InvalidParameterNameException, java.lang.IndexOutOfBoundsException
Sets a parameter value.- Parameters:
paramName
- 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.- Throws:
InvalidParameterValueException
InvalidParameterNameException
java.lang.IndexOutOfBoundsException
-
getNumberOfRows
int getNumberOfRows()
Gets the number of rows in the table.
-
addRow
void addRow(javax.management.AttributeList rowData, int rowIndex) throws InvalidParameterValueException, java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
Add a row to the table at the specified position.- Parameters:
rowData
- 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.- Throws:
java.lang.UnsupportedOperationException
- if the command step parameter data is not a table.InvalidParameterValueException
java.lang.IndexOutOfBoundsException
-
deleteRow
void deleteRow(int rowIndex) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
Remove a row at the specified position from the table.- Parameters:
rowIndex
- the row index in the table.- Throws:
java.lang.UnsupportedOperationException
- if the command step parameter data is not a table.java.lang.IndexOutOfBoundsException
-
isRequired
boolean isRequired()
Check if step has required data missing- Returns:
- true if this command step has required data missing; otherwise false.
-
isRequired
boolean isRequired(int rowIndex)
Check if row at the specified position has required data missing- Parameters:
rowIndex
- the row index in the table.- Returns:
- true if this row has required data missing; otherwise false.
-
getChoices
java.lang.Object[] getChoices(java.lang.String paramName, int rowIndex)
Returns valid values for the specified parameter. Implementation of this method is optional. If command provider does not implement this method, then this method returns null.- Parameters:
paramName
- the parameter name.rowIndex
- the row index in the table.- Returns:
- an array of valid values for the specified parameter.
-
-