net.geant.edugain.attributes
Class AttributeConverterConfigurator

java.lang.Object
  extended by net.geant.edugain.attributes.AttributeConverterConfigurator

public class AttributeConverterConfigurator
extends java.lang.Object

Configurator class for Attribute converter. This class helps the configuration process by reading xml files / strings and parsing them using JAXB. ConfigurationException is thrown by each methods when either JAXB or IO exceptions are occured.

Author:
Adam Lantos

Field Summary
static java.lang.String ATTRIBUTECONVERTER_CONTEXT
          JAXB Package name for AttributeConverter and AttributeFilter
static java.lang.String ATTRIBUTEMAPPER_CONTEXT
          JAXB Package name for AttributeNameMapper.
private static org.apache.log4j.Logger log
           
 
Constructor Summary
AttributeConverterConfigurator()
           
 
Method Summary
static AttributeConversionRulesType loadConverterConfiguration(java.io.File file)
          Load the Attribute Converter configuration from file.
static AttributeConversionRulesType loadConverterConfiguration(java.io.Reader r)
          Load the Attribute Converter configuration from java.io.Reader interface.
static AttributeConversionRulesType loadConverterConfiguration(java.lang.String XMLString)
          Load the Attribute Converter configuration from java.lang.String.
static AttributeFilterType loadFilterConfiguration(java.io.File file)
          Load the Attribute Filter configuration from file.
static AttributeFilterType loadFilterConfiguration(java.io.Reader r)
          Load the Attribute Filter configuration from java.io.Reader interface.
static AttributeFilterType loadFilterConfiguration(java.lang.String XMLString)
          Load the Attribute Filter configuration from java.lang.String.
static AttributeMapperType loadMapperConfiguration(java.io.File file)
          Load the Attribute Mapping configuration from file.
static AttributeMapperType loadMapperConfiguration(java.io.Reader r)
          Load the Attribute Mapping configuration from java.io.Reader interface.
static AttributeMapperType loadMapperConfiguration(java.lang.String XMLString)
          Load the Attribute Mapping configuration from java.lang.String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTECONVERTER_CONTEXT

public static final java.lang.String ATTRIBUTECONVERTER_CONTEXT
JAXB Package name for AttributeConverter and AttributeFilter

See Also:
Constant Field Values

ATTRIBUTEMAPPER_CONTEXT

public static final java.lang.String ATTRIBUTEMAPPER_CONTEXT
JAXB Package name for AttributeNameMapper.

See Also:
Constant Field Values

log

private static org.apache.log4j.Logger log
Constructor Detail

AttributeConverterConfigurator

public AttributeConverterConfigurator()
Method Detail

loadConverterConfiguration

public static AttributeConversionRulesType loadConverterConfiguration(java.io.Reader r)
                                                               throws ConfigurationException
Load the Attribute Converter configuration from java.io.Reader interface. Clients SHOULD NOT use this method directly.

Parameters:
r - java.io.Reader instance
Returns:
parsed configuration
Throws:
ConfigurationException

loadConverterConfiguration

public static AttributeConversionRulesType loadConverterConfiguration(java.lang.String XMLString)
                                                               throws ConfigurationException
Load the Attribute Converter configuration from java.lang.String.

Parameters:
XMLString - XML configuration data
Returns:
parsed configuration
Throws:
ConfigurationException

loadConverterConfiguration

public static AttributeConversionRulesType loadConverterConfiguration(java.io.File file)
                                                               throws ConfigurationException
Load the Attribute Converter configuration from file.

Parameters:
file -
Returns:
parsed configuration
Throws:
ConfigurationException

loadFilterConfiguration

public static AttributeFilterType loadFilterConfiguration(java.io.Reader r)
                                                   throws ConfigurationException
Load the Attribute Filter configuration from java.io.Reader interface. Clients SHOULD NOT use this method directly.

Parameters:
r - java.io.Reader instance
Returns:
parsed configuration
Throws:
ConfigurationException

loadFilterConfiguration

public static AttributeFilterType loadFilterConfiguration(java.lang.String XMLString)
                                                   throws ConfigurationException
Load the Attribute Filter configuration from java.lang.String.

Parameters:
XMLString - XML configuration data
Returns:
parsed configuration
Throws:
ConfigurationException

loadFilterConfiguration

public static AttributeFilterType loadFilterConfiguration(java.io.File file)
                                                   throws ConfigurationException
Load the Attribute Filter configuration from file.

Parameters:
file -
Returns:
parsed configuration
Throws:
ConfigurationException

loadMapperConfiguration

public static AttributeMapperType loadMapperConfiguration(java.io.Reader r)
                                                   throws ConfigurationException
Load the Attribute Mapping configuration from java.io.Reader interface. Clients SHOULD NOT use this method directly.

Parameters:
r -
Returns:
parsed configuration
Throws:
ConfigurationException

loadMapperConfiguration

public static AttributeMapperType loadMapperConfiguration(java.lang.String XMLString)
                                                   throws ConfigurationException
Load the Attribute Mapping configuration from java.lang.String.

Parameters:
XMLString - XML configuration string
Returns:
parsed configuration
Throws:
ConfigurationException

loadMapperConfiguration

public static AttributeMapperType loadMapperConfiguration(java.io.File file)
                                                   throws ConfigurationException
Load the Attribute Mapping configuration from file.

Parameters:
file -
Returns:
parsed configuration
Throws:
ConfigurationException