org.jwarp.service.configuration
Class FileConfiguration

java.lang.Object
  |
  +--org.jwarp.service.configuration.AConfiguration
        |
        +--org.jwarp.service.configuration.FileConfiguration
All Implemented Interfaces:
IConfiguration, IFileConfiguration

public class FileConfiguration
extends AConfiguration
implements IFileConfiguration

Base configuration class implementing the file configuration interface.

Version:
1.0
Author:
Martin Schaefer, Anatole Tresch

Fields inherited from class org.jwarp.service.configuration.AConfiguration
checkModification, document, lastModified
 
Fields inherited from interface org.jwarp.service.configuration.IConfiguration
ELEM_CONFIG
 
Constructor Summary
FileConfiguration(java.lang.String fileName)
           
FileConfiguration(java.lang.String fileName, boolean checkModification)
           
 
Method Summary
 org.jdom.Document getDocument()
          Return the JDOM document of this configuration.
 java.lang.String getFileName()
          Return the name of the underlying configuration file
 void initDocument()
          Sets the JDOM document of this configuration.
 void reloadConfiguration()
          Sets the JDOM document of this configuration.
 void setFileName(java.lang.String fileName)
          Set the name of the underlying configuration file.
 
Methods inherited from class org.jwarp.service.configuration.AConfiguration
getRootElement, isCheckingModification, setCheckingModification
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jwarp.service.configuration.IConfiguration
getRootElement, isCheckingModification, setCheckingModification
 

Constructor Detail

FileConfiguration

public FileConfiguration(java.lang.String fileName)
                  throws ConfigurationException

FileConfiguration

public FileConfiguration(java.lang.String fileName,
                         boolean checkModification)
                  throws ConfigurationException
Method Detail

initDocument

public void initDocument()
                  throws ConfigurationException
Sets the JDOM document of this configuration. If checkModification is enabled, the source document will be parsed if it has changed before the document is returned. This method must be overridden by the subclasses.
Overrides:
initDocument in class AConfiguration

reloadConfiguration

public void reloadConfiguration()
                         throws ConfigurationException
Sets the JDOM document of this configuration. If checkModification is enabled, the source document will be parsed if it has changed before the document is returned. This method must be overridden by the subclasses.
Overrides:
reloadConfiguration in class AConfiguration

getDocument

public org.jdom.Document getDocument()
                              throws ConfigurationException
Return the JDOM document of this configuration. If checkModification is enabled, the source document will be parsed if it has changed before the document is returned.
Specified by:
getDocument in interface IConfiguration
Overrides:
getDocument in class AConfiguration

getFileName

public java.lang.String getFileName()
Return the name of the underlying configuration file
Specified by:
getFileName in interface IFileConfiguration

setFileName

public void setFileName(java.lang.String fileName)
                 throws ConfigurationException
Set the name of the underlying configuration file. The new file will be parsed immediately.
Specified by:
setFileName in interface IFileConfiguration

©   O R C A   S y s t e m s