public class GenericTypeOperationHandler extends BatchModeCommandHandler
| Modifier and Type | Field and Description |
|---|---|
protected String |
commandName |
protected Set<String> |
excludedOps |
protected ArgumentWithoutValue |
helpCommands |
protected ArgumentWithoutValue |
helpProperties |
protected String |
idProperty |
protected ArgumentWithValue |
name |
protected String |
nodeType |
protected ArgumentWithValue |
operation |
protected ArgumentWithValue |
profile |
accessRequirement, headers, params, requiredAddresshelpArg| Constructor and Description |
|---|
GenericTypeOperationHandler(CommandContext ctx,
String nodeType,
String idProperty) |
GenericTypeOperationHandler(CommandContext ctx,
String nodeType,
String idProperty,
String... excludeOperations) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(CommandArgument arg) |
void |
addHandler(String name,
OperationCommandWithDescription handler) |
void |
addValueCompleter(String propertyName,
CommandLineCompleter completer) |
void |
addValueConverter(String propertyName,
ArgumentValueConverter converter) |
org.jboss.dmr.ModelNode |
buildRequestWithoutHeaders(CommandContext ctx) |
void |
cliEvent(CliEvent event,
CommandContext ctx) |
protected void |
formatProperty(CommandContext ctx,
String argName,
CharSequence descr) |
protected StringBuilder |
formatResponse(CommandContext ctx,
org.jboss.dmr.ModelNode opResponse,
boolean composite,
StringBuilder buf) |
protected void |
formatText(CommandContext ctx,
CharSequence text,
int offset) |
CommandArgument |
getArgument(CommandContext ctx,
String name)
Returns command argument declared by the command handler
corresponding to the argument name.
|
Collection<CommandArgument> |
getArguments(CommandContext ctx)
Returns a collection of the command arguments the handler supports in the current context.
|
protected Iterator<org.jboss.as.cli.handlers.GenericTypeOperationHandler.AttributeDescription> |
getAttributeIterator(List<org.jboss.dmr.Property> props,
org.jboss.dmr.ModelNode accessControl) |
protected Iterator<org.jboss.as.cli.handlers.GenericTypeOperationHandler.AttributeDescription> |
getNodeProperties(CommandContext ctx) |
protected org.jboss.dmr.ModelNode |
getOperationDescription(CommandContext ctx,
String operationName) |
protected List<String> |
getSupportedCommands(CommandContext ctx) |
protected void |
handleResponse(CommandContext ctx,
org.jboss.dmr.ModelNode opResponse,
boolean composite) |
boolean |
hasArgument(CommandContext ctx,
int index)
Checks whether the command handler accepts an argument with the specified index.
|
boolean |
hasArgument(CommandContext ctx,
String name)
Checks whether the command handler recognizes the argument by the name.
|
protected org.jboss.dmr.ModelNode |
initRequest(CommandContext ctx) |
protected void |
printHelp(CommandContext ctx) |
protected void |
printNodeDescription(CommandContext ctx) |
protected void |
printProperties(CommandContext ctx,
Iterator<org.jboss.as.cli.handlers.GenericTypeOperationHandler.AttributeDescription> props) |
protected void |
printSupportedCommands(CommandContext ctx) |
protected void |
recognizeArguments(CommandContext ctx) |
isBatchModeaddHeaders, addRequiredPath, addRequiredPath, buildRequest, buildRequestWOValidation, displayResponseHeaders, doHandle, getRequiredAddress, getRequiredType, isAddressValid, isAvailable, isDependsOnProfile, setParams, setupAccessRequirementhandle, printListclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleprotected final String commandName
protected final String idProperty
protected final String nodeType
protected final ArgumentWithValue profile
protected final ArgumentWithValue name
protected final ArgumentWithValue operation
protected final ArgumentWithoutValue helpProperties
protected final ArgumentWithoutValue helpCommands
public GenericTypeOperationHandler(CommandContext ctx, String nodeType, String idProperty)
public GenericTypeOperationHandler(CommandContext ctx, String nodeType, String idProperty, String... excludeOperations)
public void addValueConverter(String propertyName, ArgumentValueConverter converter)
public void addValueCompleter(String propertyName, CommandLineCompleter completer)
public void addHandler(String name, OperationCommandWithDescription handler)
public CommandArgument getArgument(CommandContext ctx, String name)
CommandHandlergetArgument in interface CommandHandlergetArgument in class CommandHandlerWithArgumentsctx - the current contextname - the name of the argumentpublic Collection<CommandArgument> getArguments(CommandContext ctx)
CommandHandlergetArguments in interface CommandHandlergetArguments in class CommandHandlerWithArgumentsctx - current command line contextpublic boolean hasArgument(CommandContext ctx, String name)
CommandHandlerhasArgument in interface CommandHandlerhasArgument in class CommandHandlerWithArgumentsctx - the current contextname - argument name to checkpublic boolean hasArgument(CommandContext ctx, int index)
CommandHandlerhasArgument in interface CommandHandlerhasArgument in class CommandHandlerWithArgumentsctx - the current contextindex - argument index to checkpublic void addArgument(CommandArgument arg)
addArgument in class BaseOperationCommandprotected void recognizeArguments(CommandContext ctx) throws CommandFormatException
recognizeArguments in class CommandHandlerWithArgumentsCommandFormatExceptionpublic org.jboss.dmr.ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException
buildRequestWithoutHeaders in class BaseOperationCommandCommandFormatExceptionpublic void cliEvent(CliEvent event, CommandContext ctx)
cliEvent in interface CliEventListenercliEvent in class BaseOperationCommandprotected void handleResponse(CommandContext ctx, org.jboss.dmr.ModelNode opResponse, boolean composite) throws CommandFormatException
handleResponse in class BaseOperationCommandCommandFormatExceptionprotected StringBuilder formatResponse(CommandContext ctx, org.jboss.dmr.ModelNode opResponse, boolean composite, StringBuilder buf) throws CommandFormatException
CommandFormatExceptionprotected void printHelp(CommandContext ctx) throws CommandLineException
printHelp in class CommandHandlerWithHelpCommandLineExceptionprotected void printProperties(CommandContext ctx, Iterator<org.jboss.as.cli.handlers.GenericTypeOperationHandler.AttributeDescription> props)
protected void printNodeDescription(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected void formatText(CommandContext ctx, CharSequence text, int offset)
protected void formatProperty(CommandContext ctx, String argName, CharSequence descr)
protected void printSupportedCommands(CommandContext ctx) throws CommandLineException
CommandLineExceptionprotected List<String> getSupportedCommands(CommandContext ctx) throws CommandLineException
CommandLineExceptionprotected Iterator<org.jboss.as.cli.handlers.GenericTypeOperationHandler.AttributeDescription> getNodeProperties(CommandContext ctx) throws CommandLineException
CommandLineExceptionprotected Iterator<org.jboss.as.cli.handlers.GenericTypeOperationHandler.AttributeDescription> getAttributeIterator(List<org.jboss.dmr.Property> props, org.jboss.dmr.ModelNode accessControl)
protected org.jboss.dmr.ModelNode getOperationDescription(CommandContext ctx, String operationName) throws CommandLineException
CommandLineExceptionprotected org.jboss.dmr.ModelNode initRequest(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.