Class CommandHelp
- java.lang.Object
-
- ch.systemsx.cisd.openbis.dss.client.api.cli.AbstractCommand<ch.systemsx.cisd.openbis.dss.client.api.cli.CommandHelp.CommandHelpArguments>
-
- ch.systemsx.cisd.openbis.dss.client.api.cli.CommandHelp
-
- All Implemented Interfaces:
ICommand
public class CommandHelp extends AbstractCommand<ch.systemsx.cisd.openbis.dss.client.api.cli.CommandHelp.CommandHelpArguments>
Command that gives help about the program and other commands.
-
-
Field Summary
-
Fields inherited from class ch.systemsx.cisd.openbis.dss.client.api.cli.AbstractCommand
arguments, parser
-
-
Constructor Summary
Constructors Constructor Description CommandHelp(ICommandFactory factory, java.lang.String programCallString)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultCode
execute(java.lang.String[] args)
Calls thisICommand
with givenarguments
.java.lang.String
getName()
Returns the name of this command.protected java.lang.String
getProgramCallString()
How is this program invoked from the command line?protected java.lang.String
getRequiredArgumentsString()
What are the required arguments?void
printUsage(java.io.PrintStream out)
Print usage information about the command.-
Methods inherited from class ch.systemsx.cisd.openbis.dss.client.api.cli.AbstractCommand
getArguments, getCommandCallString, getParser, getUsagePrefixString
-
-
-
-
Constructor Detail
-
CommandHelp
public CommandHelp(ICommandFactory factory, java.lang.String programCallString)
-
-
Method Detail
-
execute
public ResultCode execute(java.lang.String[] args) throws ch.systemsx.cisd.common.exceptions.UserFailureException, ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
Description copied from interface:ICommand
Calls thisICommand
with givenarguments
.The arguments are the
Note that this method is expected to throw givenmain(String[])
method ones.RuntimeException
(unchecked) exceptions. So do not catch them and let the caller handle them.- Returns:
- exit code, will be used in
System.exit()
. - Throws:
ch.systemsx.cisd.common.exceptions.UserFailureException
ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
-
getName
public java.lang.String getName()
Description copied from interface:ICommand
Returns the name of this command.On the client side, this
ICommand
is registered with this name. This is kind of unique identifier of thisICommand
.
-
printUsage
public void printUsage(java.io.PrintStream out)
Description copied from class:AbstractCommand
Print usage information about the command.- Specified by:
printUsage
in interfaceICommand
- Overrides:
printUsage
in classAbstractCommand<ch.systemsx.cisd.openbis.dss.client.api.cli.CommandHelp.CommandHelpArguments>
- Parameters:
out
- The stream to which help is printed
-
getProgramCallString
protected java.lang.String getProgramCallString()
Description copied from class:AbstractCommand
How is this program invoked from the command line?- Specified by:
getProgramCallString
in classAbstractCommand<ch.systemsx.cisd.openbis.dss.client.api.cli.CommandHelp.CommandHelpArguments>
-
getRequiredArgumentsString
protected java.lang.String getRequiredArgumentsString()
Description copied from class:AbstractCommand
What are the required arguments?- Specified by:
getRequiredArgumentsString
in classAbstractCommand<ch.systemsx.cisd.openbis.dss.client.api.cli.CommandHelp.CommandHelpArguments>
-
-