Class AbstractCommand
- java.lang.Object
-
- org.apache.jackrabbit.vault.util.console.commands.AbstractCommand
-
- All Implemented Interfaces:
CliCommand
- Direct Known Subclasses:
AbstractConsoleCommand
,CmdConsole
,CmdHello
,CmdHelp
public abstract class AbstractCommand extends Object implements CliCommand
AbstractCommand
...
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.vault.util.console.CliCommand
OPT_QUIET, OPT_VERBOSE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.apache.commons.cli2.option.Command
createCommand()
protected abstract void
doExecute(ExecutionContext ctx, org.apache.commons.cli2.CommandLine cl)
boolean
execute(ExecutionContext ctx, org.apache.commons.cli2.CommandLine cl)
org.apache.commons.cli2.Option
getCommand()
String
getExample()
String
getLongDescription()
String
getName()
boolean
hasName(String name)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.vault.util.console.CliCommand
getShortDescription
-
-
-
-
Method Detail
-
execute
public boolean execute(ExecutionContext ctx, org.apache.commons.cli2.CommandLine cl) throws Exception
- Specified by:
execute
in interfaceCliCommand
- Throws:
Exception
-
getCommand
public org.apache.commons.cli2.Option getCommand()
- Specified by:
getCommand
in interfaceCliCommand
-
hasName
public boolean hasName(String name)
- Specified by:
hasName
in interfaceCliCommand
-
getName
public String getName()
- Specified by:
getName
in interfaceCliCommand
-
getLongDescription
public String getLongDescription()
- Specified by:
getLongDescription
in interfaceCliCommand
-
getExample
public String getExample()
- Specified by:
getExample
in interfaceCliCommand
-
doExecute
protected abstract void doExecute(ExecutionContext ctx, org.apache.commons.cli2.CommandLine cl) throws Exception
- Throws:
Exception
-
createCommand
protected abstract org.apache.commons.cli2.option.Command createCommand()
-
-