public abstract class CommandModel extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CommandModel.ParamModel
Model for a command parameter.
|
| Constructor and Description |
|---|
CommandModel() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
add(CommandModel.ParamModel model)
Add a ParamModel for this command
|
abstract ExecuteOn |
getClusteringAttributes()
Return the cluster parameters for this command or null if none are
specified and defaults should be used.
|
abstract Class<?> |
getCommandClass()
Return the class that defines the command.
|
abstract String |
getCommandName()
Returns the command name as it is typed by the user.
|
abstract String |
getLocalizedDescription()
Returns a localized description for this command
|
abstract CommandModel.ParamModel |
getModelFor(String paramName)
Returns the parameter model for a particular parameter
|
Collection<CommandModel.ParamModel> |
getParameters()
Returns a collection of parameter model for all the parameters supported
by this command.
|
abstract Collection<String> |
getParametersNames()
Returns a collection of parameter names supported by this admininstrative command
|
static String |
getParamName(Param param,
AnnotatedElement annotated)
Get the Param name.
|
abstract String |
getUsageText()
Returns a localized usage text for this command or null if the usage
text should be generated from this model.
|
abstract boolean |
isManagedJob()
This command is managed job.
|
boolean |
unknownOptionsAreOperands()
Should an unknown option be considered an operand by asadmin?
|
public abstract String getCommandName()
public abstract String getLocalizedDescription()
public abstract String getUsageText()
public abstract CommandModel.ParamModel getModelFor(String paramName)
paramName - the requested parameter model namepublic abstract Collection<String> getParametersNames()
public abstract Class<?> getCommandClass()
public abstract boolean isManagedJob()
true only if command is @ManagedJobpublic abstract ExecuteOn getClusteringAttributes()
ExecuteOn annotation instance or nullpublic abstract void add(CommandModel.ParamModel model)
model - the new param model to be addedpublic Collection<CommandModel.ParamModel> getParameters()
public static String getParamName(Param param, AnnotatedElement annotated)
param - class annotationannotated - annotated field or methodpublic boolean unknownOptionsAreOperands()
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.