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 |
buildRequest(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) |
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, 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)
getArguments in interface CommandHandlergetArguments in class CommandHandlerWithArgumentspublic 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 buildRequest(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected void handleResponse(CommandContext ctx, org.jboss.dmr.ModelNode opResponse, boolean composite)
handleResponse in class BaseOperationCommandprotected StringBuilder formatResponse(CommandContext ctx, org.jboss.dmr.ModelNode opResponse, boolean composite, StringBuilder buf)
protected 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)
printHelp in class CommandHandlerWithHelpprotected void printProperties(CommandContext ctx, List<org.jboss.dmr.Property> props)
protected void printNodeDescription(CommandContext ctx)
protected void printCommands(CommandContext ctx)
protected List<org.jboss.dmr.Property> getNodeProperties(CommandContext ctx)
protected org.jboss.dmr.ModelNode getOperationDescription(CommandContext ctx, String operationName) throws IOException
IOExceptionprotected org.jboss.dmr.ModelNode initRequest(CommandContext ctx)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.