at.gv.egovernment.moa.spss.server.config
Class ConfigurationPartsBuilder

java.lang.Object
  |
  +--at.gv.egovernment.moa.spss.server.config.ConfigurationPartsBuilder

public class ConfigurationPartsBuilder
extends Object

A class that builds configuration data from a DOM based representation.

Version:
$Id$
Author:
Patrick Peck

Constructor Summary
ConfigurationPartsBuilder(org.w3c.dom.Element configElem)
          Create a new ConfigurationPartsBuilder.
 
Method Summary
 Map buildChainingModes()
          Build the chaining modes for all configured trust anchors.
 Map buildCreateSignatureEnvironmentProfiles(File configRoot)
          Build the CreateSignatureEnvironmentProfiles.
 Map buildCreateTransformsInfoProfiles(File configRoot)
          Build the CreateTransformsInfoProfiles.
 Map buildCRLDistributionPoints()
          Build the CRL distribution points mapping.
 Map buildGenericConfiguration()
          Build the mapping of generic configuration properties.
 List buildHardwareCryptoModules()
          Build the configured hardware crypto modules.
 List buildHardwareKeyModules(List keyModules)
          Build the configured hardware keys.
 Map buildKeyGroupMappings(Map keyGroups, IssuerAndSerial anonymous)
          Build the key group mapping.
 Map buildKeyGroups(List keyModules)
          Build the key group configuration.
 List buildSoftwareKeyModules(List keyModules, File configRoot)
          Build the configured software keys.
 Map buildSupplementProfiles(File configRoot)
          Build the SupplementProfiles.
 Map buildTrustProfiles(File configRoot)
          Bulid the trust profile mapping.
 Map buildVerifyTransformsInfoProfiles(File configRoot)
          Build the VerifyTransformsInfoProfiles.
 String getCanonicalizationAlgorithmName()
          Returns the canonicalization algorithm name.
 org.w3c.dom.Element getConfigElem()
          Returns the root element of the MOA configuration.
 int getCRLArchiveDuration()
          Return the CRL archive duration.
 String getDefaultChainingMode()
          Returns the default chaining mode from the configuration.
 String getDigestMethodAlgorithmName()
          Returns the digest method algorithm name.
 List getWarnings()
          Returns the warnings encountered during building the configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationPartsBuilder

public ConfigurationPartsBuilder(org.w3c.dom.Element configElem)
Create a new ConfigurationPartsBuilder.
Parameters:
configElem - The root element of the MOA configuration.
Method Detail

getConfigElem

public org.w3c.dom.Element getConfigElem()
Returns the root element of the MOA configuration.
Returns:
The root element of the MOA configuration.

getWarnings

public List getWarnings()
Returns the warnings encountered during building the configuration.
Returns:
A List of Strings, containing the warning messages.

getDigestMethodAlgorithmName

public String getDigestMethodAlgorithmName()
Returns the digest method algorithm name.
Returns:
The digest method algorithm name from the configuration.

getCanonicalizationAlgorithmName

public String getCanonicalizationAlgorithmName()
Returns the canonicalization algorithm name.
Returns:
The canonicalization algorithm name from the configuration.

buildGenericConfiguration

public Map buildGenericConfiguration()
Build the mapping of generic configuration properties.
Returns:
The mapping of generic configuration properties (a name to value mapping) from the configuration.

buildHardwareCryptoModules

public List buildHardwareCryptoModules()
Build the configured hardware crypto modules.
Returns:
The hardware crypto modules from the configuration.

buildHardwareKeyModules

public List buildHardwareKeyModules(List keyModules)
Build the configured hardware keys.
Parameters:
The - keyModules that the configuration already knows about. To prevent multiple key modules with the same ID.
Returns:
The hardware keys contained in the configuration.

buildSoftwareKeyModules

public List buildSoftwareKeyModules(List keyModules,
                                    File configRoot)
Build the configured software keys.
Parameters:
The - keyModules that the configuration already knows about. To prevent multiple key modules with the same ID.
configRoot - The directory containing the main configuration file. Used to resolve keystore files configured using a relative URI.
Returns:
The software keys contained in the configuration.

buildKeyGroups

public Map buildKeyGroups(List keyModules)
Build the key group configuration.
Parameters:
keyModules - The KeyModules that the configuration knows about. Used to check for errors in the configuration.
Returns:
The mapping between key group IDs and key groups.

buildKeyGroupMappings

public Map buildKeyGroupMappings(Map keyGroups,
                                 IssuerAndSerial anonymous)
Build the key group mapping.
Parameters:
keyGroups - The available key groups.
anonymous - The IssuerAndSerial to be used for key group mappings not protected by a certificate.
Returns:
The key group mapping.

getDefaultChainingMode

public String getDefaultChainingMode()
Returns the default chaining mode from the configuration.
Returns:
The default chaining mode.

buildChainingModes

public Map buildChainingModes()
Build the chaining modes for all configured trust anchors.
Returns:
The mapping from trust anchors to chaining modes.

buildCRLDistributionPoints

public Map buildCRLDistributionPoints()
Build the CRL distribution points mapping.
Returns:
The mapping from certificate authorities to distribution points.

getCRLArchiveDuration

public int getCRLArchiveDuration()
Return the CRL archive duration.
Returns:
The value of the CRL archive duration setting from the configuration.

buildCreateTransformsInfoProfiles

public Map buildCreateTransformsInfoProfiles(File configRoot)
Build the CreateTransformsInfoProfiles.
Parameters:
configRoot - The directory of the main configuration file. Used for lookup of profiles with relative file names.
Returns:
The mapping from profile ID to profile.

buildCreateSignatureEnvironmentProfiles

public Map buildCreateSignatureEnvironmentProfiles(File configRoot)
Build the CreateSignatureEnvironmentProfiles.
Parameters:
configRoot - The directory of the main configuration file. Used for lookup of profiles with relative file names.
Returns:
The mapping from profile ID to profile.

buildVerifyTransformsInfoProfiles

public Map buildVerifyTransformsInfoProfiles(File configRoot)
Build the VerifyTransformsInfoProfiles.
Parameters:
configRoot - The directory of the main configuration file. Used for lookup of profiles with relative file names.
Returns:
The mapping from profile ID to profile.

buildSupplementProfiles

public Map buildSupplementProfiles(File configRoot)
Build the SupplementProfiles.
Parameters:
configRoot - The directory of the main configuration file. Used for lookup of profiles with relative file names.
Returns:
The mapping from profile ID to profile.

buildTrustProfiles

public Map buildTrustProfiles(File configRoot)
Bulid the trust profile mapping.
Parameters:
configRoot - The absolute path to the main configuration file.
Returns:
The profile ID to profile mapping.