|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.dataresource.DataResourceAccessorFactory
Factory to create data resource accessors.
Data resource accessor classes are specified within a data resource
accessor class configuration file
(dataResourceClassConfig.xml) within the
configuration files directory of the data service resource
that is to use the accessor. The class specified must implement the
PersistedDataResourceAccessor interface.
| Field Summary | |
private static java.lang.String |
CLASS_CONFIG_FILENAME
|
private static java.lang.String |
COPYRIGHT_NOTICE
|
private static DAILogger |
LOG
|
private static DataResourceAccessorFactory |
mStaticResourceFactory
|
| Constructor Summary | |
private |
DataResourceAccessorFactory()
Private constructor. |
| Method Summary | |
DataResourceAccessor |
createDataResourceAccessor(java.lang.String name,
java.io.File configDirectory)
Creates a new data resource accessor. |
private DataResourceAccessor |
createDataResourceAccessorInstance(java.lang.String name,
java.lang.String className)
Creates a new DataResourceAccessor object which is an
instance of the given class name. |
private java.lang.String |
getDataResourceClassName(java.lang.String name,
java.io.File configDirectory)
Gets the name of a data resource accessor class from a data resource accessor class configuration file. |
static DataResourceAccessorFactory |
getInstance()
Gets the singleton instance of this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static DAILogger LOG
private static DataResourceAccessorFactory mStaticResourceFactory
private static final java.lang.String CLASS_CONFIG_FILENAME
| Constructor Detail |
private DataResourceAccessorFactory()
Use getInstance() to obtain an instance of this class.
| Method Detail |
public static DataResourceAccessorFactory getInstance()
public DataResourceAccessor createDataResourceAccessor(java.lang.String name,
java.io.File configDirectory)
throws DataResourceAccessorConfigException,
DataResourceAccessorCreationException,
DataResourceAccessorMetaDataException,
DataResourceAccessorSetupException
The class implementing the data resource accessor is found
within a dataResourceClassConfig.xml file in the
given directory.
name - Name of the data service resource that will use this data
resource accessor.configDirectory - The directory containing the configuration files for the
data service resource.
DataResourceAccessorCreationException - if there is a
problem in reading the data resource accessor configuration
file or creating an instance of the data resource accessor.
DataResourceAccessorConfigException - if an
error occurs reading the configuration files for the data
resource accessor instance.
DataResourceAccessorMetaDataException - if an error
occurs when constructing data resource accessor meta data
properties.
DataResourceAccessorSetupException - if an error occurs
when setting up the data resource accessor after having read
the configuration files.
private java.lang.String getDataResourceClassName(java.lang.String name,
java.io.File configDirectory)
throws DataResourceAccessorCreationException
name - Name of the data service resource that will use this data
resource accessor.configDirectory - Directory holding data service resource configuration files
including the data resource accessor class configuration
file.
DataResourceAccessorCreationException - if there is a
problem in reading the data resource accessor configuration
file.
private DataResourceAccessor createDataResourceAccessorInstance(java.lang.String name,
java.lang.String className)
throws DataResourceAccessorCreationException
DataResourceAccessor object which is an
instance of the given class name. The specified class must
implement the DataResourceAccessor interface.
name - Name of the data service resource that will use this data
resource accessor.className - Name of data resource accessor class. This class must implement
the DataResourceAccessor interface.
DataResourceAccessorCreationException - if an instance of the data resource accessor cannot be
created.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||