DBVIEW
org.dbview.addons.AddOnCatalog Class Reference
Inheritance diagram for org.dbview.addons.AddOnCatalog:
Collaboration diagram for org.dbview.addons.AddOnCatalog:

List of all members.

Public Member Functions

 AddOnCatalog (String in_resource_name, ArrayList< String > in_adaptors_list, Pattern in_pattern) throws Exception
String toString ()
Enumeration< String > getTargets () throws Exception
String getPackage (String in_add_on_name) throws AddOnCatalogException
Object getAdaptor (String in_target_name, String in_adaptor_name) throws AddOnCatalogException

Static Public Member Functions

static String fromCli (String in_cli_name)
static String toCli (String in_real_name)

Private Member Functions

Boolean __isOk ()

Private Attributes

Hashtable< String, AddOn__addons = null
ArrayList< String > __adaptors_list = null

Detailed Description

The class is a base class for all add-on catalogues.

  • An add-on is represented by a package.
  • An add-on exports adaptors that are interfaces to the add-on's environment.
  • An add-on's adaptors are located in the add-on's package.
  • Add-ons are regrouped into JAR files.
  • A catalogue lists all add-ons located in a given JAR file.
Author:
Denis Beurive

Definition at line 48 of file AddOnCatalog.java.


Constructor & Destructor Documentation

org.dbview.addons.AddOnCatalog.AddOnCatalog ( String  in_resource_name,
ArrayList< String >  in_adaptors_list,
Pattern  in_pattern 
) throws Exception

Create a catalogue of add-ons.

Parameters:
in_resource_nameName of the resource that contains the add-ons (this is a JAR).
in_adaptors_listList of adaptors that must be part of the add-on's package.
in_patternRegular expression that is used to recognize an add-on.
Exceptions:
Exception

Definition at line 82 of file AddOnCatalog.java.


Member Function Documentation

Boolean org.dbview.addons.AddOnCatalog.__isOk ( ) [private]

Check the list of detected adaptors, for all add-ons in the catalogue.

Returns:
If the list of detected adaptors is valid, then the function returns the value TRUE. Otherwise the function returns the value fALSE.

Definition at line 199 of file AddOnCatalog.java.

Referenced by org.dbview.addons.AddOnCatalog.AddOnCatalog().

static String org.dbview.addons.AddOnCatalog.fromCli ( String  in_cli_name) [static]

This method converts an add-on name, given from the command line interface, into its internal representation.

Parameters:
in_cli_nameName of the add-on, as given by the command line.
Returns:
The method returns the internal name of the add-on.

Definition at line 293 of file AddOnCatalog.java.

Referenced by org.dbview.addons.AddOnCatalog.getAdaptor().

Object org.dbview.addons.AddOnCatalog.getAdaptor ( String  in_target_name,
String  in_adaptor_name 
) throws AddOnCatalogException

This method returns an instance of a given adaptor's, for a given add-on.

Parameters:
in_target_nameName of the add-on to which the adaptor belongs. Please note that this name may contain dashes. This string will be converted into "Lower Camel Case".
in_adaptor_nameName of the adaptor to create.
Returns:
The method returns a new instance of the required adaptor.
Exceptions:
AddOnCatalogException

Definition at line 242 of file AddOnCatalog.java.

Referenced by org.dbview.input_addons.ProfilesRepository.getProfileInstance().

String org.dbview.addons.AddOnCatalog.getPackage ( String  in_add_on_name) throws AddOnCatalogException

This method returns the name of the package that contains adaptors' implementations for a given add-on (that is: the add-on's package).

Parameters:
in_add_on_nameName of the add-on.
Returns:
This method returns the name of the package that contains adaptors' implementations for the given add-on.
Exceptions:
Exception

Definition at line 221 of file AddOnCatalog.java.

Enumeration<String> org.dbview.addons.AddOnCatalog.getTargets ( ) throws Exception

This method returns the list of all add-ons found in the catalog.

Returns:
This method returns the list of all add-ons found in the catalog.
Exceptions:
Exception

Definition at line 184 of file AddOnCatalog.java.

Referenced by org.dbview.addons.AddOnCatalog.toString().

static String org.dbview.addons.AddOnCatalog.toCli ( String  in_real_name) [static]

This method converts an add-on name into its CLI name.

Parameters:
in_real_name"Internal" name of the add-on.
Returns:
The method returns the CLI name of the add-on.

Definition at line 303 of file AddOnCatalog.java.

String org.dbview.addons.AddOnCatalog.toString ( )

The method produces a string that represents the catalogue.

Note:
This method is used to debug the application.
Returns:
The method returns a string that represents the catalogue.

Definition at line 148 of file AddOnCatalog.java.


Member Data Documentation

ArrayList<String> org.dbview.addons.AddOnCatalog.__adaptors_list = null [private]

This array contains the expected list of adaptors' names. This array is used to check that all add-ons present all the mandatory adaptors.

Definition at line 69 of file AddOnCatalog.java.

Referenced by org.dbview.addons.AddOnCatalog.__isOk(), and org.dbview.addons.AddOnCatalog.AddOnCatalog().

Hashtable<String, AddOn> org.dbview.addons.AddOnCatalog.__addons = null [private]

This hash table lists all add-ons declared in the given resource. Each add-on is associated to its adaptors.

  • Key: Name of the add-on.
  • Value: See class AddDon. It defines the following data:
    • The name of the package in which the add-on is declared.
    • The list of adaptors declared for the add-on.

Definition at line 63 of file AddOnCatalog.java.

Referenced by org.dbview.addons.AddOnCatalog.AddOnCatalog(), org.dbview.addons.AddOnCatalog.getAdaptor(), org.dbview.addons.AddOnCatalog.getPackage(), org.dbview.addons.AddOnCatalog.getTargets(), and org.dbview.addons.AddOnCatalog.toString().


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