gov.bnl.gums.command
Class AbstractCommand

java.lang.Object
  extended by gov.bnl.gums.command.AbstractCommand
Direct Known Subclasses:
RemoteCommand

public abstract class AbstractCommand
extends Object

Class to provide general command line utilities such as argument parsing and authentication

Author:
Gabriele Carcassi, Jay Packard

Field Summary
protected static AbstractCommand command
           
protected  String commandName
           
protected  String description
           
protected  boolean failOnArguments
           
protected  String syntax
           
 
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(String[] args)
           
protected  void failForWrongParameters(String message)
           
protected  String getClientDN()
           
protected abstract  GUMSAPI getGums(String gumsUrl)
           
protected  boolean isUsingProxy()
           
static void main(String[] args)
           
protected  org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, 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
 

Field Detail

command

protected static AbstractCommand command

commandName

protected String commandName

syntax

protected String syntax

description

protected String description

failOnArguments

protected boolean failOnArguments
Constructor Detail

AbstractCommand

public AbstractCommand()
Creates a new AbstractWebCommand object.

Method Detail

main

public static void main(String[] args)

buildOptions

protected abstract org.apache.commons.cli.Options buildOptions()

execute

protected abstract void execute(org.apache.commons.cli.CommandLine cmd)
                         throws Exception
Throws:
Exception

execute

protected void execute(String[] args)

failForWrongParameters

protected void failForWrongParameters(String message)

getClientDN

protected String getClientDN()

getGums

protected abstract GUMSAPI getGums(String gumsUrl)

isUsingProxy

protected boolean isUsingProxy()

parse

protected org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options,
                                                   String[] args)

printHelp

protected void printHelp(org.apache.commons.cli.Options options)


Copyright © 2004-2009. All Rights Reserved.