| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.service.resource.config.FileBasedActivitiesConfig
Activity configuration details read from a configuration file.
| Field Summary | |
| private static java.lang.String | COPYRIGHT_NOTICECopyright statement | 
| private static DAILogger | DAILOG | 
| private  ActivityConfig[] | mActivities | 
| private  org.w3c.dom.Document | mBasePerformDocumentSchema | 
| Constructor Summary | |
| FileBasedActivitiesConfig(java.io.File configFile)Reads the activities configuration from the specified file. | |
| Method Summary | |
| private  ActivityConfig | getActivityConfig(org.w3c.dom.Element activityElement,
                  java.lang.String configBase,
                  java.lang.String schemaBase)Constructs the activity configuration associated with a single activity. | 
|  ActivityConfig[] | getActivityConfigs()Gets the configuration details of each of the activities. | 
| private  ActivityConfig[] | getActivityConfigs(org.w3c.dom.Document configDoc)Gets the array of configuration details associated with each activity. | 
|  org.w3c.dom.Document | getBasePerformDocumentSchema()Gets the XSD schema document that describes the base schema of the perform document. | 
| private  org.w3c.dom.Document | getBasePerformDocumentSchema(org.w3c.dom.Document configDoc)Extracts the base perform document schema from the configuration document. | 
| private  org.w3c.dom.Document | getConfigFileAsDocument(java.io.File configFile)Gets the configuration file as a DOM document. | 
| private  java.util.Properties | getProperties(org.w3c.dom.Element activityElement)Extracts the properties from the given activity configuration element. | 
| 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 final DAILogger DAILOG
private org.w3c.dom.Document mBasePerformDocumentSchema
private ActivityConfig[] mActivities
| Constructor Detail | 
public FileBasedActivitiesConfig(java.io.File configFile)
                          throws DAIFileContentError,
                                 XMLFileException
configFile - Absolute path to the activity config file.
XMLFileException - If the top level configuration file cannot be accessed.
DAIFileContentError - If there is an error in the contents of the top level configuration
           file or any of the other configuration files refered to.| Method Detail | 
public org.w3c.dom.Document getBasePerformDocumentSchema()
getBasePerformDocumentSchema in interface ActivitiesConfigpublic ActivityConfig[] getActivityConfigs()
getActivityConfigs in interface ActivitiesConfig
private org.w3c.dom.Document getConfigFileAsDocument(java.io.File configFile)
                                              throws DAIFileContentError,
                                                     XMLFileException
configFile - Absolute path to the configuration file.
XMLFileException - If the top level configuration file cannot be accessed.
DAIFileContentError - If there is an error in the contents of the top level configuration
           file or any of the other configuration files refered to.
private ActivityConfig[] getActivityConfigs(org.w3c.dom.Document configDoc)
                                     throws DAIMalformedURLException,
                                            DAIURLReadIOException,
                                            DAIURLContentException
configDoc - The top level activity configuration document.
DAIMalformedURLException - If a URL specified in the configuration document is malformed.
DAIURLReadIOException - If a URL specified in the configuration document cannot be
           read.
DAIURLContentException - If there is an error in the contents of a URL specified in
           the configuation document.
private ActivityConfig getActivityConfig(org.w3c.dom.Element activityElement,
                                         java.lang.String configBase,
                                         java.lang.String schemaBase)
                                  throws DAIMalformedURLException,
                                         DAIURLReadIOException,
                                         DAIURLContentException
activityElement - The element containing the activity configuration.configBase - The name of the configuration files base path or null if 
            none is specified.schemaBase - The name of the schema files base path or null if none is
            specified.
DAIMalformedURLException - If a URL specified in the configuration document is malformed.
DAIURLContentException - If there is an error in the contents of a URL specified in
           the configuation document.
DAIURLReadIOExceptionprivate java.util.Properties getProperties(org.w3c.dom.Element activityElement)
activityElement - Element with configuration of a single activity.
private org.w3c.dom.Document getBasePerformDocumentSchema(org.w3c.dom.Document configDoc)
                                                   throws DAIMalformedURLException,
                                                          DAIURLReadIOException,
                                                          DAIURLContentException
configDoc - Top level activity configuration document.
DAIMalformedURLException - If the URL that specified the location of the base
             schema document is malformed.
DAIURLReadIOException - If the URL that specified the location of the base
             schema document cannot be read.
DAIURLContentException - If there is an error in the contents of the URL
             specifiying the base perform document schema. For
             example the URL does not specify an XML document.| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||