public abstract class BaseOperationCommand extends CommandHandlerWithHelp implements OperationCommand, CliEventListener
| Modifier and Type | Field and Description |
|---|---|
protected AccessRequirement |
accessRequirement |
protected ArgumentWithValue |
headers |
protected List<RequestParameterArgument> |
params |
protected OperationRequestAddress |
requiredAddress |
helpArg| Constructor and Description |
|---|
BaseOperationCommand(CommandContext ctx,
String command,
boolean connectionRequired) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(CommandArgument arg) |
protected void |
addHeaders(CommandContext ctx,
org.jboss.dmr.ModelNode request) |
protected void |
addRequiredPath(OperationRequestAddress requiredPath)
Adds a node path which is required to exist before the command can be used.
|
protected void |
addRequiredPath(String requiredPath)
Adds a node path which is required to exist before the command can be used.
|
org.jboss.dmr.ModelNode |
buildRequest(CommandContext ctx) |
protected abstract org.jboss.dmr.ModelNode |
buildRequestWithoutHeaders(CommandContext ctx) |
protected org.jboss.dmr.ModelNode |
buildRequestWOValidation(CommandContext ctx) |
void |
cliEvent(CliEvent event,
CommandContext ctx) |
protected void |
displayResponseHeaders(CommandContext ctx,
org.jboss.dmr.ModelNode response) |
protected void |
doHandle(CommandContext ctx) |
protected OperationRequestAddress |
getRequiredAddress() |
protected String |
getRequiredType() |
protected void |
handleResponse(CommandContext ctx,
org.jboss.dmr.ModelNode response,
boolean composite) |
protected boolean |
isAddressValid(CommandContext ctx) |
boolean |
isAvailable(CommandContext ctx)
Checks whether the command is available in the current context
(e.g.
|
protected boolean |
isDependsOnProfile() |
protected void |
setParams(CommandContext ctx,
org.jboss.dmr.ModelNode request) |
protected AccessRequirement |
setupAccessRequirement(CommandContext ctx) |
handle, isBatchMode, printHelp, printListgetArgument, getArguments, hasArgument, hasArgument, recognizeArgumentsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArgument, getArguments, handle, hasArgument, hasArgument, isBatchModeprotected List<RequestParameterArgument> params
protected OperationRequestAddress requiredAddress
protected final ArgumentWithValue headers
protected AccessRequirement accessRequirement
public BaseOperationCommand(CommandContext ctx, String command, boolean connectionRequired)
protected AccessRequirement setupAccessRequirement(CommandContext ctx)
protected void addRequiredPath(String requiredPath)
requiredPath - node path which is required to exist before the command can be used.protected void addRequiredPath(OperationRequestAddress requiredPath)
requiredPath - node path which is required to exist before the command can be used.protected boolean isDependsOnProfile()
protected OperationRequestAddress getRequiredAddress()
protected String getRequiredType()
public boolean isAvailable(CommandContext ctx)
CommandHandlerisAvailable in interface CommandHandlerisAvailable in class CommandHandlerWithHelpctx - current contextprotected boolean isAddressValid(CommandContext ctx)
public void cliEvent(CliEvent event, CommandContext ctx)
cliEvent in interface CliEventListenerprotected void doHandle(CommandContext ctx) throws CommandLineException
doHandle in class CommandHandlerWithHelpCommandLineExceptionpublic org.jboss.dmr.ModelNode buildRequest(CommandContext ctx) throws CommandFormatException
buildRequest in interface OperationCommandCommandFormatExceptionprotected org.jboss.dmr.ModelNode buildRequestWOValidation(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected abstract org.jboss.dmr.ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected void addHeaders(CommandContext ctx, org.jboss.dmr.ModelNode request) throws CommandFormatException
CommandFormatExceptionprotected void handleResponse(CommandContext ctx, org.jboss.dmr.ModelNode response, boolean composite) throws CommandLineException
CommandLineExceptionprotected void displayResponseHeaders(CommandContext ctx, org.jboss.dmr.ModelNode response)
public void addArgument(CommandArgument arg)
addArgument in class CommandHandlerWithArgumentsprotected void setParams(CommandContext ctx, org.jboss.dmr.ModelNode request) throws CommandFormatException
CommandFormatExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.