Package org.jboss.as.cli.handlers.batch
Class BatchRemoveLineHandler
- java.lang.Object
-
- org.jboss.as.cli.handlers.CommandHandlerWithArguments
-
- org.jboss.as.cli.handlers.CommandHandlerWithHelp
-
- org.jboss.as.cli.handlers.batch.BatchRemoveLineHandler
-
- All Implemented Interfaces:
CommandHandler
public class BatchRemoveLineHandler extends CommandHandlerWithHelp
- Author:
- Alexey Loubyansky
-
-
Field Summary
-
Fields inherited from class org.jboss.as.cli.handlers.CommandHandlerWithHelp
helpArg
-
-
Constructor Summary
Constructors Constructor Description BatchRemoveLineHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoHandle(CommandContext ctx)booleanhasArgument(CommandContext ctx, int index)Checks whether the command handler accepts an argument with the specified index.booleanisAvailable(CommandContext ctx)Checks whether the command is available in the current context (e.g. some commands require connection with the controller, some are available only in the batch mode, etc)-
Methods inherited from class org.jboss.as.cli.handlers.CommandHandlerWithHelp
displayHelp, handle, isBatchMode, printHelp, printList
-
Methods inherited from class org.jboss.as.cli.handlers.CommandHandlerWithArguments
addArgument, getArgument, getArguments, getArgumentsMap, hasArgument, recognizeArguments
-
-
-
-
Method Detail
-
isAvailable
public boolean isAvailable(CommandContext ctx)
Description copied from interface:CommandHandlerChecks whether the command is available in the current context (e.g. some commands require connection with the controller, some are available only in the batch mode, etc)- Specified by:
isAvailablein interfaceCommandHandler- Overrides:
isAvailablein classCommandHandlerWithHelp- Parameters:
ctx- current context- Returns:
- true if the command can be executed in the current context, false - otherwise.
-
doHandle
protected void doHandle(CommandContext ctx) throws CommandFormatException
- Specified by:
doHandlein classCommandHandlerWithHelp- Throws:
CommandFormatException
-
hasArgument
public boolean hasArgument(CommandContext ctx, int index)
Description copied from interface:CommandHandlerChecks whether the command handler accepts an argument with the specified index.- Specified by:
hasArgumentin interfaceCommandHandler- Overrides:
hasArgumentin classCommandHandlerWithArguments- Parameters:
ctx- the current contextindex- argument index to check- Returns:
- true if the handler accepts an argument with the specified index, otherwise - false.
-
-