net.geant.edugain.attributes
Class AttributeFilter

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

public class AttributeFilter
extends java.lang.Object

Attribute Filtering class.

Author:
Adam Lantos

Field Summary
private  java.util.List<Rule> filteringRules
          Attribute Filtering rules.
private  org.apache.log4j.Logger log
           
 
Constructor Summary
AttributeFilter()
           
 
Method Summary
 void init(AttributeFilterType configuration)
          Initializes this converter with attribute filtering configuration.
 java.util.List<AttributeValues> process(java.util.List<AttributeValues> input, java.lang.String remoteProvider)
          Process the attributes according to the filtering rules.
 java.util.List<AttributeValues> process(java.util.List<AttributeValues> input, java.lang.String remoteProvider, java.lang.String localProvider)
          Process the attributes according to the filtering rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filteringRules

private java.util.List<Rule> filteringRules
Attribute Filtering rules.


log

private org.apache.log4j.Logger log
Constructor Detail

AttributeFilter

public AttributeFilter()
Method Detail

init

public void init(AttributeFilterType configuration)
          throws ConfigurationException
Initializes this converter with attribute filtering configuration. Configuration is stored in XML format and constrainted by AttributeConverter.xsd. Configuration parsing is done by leveraging JAXB (Java API for XML Binding). AttributeConverterConfigurator SHOULD be used to help XML - Java mapping. JAXB classes are placed in net.geant.edugain.attributes.jaxb.* packages.

Parameters:
configuration - java instance of configuration data
Throws:
ConfigurationException
See Also:
AttributeConverterConfigurator, AttributeConverterFactory, AttributeConversionRulesType

process

public java.util.List<AttributeValues> process(java.util.List<AttributeValues> input,
                                               java.lang.String remoteProvider,
                                               java.lang.String localProvider)
Process the attributes according to the filtering rules. This is just a template method - it calls all the configured rules in order and then returns. Any exception thrown by the rule is not considered to be a fatal error.

Parameters:
input -
remoteProvider - String
localProvider - String
Returns:
output

process

public java.util.List<AttributeValues> process(java.util.List<AttributeValues> input,
                                               java.lang.String remoteProvider)
Process the attributes according to the filtering rules.

Parameters:
input -
remoteProvider -
Returns:
output List