issrg.pba.management.manager
Class PMConfiguration

java.lang.Object
  extended by issrg.pba.management.manager.PMConfiguration
Direct Known Subclasses:
FilePMConfiguration

public abstract class PMConfiguration
extends java.lang.Object

PERMIS Management configuration class.

an instance of this class will encapsulate the entire configuration that is held external to a running instance of the PERMIS management (PManagement class). i.e. held in a file.

load () is the method that reads in the configuration form a file, then overrides any properties passed in via the command line arguments.

there are two main member variables:

properties contains all the configuration, and agentNumberList is a list of PERMIS agents.

there is a load () and a store () method used for reading in and writing out all configuration properties from and to the configuration file.

agentNumberIterator () is used to get the PERMIS agent list, and there are a multiple of getter access methods used to get the rest of the configuration.

Version:
0.1.2008.01.18
Author:
mfb4@kent.ac.uk

Constructor Summary
PMConfiguration()
           
 
Method Summary
protected abstract  java.io.InputStream getIdentityStoreInputStream()
          get the identity key store input stream.
protected  java.util.Properties getProperties()
          Get the permanent configuration list.
protected abstract  java.io.InputStream getTrustStoreInputStream()
          get the trust key store input stream.
protected  void load(java.util.Map<java.lang.String,java.lang.String> arguments)
          load in the PERMIS management configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMConfiguration

public PMConfiguration()
Method Detail

getProperties

protected java.util.Properties getProperties()
Get the permanent configuration list. This method allows access so the concrete sub classes may add a few more configuration settings.

Returns:
the properties

getIdentityStoreInputStream

protected abstract java.io.InputStream getIdentityStoreInputStream()
                                                            throws PMException
get the identity key store input stream. To be implemented by the concrete sub classes.

Returns:
the identity key store input stream
Throws:
PMException - if there is a problem establishing an input stream
Since:
0.1.2008.01.28

getTrustStoreInputStream

protected abstract java.io.InputStream getTrustStoreInputStream()
                                                         throws PMException
get the trust key store input stream. To be implemented by the concrete sub classes.

Returns:
the trust key store input stream
Throws:
PMException - if there is a problem establishing an input stream
Since:
0.1.2008.01.23

load

protected void load(java.util.Map<java.lang.String,java.lang.String> arguments)
             throws PMException
load in the PERMIS management configuration. The configuration by default is held in a file called "pmconfiguration.properties" and is a set of mapped properties.

-pmconfiguration pmconfiguration.properties

Parameters:
arguments - a string of command line arguments that override the settings in the management configuration file
Throws:
PMException - If loading form the XML file fails
Since:
0.1.2008.01.18