|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.omg.PortableServer.Servant
uk.org.iscream.cms.server.core.ConfigurationManagerPOA
uk.org.iscream.cms.server.core.ConfigurationManagerServant
This class is essentially a Configuration factory. This class implements the Configurator IDL and allows other classes in the system ot obtain their Configuration On construction it requires a reference to the RootPOA to allow it to create Configuration objects to be returned. It also relies on the System.properties to set internal values.
Field Summary | |
private String |
_configPath
The root path to all configurations |
private Logger |
_logger
This holds a reference to the system logger that is being used. |
private String |
_name
This is the friendly identifier of the component this class is running in. |
private ReferenceManager |
_refman
A reference to the reference manager in use |
private Configuration |
_systemConfig
An instance of the system config |
private String |
_systemConfigFile
The name of the file that contains the system configuration |
private Properties |
_systemConfigHolder
The system config file represented by a properties object. |
String |
REVISION
The current CVS revision of this class |
Fields inherited from class uk.org.iscream.cms.server.core.ConfigurationManagerPOA |
|
Fields inherited from class org.omg.PortableServer.Servant |
|
Constructor Summary | |
(package private) |
ConfigurationManagerServant()
Creates a new ConfiguratorServant This class uses the System.properties to set internal values |
Method Summary | |
private Configuration |
buildConfiguration(String fileList)
Build the properties as a Configuration to be returned to the caller |
Configuration |
getConfiguration(String source)
Returns a Configuration object which contains the configuration data requested by the calling object. |
private LinkedList |
getGroupMembership(String source)
Parses the system configuration file for group membership entries. |
private String |
getIncludedFiles(String currentFile,
String readFiles)
This is a recursive function private to this class. |
static boolean |
groupMatch(String source,
String group)
Checks that a given source is matched within the given list of hosts. |
private boolean |
hasDuplicate(String file,
String fileList)
This simple method checks to see if a given file exists in the given list. |
boolean |
isModified(String fileList,
long lastModified)
When passed a file list and a current value for the lastModified of the current configuration, this method compares the value to the actual value of the configuration files to determine whether or not the configuration has been modified. |
private void |
loadSystemConfig()
Opens and loads the system configuration into the local reference _systemConfig |
String |
toString()
Overrides the Object.toString()
method to provide clean logging (every class should have this). |
Methods inherited from class uk.org.iscream.cms.server.core.ConfigurationManagerPOA |
_all_interfaces, _invoke, _this, _this |
Methods inherited from class org.omg.PortableServer.Servant |
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final String REVISION
private String _name
private Logger _logger
private ReferenceManager _refman
private String _configPath
private String _systemConfigFile
private Configuration _systemConfig
private Properties _systemConfigHolder
Constructor Detail |
ConfigurationManagerServant()
Method Detail |
public Configuration getConfiguration(String source)
source
- the configuration required
public boolean isModified(String fileList, long lastModified)
fileList
- a list of files that the caller uses for configurationlastModified
- the last modified date of the callers configuration
public String toString()
Object.toString()
method to provide clean logging (every class should have this).
This uses the uk.org.iscream.cms.util.FormatName class
to format the toString()
private String getIncludedFiles(String currentFile, String readFiles) throws IOException, FileNotFoundException, Exception
currentFile
- the current file to be processedreadFiles
- used for recursion purposes only, these are the files it has read so far
IOException
- if there is trouble reading the file
FileNotFoundException
- is there is trouble finding the file
CircularIncludeException
- this is if a circular include is detected
Exception
private boolean hasDuplicate(String file, String fileList)
file
- the file to check the list forfileList
- the list to check
private void loadSystemConfig()
private LinkedList getGroupMembership(String source)
source
- the source to find membership for
public static boolean groupMatch(String source, String group)
source
- the string to look forgroup
- the group to search for a match
private Configuration buildConfiguration(String fileList)
fileList
- the list of files to build the configuration from
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |