DBVIEW
org.dbview.input_addons.ProfilesRepository Class Reference
Collaboration diagram for org.dbview.input_addons.ProfilesRepository:

List of all members.

Static Public Member Functions

static void init () throws Exception
static void add (AbstractConfiguration in_profile) throws ProfilesRepositoryException, JDOMException, Exception
static void remove (AbstractConfiguration in_profile) throws ProfilesRepositoryException, JDOMException, Exception
static void remove (String in_name) throws ProfilesRepositoryException, JDOMException, Exception
static void update (AbstractConfiguration in_profile) throws ProfilesRepositoryException, JDOMException, Exception
static String print () throws Exception
static AbstractConfiguration getProfileInstance (String in_name) throws ConfigurationException, JDOMException, Exception
static ArrayList< String > getProfilesNames () throws JDOMException

Static Private Member Functions

static Element __getProfileByName (String in_name) throws JDOMException
static String __getProfileName (Element in_profile) throws Exception
static String __getProfileTarget (Element in_profile) throws Exception
static void __initFile () throws URISyntaxException, Exception
static void __write (Document in_doc) throws URISyntaxException, Exception
static void __setUpdateDateTimeToNow (Document in_doc)
static void __add (Element in_profile) throws ProfilesRepositoryException, JDOMException, Exception
static void __update (Element in_profile) throws ProfilesRepositoryException, JDOMException, Exception
static void __remove (Element in_profile) throws ProfilesRepositoryException, JDOMException, Exception

Static Private Attributes

static Document __profiles = null
static File __repository = null

Detailed Description

This class implements the profile's repository.

A profile is a set of value used by input add-ons to connect to their associated data source (Mysql...).

Author:
Denis BEURIVE

Definition at line 42 of file ProfilesRepository.java.


Member Function Documentation

static void org.dbview.input_addons.ProfilesRepository.__add ( Element  in_profile) throws ProfilesRepositoryException, JDOMException, Exception [static, private]

Add a new profile to the repository.

Parameters:
in_profileProfile to add.
Exceptions:
ProfilesRepositoryException
Exception

Definition at line 274 of file ProfilesRepository.java.

Referenced by org.dbview.input_addons.ProfilesRepository.__update(), and org.dbview.input_addons.ProfilesRepository.add().

static Element org.dbview.input_addons.ProfilesRepository.__getProfileByName ( String  in_name) throws JDOMException [static, private]

This method tries to locate a given profile given its name.

Parameters:
in_nameName of the profile to locate.
Returns:
If the profile, identified by the given name exists, then it is returned. Otherwise, the method returns the value null.
Exceptions:
JDOMException

Definition at line 195 of file ProfilesRepository.java.

Referenced by org.dbview.input_addons.ProfilesRepository.__add(), org.dbview.input_addons.ProfilesRepository.getProfileInstance(), and org.dbview.input_addons.ProfilesRepository.remove().

static String org.dbview.input_addons.ProfilesRepository.__getProfileName ( Element  in_profile) throws Exception [static, private]

Given a profile, this method returns its name.

Parameters:
in_profileProfile.
Returns:
The method returns the profile's name.
Exceptions:
Exception

Definition at line 207 of file ProfilesRepository.java.

Referenced by org.dbview.input_addons.ProfilesRepository.__add(), and org.dbview.input_addons.ProfilesRepository.__remove().

static String org.dbview.input_addons.ProfilesRepository.__getProfileTarget ( Element  in_profile) throws Exception [static, private]

Given a profile, this method returns the name of the associated input add-on.

Parameters:
in_profileProfile.
Returns:
The method returns the name of the associated input add-on.
Exceptions:
Exception

Definition at line 220 of file ProfilesRepository.java.

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

static void org.dbview.input_addons.ProfilesRepository.__initFile ( ) throws URISyntaxException, Exception [static, private]

This method creates an instance of class "File" that points to the profiles' repository.

Exceptions:
URISyntaxException
Exception

Definition at line 232 of file ProfilesRepository.java.

Referenced by org.dbview.input_addons.ProfilesRepository.__write(), and org.dbview.input_addons.ProfilesRepository.init().

static void org.dbview.input_addons.ProfilesRepository.__remove ( Element  in_profile) throws ProfilesRepositoryException, JDOMException, Exception [static, private]

Given a profile, this method removes the profile from the repository.

Parameters:
in_profileThe profile to remove.
Exceptions:
ProfilesRepositoryException
JDOMException
Exception

Definition at line 315 of file ProfilesRepository.java.

Referenced by org.dbview.input_addons.ProfilesRepository.__update(), and org.dbview.input_addons.ProfilesRepository.remove().

static void org.dbview.input_addons.ProfilesRepository.__setUpdateDateTimeToNow ( Document  in_doc) [static, private]

This method sets the value of the (XML) attribute "updated" to the current date ant time.

Parameters:
in_docXML document to update (can be null!).
Warning:
The argument in_doc can be null.

Definition at line 262 of file ProfilesRepository.java.

Referenced by org.dbview.input_addons.ProfilesRepository.__add(), org.dbview.input_addons.ProfilesRepository.init(), and org.dbview.input_addons.ProfilesRepository.remove().

static void org.dbview.input_addons.ProfilesRepository.__update ( Element  in_profile) throws ProfilesRepositoryException, JDOMException, Exception [static, private]

Update a given profile.

Remarks:
The removal uses the name of the profile
Parameters:
in_profileNew profile.
Exceptions:
ProfilesRepositoryException
JDOMException
Exception

Definition at line 299 of file ProfilesRepository.java.

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

static void org.dbview.input_addons.ProfilesRepository.__write ( Document  in_doc) throws URISyntaxException, Exception [static, private]

This method writes the profiles to the file that contains the repository.

Parameters:
in_docXML document to write (can be null!).
Warning:
The argument in_doc can be null.
Exceptions:
URISyntaxException
Exception

Definition at line 246 of file ProfilesRepository.java.

Referenced by org.dbview.input_addons.ProfilesRepository.__add(), org.dbview.input_addons.ProfilesRepository.init(), and org.dbview.input_addons.ProfilesRepository.remove().

static void org.dbview.input_addons.ProfilesRepository.add ( AbstractConfiguration  in_profile) throws ProfilesRepositoryException, JDOMException, Exception [static]

Add a new profile to the repository.

Parameters:
in_profileProfile to add.
Exceptions:
ProfilesRepositoryException
Exception

Definition at line 89 of file ProfilesRepository.java.

static AbstractConfiguration org.dbview.input_addons.ProfilesRepository.getProfileInstance ( String  in_name) throws ConfigurationException, JDOMException, Exception [static]

Return an instance of a given profile's configuration's holder.

Remarks:
The returned instance is initialized using the XML representation extracted from the repository.
Parameters:
in_nameName of the profile.
Returns:
If the requested profile exists, then the method returns an instance of the configuration's holder. Otherwise, it returns the value null.

Definition at line 155 of file ProfilesRepository.java.

static ArrayList<String> org.dbview.input_addons.ProfilesRepository.getProfilesNames ( ) throws JDOMException [static]

This method returns the list of all profiles' names stored in the profiles' repository.

Returns:
The method returns the list of all profiles stored in the profiles' repository.
Exceptions:
JDOMException

Definition at line 172 of file ProfilesRepository.java.

static void org.dbview.input_addons.ProfilesRepository.init ( ) throws Exception [static]
static String org.dbview.input_addons.ProfilesRepository.print ( ) throws Exception [static]

Return a literal representation of the profiles' repository.

Returns:
Return a literal representation of the profiles' repository.

Definition at line 142 of file ProfilesRepository.java.

static void org.dbview.input_addons.ProfilesRepository.remove ( AbstractConfiguration  in_profile) throws ProfilesRepositoryException, JDOMException, Exception [static]

Given a profile, this method removes the associated profile from the repository.

Parameters:
in_profileProfile to remove.
Exceptions:
ProfilesRepositoryException
JDOMException
Exception

Definition at line 101 of file ProfilesRepository.java.

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

static void org.dbview.input_addons.ProfilesRepository.remove ( String  in_name) throws ProfilesRepositoryException, JDOMException, Exception [static]

Given a profit's name, this method removes the associated profile from the repository.

Parameters:
in_nameThe name of the profile to remove.
Exceptions:
ProfilesRepositoryException
JDOMException
Exception

Definition at line 113 of file ProfilesRepository.java.

static void org.dbview.input_addons.ProfilesRepository.update ( AbstractConfiguration  in_profile) throws ProfilesRepositoryException, JDOMException, Exception [static]

Update a given profile.

Remarks:
The removal uses the name of the profile
Parameters:
in_profileNew profile.
Exceptions:
ProfilesRepositoryException
JDOMException
Exception

Definition at line 133 of file ProfilesRepository.java.


Member Data Documentation


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