public class GenericTypeOperationHandler extends BatchModeCommandHandler
| Modifier and Type | Field and Description |
|---|---|
protected String |
commandName |
protected List<String> |
excludeOps |
protected ArgumentWithoutValue |
helpCommands |
protected ArgumentWithoutValue |
helpProperties |
protected String |
idProperty |
protected ArgumentWithValue |
name |
protected String |
nodeType |
protected ArgumentWithValue |
operation |
protected ArgumentWithValue |
profile |
headers, params, requiredAddresshelpArg| Constructor and Description |
|---|
GenericTypeOperationHandler(CommandContext ctx,
String nodeType,
String idProperty) |
GenericTypeOperationHandler(CommandContext ctx,
String nodeType,
String idProperty,
List<String> excludeOperations) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(CommandArgument arg) |
void |
addValueCompleter(String propertyName,
CommandLineCompleter completer) |
void |
addValueConverter(String propertyName,
ArgumentValueConverter converter) |
protected org.jboss.dmr.ModelNode |
buildOperationRequest(CommandContext ctx,
String operation) |
org.jboss.dmr.ModelNode |
buildRequestWithoutHeaders(CommandContext ctx) |
protected org.jboss.dmr.ModelNode |
buildWritePropertyRequest(CommandContext ctx) |
protected StringBuilder |
formatResponse(CommandContext ctx,
org.jboss.dmr.ModelNode opResponse,
boolean composite,
StringBuilder buf) |
Collection<CommandArgument> |
getArguments(CommandContext ctx)
Returns a collection of the command arguments the handler supports in the current context.
|
protected List<org.jboss.dmr.Property> |
getNodeProperties(CommandContext ctx) |
protected org.jboss.dmr.ModelNode |
getOperationDescription(CommandContext ctx,
String operationName) |
protected void |
handleResponse(CommandContext ctx,
org.jboss.dmr.ModelNode opResponse,
boolean composite) |
boolean |
hasArgument(int index)
Checks whether the command handler accepts an argument with the specified index.
|
boolean |
hasArgument(String name)
Checks whether the command handler recognizes the argument by the name.
|
protected org.jboss.dmr.ModelNode |
initRequest(CommandContext ctx) |
protected void |
printCommands(CommandContext ctx) |
protected void |
printHelp(CommandContext ctx) |
protected void |
printNodeDescription(CommandContext ctx) |
protected void |
printProperties(CommandContext ctx,
List<org.jboss.dmr.Property> props) |
isBatchModeaddHeaders, addRequiredPath, addRequiredPath, buildRequest, cliEvent, doHandle, getRequiredAddress, getRequiredType, isAvailable, isDependsOnProfile, setParamshandle, 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, List<String> excludeOperations)
public void addValueConverter(String propertyName, ArgumentValueConverter converter)
public void addValueCompleter(String propertyName, CommandLineCompleter completer)
public Collection<CommandArgument> getArguments(CommandContext ctx)
CommandHandlergetArguments in interface CommandHandlergetArguments in class CommandHandlerWithArgumentsctx - current command line contextpublic boolean hasArgument(String name)
CommandHandlerhasArgument in interface CommandHandlerhasArgument in class CommandHandlerWithArgumentsname - argument name to checkpublic boolean hasArgument(int index)
CommandHandlerhasArgument in interface CommandHandlerhasArgument in class CommandHandlerWithArgumentsindex - argument index to checkpublic void addArgument(CommandArgument arg)
addArgument in class BaseOperationCommandpublic org.jboss.dmr.ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException
buildRequestWithoutHeaders in class BaseOperationCommandCommandFormatExceptionprotected 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 org.jboss.dmr.ModelNode buildWritePropertyRequest(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected org.jboss.dmr.ModelNode buildOperationRequest(CommandContext ctx, String operation) throws CommandFormatException
CommandFormatExceptionprotected void printHelp(CommandContext ctx) throws CommandFormatException
printHelp in class CommandHandlerWithHelpCommandFormatExceptionprotected void printProperties(CommandContext ctx, List<org.jboss.dmr.Property> props)
protected void printNodeDescription(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected void printCommands(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected List<org.jboss.dmr.Property> getNodeProperties(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected org.jboss.dmr.ModelNode getOperationDescription(CommandContext ctx, String operationName) throws CommandFormatException
CommandFormatExceptionprotected org.jboss.dmr.ModelNode initRequest(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.