DBVIEW
org.dbview.adapter.AbstractCli Class Reference
Inheritance diagram for org.dbview.adapter.AbstractCli:

List of all members.

Public Member Functions

abstract OptionContainer getOptionsContainer ()
abstract ArrayList< CliParametergetOptions ()
Element getConf (String[] in_vargs, Boolean in_strict, Boolean in_set_default) throws CliException

Protected Member Functions

abstract ArrayList< Element > _getConf_ (String[] in_vargs, Boolean in_strict, Boolean in_set_default) throws CliException

Detailed Description

This class is a base class for all command line interface (CLI) adaptors. A command line interface adaptor parses the command line and returns an XML document. The returned XML document is provided to all adaptors that need configuration Please note that the returned XML representation is independent from the user interface (CLI, GUI...) used to get the configuration.

Author:
Denis BEURIVE

Definition at line 39 of file AbstractCli.java.


Member Function Documentation

abstract ArrayList<Element> org.dbview.adapter.AbstractCli._getConf_ ( String[]  in_vargs,
Boolean  in_strict,
Boolean  in_set_default 
) throws CliException [protected, pure virtual]

This method returns the information extracted from the command line.

Parameters:
in_vargsThe command line arguments.
in_strictThis parameter indicates whether the CLI parser should check the presence of mandatory options, or not.
  • TRUE: Check the presence of mandatory options.
  • FALSE: Does not check the presence of mandatory options.
in_set_defaultThis parameter indicates whether the method should set default values or not.
  • TRUE: Set default values. When adding a new profile, you should activate the assignment of default values.
  • FALSE: Does not set default values. When updating a profile, you should deactivate the assignment of default values.
Returns:
The method returns the information extracted from the command line. The configuration is represented by a list of XML elements. Each element of the returned list will be included in the XML representation of the configuration.

Implemented in org.dbview.addons.output.table.dotFull.Cli, org.dbview.addons.output.table.dotLight.Cli, org.dbview.addons.output.table.dotMedium.Cli, and org.dbview.addons.input.mysql.Cli.

Referenced by org.dbview.adapter.AbstractCli.getConf().

Element org.dbview.adapter.AbstractCli.getConf ( String[]  in_vargs,
Boolean  in_strict,
Boolean  in_set_default 
) throws CliException

This method returns an XML document that represents the command line.

Parameters:
in_vargsThe command line arguments.
in_strictThis parameter indicates whether the CLI parser should check the presence of mandatory options, or not.
  • TRUE: Check the presence of mandatory options.
  • FALSE: Does not check the presence of mandatory options.
in_set_defaultThis parameter indicates whether the method should set default values or not.
  • TRUE: Set default values. When adding a new profile, you should activate the assignment of default values.
  • FALSE: Does not set default values. When updating a profile, you should deactivate the assignment of default values.
Returns:
The method returns the extracted information. The returned structure is a XML element identified by the tag "data". Example: <data><login>...</login><password>...</password></data>

Definition at line 82 of file AbstractCli.java.

abstract ArrayList<CliParameter> org.dbview.adapter.AbstractCli.getOptions ( ) [pure virtual]

This method returns the description of the command line expected by this adaptor.

Remarks:
This method is only used when the user requires to print the help.
Returns:
The method returns an array of command line parameter's descriptions.

Implemented in org.dbview.addons.input.mysql.Cli, org.dbview.addons.output.table.dotLight.Cli, org.dbview.addons.output.table.dotFull.Cli, and org.dbview.addons.output.table.dotMedium.Cli.

Referenced by org.dbview.runtime.actions.Actions.helpInputAddOn(), and org.dbview.runtime.actions.Actions.helpOutputAddOn().

abstract OptionContainer org.dbview.adapter.AbstractCli.getOptionsContainer ( ) [pure virtual]

Return the command line options container.

Remarks:
See Args4j. The command line options are declared in a class. We call this class the command line options container
Note:
The returned container is mainly used to detect unexpected arguments in the command line.
Returns:
The method returns the command line options container.

Implemented in org.dbview.addons.output.table.dotFull.Cli, org.dbview.addons.output.table.dotLight.Cli, org.dbview.addons.output.table.dotMedium.Cli, and org.dbview.addons.input.mysql.Cli.


The documentation for this class was generated from the following file: