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, getParamNamepublic CommandModelImpl(Class<?> commandType)
public static Map<String,CommandModel.ParamModel> init(Class commandType, I18n i18n, LocalStringManager localStrings)
public String getLocalizedDescription()
CommandModelgetLocalizedDescription in class CommandModelpublic String getUsageText()
CommandModelgetUsageText in class CommandModelpublic String getCommandName()
CommandModelgetCommandName in class CommandModelpublic CommandModel.ParamModel getModelFor(String paramName)
CommandModelgetModelFor in class CommandModelparamName - the requested parameter model namepublic Collection<String> getParametersNames()
CommandModelgetParametersNames in class CommandModelpublic Class<?> getCommandClass()
CommandModelgetCommandClass in class CommandModelpublic ExecuteOn getClusteringAttributes()
CommandModelgetClusteringAttributes in class CommandModelExecuteOn annotation instance or nullpublic boolean isManagedJob()
CommandModelisManagedJob in class CommandModeltrue only if command is @ManagedJobpublic void setManagedJob(boolean value)
public boolean unknownOptionsAreOperands()
unknownOptionsAreOperands in class CommandModelpublic void addParam(String name, CommandModel.ParamModel param)
public void add(CommandModel.ParamModel model)
CommandModeladd in class CommandModelmodel - the new param model to be addedCopyright © 2017. All rights reserved.