public class GenericCommandModel extends CommandModel
CommandModel.ParamModel| Constructor and Description |
|---|
GenericCommandModel(Class<?> targetType,
boolean useAnnotations,
ExecuteOn cluster,
I18n i18n,
LocalStringManager localStrings,
DomDocument document,
String commandName,
boolean managedJob,
Class<?>... extraTypes)
GenericCommandModel constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(CommandModel.ParamModel model)
Add a ParamModel for this command
|
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.
|
boolean |
isManagedJob()
This command is managed job.
|
getParameters, getParamName, unknownOptionsAreOperandspublic GenericCommandModel(Class<?> targetType, boolean useAnnotations, ExecuteOn cluster, I18n i18n, LocalStringManager localStrings, DomDocument document, String commandName, boolean managedJob, Class<?>... extraTypes)
targetType - the ConfigBeanProxy class that may have
additional @Param annotations for the command,useAnnotations - if true, use the annotations on the targetType
class to define the parameterscluster - the @ExecuteOn annotation, if anyi18n - the @I18n annotation, if anylocalStrings - where to find strings for the commanddocument - the DomDocument for the commandcommandName - the name of the commandsupportsProgress - true only if command working
with ProgressStatusextraTypes - any extra types that might also define
parameters for the commandpublic 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 void add(CommandModel.ParamModel model)
CommandModeladd in class CommandModelmodel - the new param model to be addedpublic boolean isManagedJob()
CommandModelisManagedJob in class CommandModeltrue only if command is @ManagedJobCopyright © 2019. All rights reserved.