public class CommandModelImpl extends CommandModel
CommandModel.ParamModel
Constructor and Description |
---|
CommandModelImpl(Class<?> commandType) |
Modifier and Type | Method and Description |
---|---|
void |
add(CommandModel.ParamModel model)
Add a ParamModel for this command
|
void |
addParam(String name,
CommandModel.ParamModel param) |
ExecuteOn |
getClusteringAttributes()
Return the cluster parameters for this command or null if none are
specified and defaults should be used.
|
Class<?> |
getCommandClass()
Return the class that defines the command.
|
String |
getCommandName()
Returns the command name as it is typed by the user.
|
String |
getLocalizedDescription()
Returns a localized description for this command
|
CommandModel.ParamModel |
getModelFor(String paramName)
Returns the parameter model for a particular parameter
|
Collection<String> |
getParametersNames()
Returns a collection of parameter names supported by this admininstrative command
|
String |
getUsageText()
Returns a localized usage text for this command or null if the usage
text should be generated from this model.
|
static Map<String,CommandModel.ParamModel> |
init(Class commandType,
I18n i18n,
LocalStringManager localStrings) |
boolean |
isManagedJob()
This command is managed job.
|
void |
setManagedJob(boolean value) |
boolean |
unknownOptionsAreOperands()
Should an unknown option be considered an operand by asadmin?
|
getParameters, getParamName
public CommandModelImpl(Class<?> commandType)
public static Map<String,CommandModel.ParamModel> init(Class commandType, I18n i18n, LocalStringManager localStrings)
public String getLocalizedDescription()
CommandModel
getLocalizedDescription
in class CommandModel
public String getUsageText()
CommandModel
getUsageText
in class CommandModel
public String getCommandName()
CommandModel
getCommandName
in class CommandModel
public CommandModel.ParamModel getModelFor(String paramName)
CommandModel
getModelFor
in class CommandModel
paramName
- the requested parameter model namepublic Collection<String> getParametersNames()
CommandModel
getParametersNames
in class CommandModel
public Class<?> getCommandClass()
CommandModel
getCommandClass
in class CommandModel
public ExecuteOn getClusteringAttributes()
CommandModel
getClusteringAttributes
in class CommandModel
ExecuteOn
annotation instance or nullpublic boolean isManagedJob()
CommandModel
isManagedJob
in class CommandModel
true
only if command is @ManagedJobpublic void setManagedJob(boolean value)
public boolean unknownOptionsAreOperands()
unknownOptionsAreOperands
in class CommandModel
public void addParam(String name, CommandModel.ParamModel param)
public void add(CommandModel.ParamModel model)
CommandModel
add
in class CommandModel
model
- the new param model to be addedCopyright © 2018. All rights reserved.