Package org.jboss.as.cli.handlers
Class DeploymentOverlayHandler
- java.lang.Object
-
- org.jboss.as.cli.handlers.CommandHandlerWithArguments
-
- org.jboss.as.cli.handlers.CommandHandlerWithHelp
-
- org.jboss.as.cli.handlers.BaseOperationCommand
-
- org.jboss.as.cli.handlers.BatchModeCommandHandler
-
- org.jboss.as.cli.handlers.DeploymentOverlayHandler
-
- All Implemented Interfaces:
CliEventListener,CommandHandler,OperationCommand
public class DeploymentOverlayHandler extends BatchModeCommandHandler
- Author:
- Alexey Loubyansky
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.cli.OperationCommand
OperationCommand.HandledRequest
-
-
Field Summary
-
Fields inherited from class org.jboss.as.cli.handlers.BaseOperationCommand
accessRequirement, headers, params, requiredAddress
-
Fields inherited from class org.jboss.as.cli.handlers.CommandHandlerWithHelp
helpArg
-
-
Constructor Summary
Constructors Constructor Description DeploymentOverlayHandler(CommandContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jboss.dmr.ModelNodeadd(CommandContext ctx, boolean stream)protected voidaddAddRedeployLinksSteps(CommandContext ctx, org.jboss.dmr.ModelNode steps, String overlay, String serverGroup, String[] links, boolean regexp)protected voidassertNotPresent(ArgumentWithoutValue arg, ParsedCommandLine args)protected org.jboss.dmr.ModelNodebuildRequestWithoutHeaders(CommandContext ctx)protected voiddoHandle(CommandContext ctx)protected List<String>filterLinks(org.jboss.dmr.ModelNode linkResources)protected String[]getLinks(ArgumentWithValue linksArg, ParsedCommandLine args)protected List<String>getServerGroupsToLink(CommandContext ctx)booleanisBatchMode(CommandContext ctx)Whether the command supports batch mode or not.protected org.jboss.dmr.ModelNodelink(CommandContext ctx)protected voidlistContent(CommandContext ctx)protected voidlistLinks(CommandContext ctx)protected List<String>loadContentFor(ModelControllerClient client, String overlay)protected org.jboss.dmr.ModelNodeloadLinkResources(ModelControllerClient client, String overlay, String serverGroup)protected List<String>loadLinks(ModelControllerClient client, String overlay, String serverGroup)protected org.jboss.dmr.ModelNoderedeployAffected(CommandContext ctx)protected org.jboss.dmr.ModelNoderemove(CommandContext ctx)protected AccessRequirementsetupAccessRequirement(CommandContext ctx)protected org.jboss.dmr.ModelNodeupload(CommandContext ctx, boolean stream)-
Methods inherited from class org.jboss.as.cli.handlers.BaseOperationCommand
addArgument, addHeaders, addRequiredPath, addRequiredPath, buildRequest, buildRequestWOValidation, cliEvent, displayResponseHeaders, getAttachments, getRequiredAddress, getRequiredType, handleAttachedFile, handleResponse, handleResponse, isAddressValid, isAvailable, isDependsOnProfile, setParams
-
Methods inherited from class org.jboss.as.cli.handlers.CommandHandlerWithHelp
displayHelp, handle, printHelp, printList
-
Methods inherited from class org.jboss.as.cli.handlers.CommandHandlerWithArguments
getArgument, getArguments, getArgumentsMap, hasArgument, hasArgument, recognizeArguments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.as.cli.CommandHandler
getArgument, getArguments, handle, hasArgument, hasArgument
-
Methods inherited from interface org.jboss.as.cli.OperationCommand
buildHandledRequest, buildRequest
-
-
-
-
Constructor Detail
-
DeploymentOverlayHandler
public DeploymentOverlayHandler(CommandContext ctx)
-
-
Method Detail
-
setupAccessRequirement
protected AccessRequirement setupAccessRequirement(CommandContext ctx)
- Overrides:
setupAccessRequirementin classBaseOperationCommand
-
isBatchMode
public boolean isBatchMode(CommandContext ctx)
Description copied from interface:CommandHandlerWhether the command supports batch mode or not. The result could depend on the context, e.g. it won't make sense to add 'some_command --help' to a batch.- Specified by:
isBatchModein interfaceCommandHandler- Overrides:
isBatchModein classBatchModeCommandHandler- Parameters:
ctx- the current context- Returns:
- true if the command can be added to the batch, otherwise - false.
-
doHandle
protected void doHandle(CommandContext ctx) throws CommandLineException
- Overrides:
doHandlein classBaseOperationCommand- Throws:
CommandLineException
-
buildRequestWithoutHeaders
protected org.jboss.dmr.ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException
- Specified by:
buildRequestWithoutHeadersin classBaseOperationCommand- Throws:
CommandFormatException
-
redeployAffected
protected org.jboss.dmr.ModelNode redeployAffected(CommandContext ctx) throws CommandLineException
- Throws:
CommandLineException
-
listLinks
protected void listLinks(CommandContext ctx) throws CommandLineException
- Throws:
CommandLineException
-
listContent
protected void listContent(CommandContext ctx) throws CommandLineException
- Throws:
CommandLineException
-
remove
protected org.jboss.dmr.ModelNode remove(CommandContext ctx) throws CommandLineException
- Throws:
CommandLineException
-
add
protected org.jboss.dmr.ModelNode add(CommandContext ctx, boolean stream) throws CommandLineException
- Throws:
CommandLineException
-
link
protected org.jboss.dmr.ModelNode link(CommandContext ctx) throws CommandLineException
- Throws:
CommandLineException
-
upload
protected org.jboss.dmr.ModelNode upload(CommandContext ctx, boolean stream) throws CommandLineException
- Throws:
CommandLineException
-
loadContentFor
protected List<String> loadContentFor(ModelControllerClient client, String overlay) throws CommandLineException
- Throws:
CommandLineException
-
loadLinks
protected List<String> loadLinks(ModelControllerClient client, String overlay, String serverGroup) throws CommandLineException
- Throws:
CommandLineException
-
loadLinkResources
protected org.jboss.dmr.ModelNode loadLinkResources(ModelControllerClient client, String overlay, String serverGroup) throws CommandLineException
- Throws:
CommandLineException
-
getLinks
protected String[] getLinks(ArgumentWithValue linksArg, ParsedCommandLine args) throws CommandFormatException
- Throws:
CommandFormatException
-
getServerGroupsToLink
protected List<String> getServerGroupsToLink(CommandContext ctx) throws CommandFormatException
- Throws:
CommandFormatException
-
addAddRedeployLinksSteps
protected void addAddRedeployLinksSteps(CommandContext ctx, org.jboss.dmr.ModelNode steps, String overlay, String serverGroup, String[] links, boolean regexp) throws CommandLineException
- Throws:
CommandLineException
-
assertNotPresent
protected void assertNotPresent(ArgumentWithoutValue arg, ParsedCommandLine args) throws CommandFormatException
- Throws:
CommandFormatException
-
-