uk.org.ogsadai.dataresource.conx
Class ConnectionManager

java.lang.Object
  |
  +--uk.org.ogsadai.dataresource.conx.ConnectionManager
Direct Known Subclasses:
FileSystemConnectionManager, SimpleJDBCConnectionManager, XMLDBConnectionManager

public abstract class ConnectionManager
extends java.lang.Object

This is an abstract interface that defines a class to represent a data resource and provide access to that resource.


Field Summary
protected  java.lang.String mDriverClass
           
protected static org.apache.log4j.Logger mLog
           
protected  java.lang.String mRoleMapClass
           
protected  RoleMapper mRoleMapper
           
protected  java.lang.String mURI
           
 
Constructor Summary
ConnectionManager(ConnectionConfig config)
          This method is used to encapsulate any initialization code that a particular concrete DataResource object might need.
 
Method Summary
protected  DatabaseRole mapCertificate(java.lang.String userCredentials)
          No doubt this method should belong to the concrete implementation since its specific to databases!
 void setRoleMapsFile(java.lang.String configFileName)
          Set the role maps to be the contents of the given file, saving this file location also.
protected  void setupRoleMapping()
           
 void updateRoleMaps()
          Reread the roleMaps file and update the roleMaps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLog

protected static org.apache.log4j.Logger mLog

mDriverClass

protected java.lang.String mDriverClass

mRoleMapClass

protected java.lang.String mRoleMapClass

mRoleMapper

protected RoleMapper mRoleMapper

mURI

protected java.lang.String mURI
Constructor Detail

ConnectionManager

public ConnectionManager(ConnectionConfig config)
                  throws CoreSystemException,
                         CoreUserException
This method is used to encapsulate any initialization code that a particular concrete DataResource object might need.

Parameters:
config - Configuration Information.
Method Detail

setRoleMapsFile

public void setRoleMapsFile(java.lang.String configFileName)
                     throws CoreSystemException,
                            CoreUserException
Set the role maps to be the contents of the given file, saving this file location also.

Parameters:
configFileName - - path to role maps file. If this is not an abolute path then the path is taken to be relative to the path in which the associated data resource configuration file resides.
Throws:
CoreSystemException - - if an internal problem occurs when reading the file.
CoreUserException - - if configFileName is null or does not point to a valid role maps file.

updateRoleMaps

public void updateRoleMaps()
                    throws CoreSystemException,
                           CoreUserException
Reread the roleMaps file and update the roleMaps.

Throws:
CoreSystemException - - if an internal problem occurs when reading the file.
CoreUserException - - if the file is no longer a valid role maps file.

setupRoleMapping

protected void setupRoleMapping()
                         throws CoreSystemException,
                                CoreUserException
CoreSystemException
CoreUserException

mapCertificate

protected DatabaseRole mapCertificate(java.lang.String userCredentials)
                               throws CoreSystemException,
                                      CoreUserException,
                                      AuthorisationException
No doubt this method should belong to the concrete implementation since its specific to databases!

CoreSystemException
CoreUserException
AuthorisationException