gov.bnl.gums.command
Class AbstractCommand
java.lang.Object
gov.bnl.gums.command.AbstractCommand
- Direct Known Subclasses:
- RemoteCommand
public abstract class AbstractCommand
- extends java.lang.Object
Class to provide general command line utilities such as
argument parsing and authentication
- Author:
- Gabriele Carcassi, Jay Packard
Constructor Summary |
AbstractCommand()
Creates a new AbstractWebCommand object. |
Method Summary |
protected abstract org.apache.commons.cli.Options |
buildOptions()
|
protected abstract void |
execute(org.apache.commons.cli.CommandLine cmd)
|
protected void |
execute(java.lang.String[] args)
|
protected void |
failForWrongParameters(java.lang.String message)
|
protected java.lang.String |
getClientDN()
|
protected abstract GUMSAPI |
getGums(java.lang.String gumsUrl)
|
protected boolean |
isUsingProxy()
|
static void |
main(java.lang.String[] args)
|
protected org.apache.commons.cli.CommandLine |
parse(org.apache.commons.cli.Options options,
java.lang.String[] args)
|
protected void |
printHelp(org.apache.commons.cli.Options options)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
command
protected static AbstractCommand command
commandName
protected java.lang.String commandName
syntax
protected java.lang.String syntax
description
protected java.lang.String description
failOnArguments
protected boolean failOnArguments
AbstractCommand
public AbstractCommand()
- Creates a new AbstractWebCommand object.
main
public static void main(java.lang.String[] args)
buildOptions
protected abstract org.apache.commons.cli.Options buildOptions()
execute
protected abstract void execute(org.apache.commons.cli.CommandLine cmd)
throws java.lang.Exception
- Throws:
java.lang.Exception
execute
protected void execute(java.lang.String[] args)
failForWrongParameters
protected void failForWrongParameters(java.lang.String message)
getClientDN
protected java.lang.String getClientDN()
getGums
protected abstract GUMSAPI getGums(java.lang.String gumsUrl)
isUsingProxy
protected boolean isUsingProxy()
parse
protected org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options,
java.lang.String[] args)
printHelp
protected void printHelp(org.apache.commons.cli.Options options)
Copyright © 2004-2008. All Rights Reserved.