|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.management.cmdframework.provider.CommandProvider
public abstract class CommandProvider
An abstract class any command provider must extend.
Defines the APIs that get the metadata and an instance of admin commands. Any implementation of this abstract class must provide a constructor that takes no argument.
Constructor Summary | |
---|---|
CommandProvider()
|
Method Summary | |
---|---|
int |
commandStepPosition(AbstractTaskCommand taskCmd,
java.lang.String stepName)
Returns the index of step in the task command. |
AbstractAdminCommand |
createCommand(com.ibm.websphere.management.cmdframework.commandmetadata.CommandMetadata metadata)
Create an instance of an admin command based on the specified metadata. |
AbstractCommandStep |
createCommandStep(AbstractTaskCommand taskCmd,
java.lang.String stepName)
Create an instance of a task command step based on the specified metadata. |
protected CommandProviderHelper |
getCommandProviderHelper()
A convenient method for the command provider to get a CommandProviderHelper instance. |
protected com.ibm.websphere.management.cmdframework.commandmetadata.CommandStepMetadata |
getStepMetadata(AbstractTaskCommand taskCmd,
java.lang.String stepName)
|
java.util.List |
initCommandMetadata(java.util.List metadata)
Initialize the command metadata based on the command metadata defined in the admin-command-def.xml file. |
AbstractAdminCommand |
loadCommand(com.ibm.websphere.management.cmdframework.commanddata.CommandData cmdData)
Create an instance of an admin command based on the specified command data. |
AbstractCommandStep |
loadCommandStep(AbstractTaskCommand taskCmd,
com.ibm.websphere.management.cmdframework.commanddata.CommandStepData stepData)
Create an instance of a command step based on the specified command data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandProvider()
Method Detail |
---|
public AbstractAdminCommand createCommand(com.ibm.websphere.management.cmdframework.commandmetadata.CommandMetadata metadata) throws CommandNotFoundException
metadata
- the metadata of an admin command.
CommandNotFoundException
- if the
specified command is not found.public AbstractAdminCommand loadCommand(com.ibm.websphere.management.cmdframework.commanddata.CommandData cmdData) throws CommandNotFoundException, CommandLoadException
cmdData
- the command data of the admin command.
CommandNotFoundException
- if the
specified command is not found.
CommandLoadException
- if the command data is failed to load into an
admin command instance.public java.util.List initCommandMetadata(java.util.List metadata)
metadata
- List of command metadata loaded from the admin-command-def.xml file.
public AbstractCommandStep createCommandStep(AbstractTaskCommand taskCmd, java.lang.String stepName) throws CommandNotFoundException
taskCmd
- the parent task command of the step.stepName
- the name of the command step.
CommandNotFoundException
- if the
specified step is not defined in the specified task command.public AbstractCommandStep loadCommandStep(AbstractTaskCommand taskCmd, com.ibm.websphere.management.cmdframework.commanddata.CommandStepData stepData) throws CommandNotFoundException, CommandLoadException
taskCmd
- the parent task command of the step.stepData
- the command data of a command step.
CommandNotFoundException
- if the
specified step is not defined in the specified task command.
CommandLoadException
- if failed to load the command data.public int commandStepPosition(AbstractTaskCommand taskCmd, java.lang.String stepName)
The default behavior of this method is to add the step at the end. In another word, the order of step instances in the task command will be exactly the same as the order of step metadata defined in the command definition file. In general, the command provider does not need to override. The command provider may choose to override this method to order the steps in a way different from the order of their metadata. One typical usage scenario of overriding this method is that an extended step must be inserted in certain position in the base implementation of the task command.
taskCmd
- the parent task command.stepName
- the name of the step
protected CommandProviderHelper getCommandProviderHelper()
protected com.ibm.websphere.management.cmdframework.commandmetadata.CommandStepMetadata getStepMetadata(AbstractTaskCommand taskCmd, java.lang.String stepName)
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |