edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition
Class MappedAttributeDefinition

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.AbstractResolutionPlugIn<BaseAttribute>
      extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.BaseAttributeDefinition
          extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.MappedAttributeDefinition
All Implemented Interfaces:
AttributeDefinition, ResolutionPlugIn<BaseAttribute>

public class MappedAttributeDefinition
extends BaseAttributeDefinition

The RegexAttributeDefinition allows regular expression based replacements on attribute values, using the regex syntax allowed by Pattern.


Field Summary
private  String defaultValue
          Default return value.
private static org.slf4j.Logger log
          Class logger.
private  boolean passThru
          Whether the definition passes thru unmatched values.
private  Collection<ValueMap> valueMaps
          Value maps.
 
Constructor Summary
MappedAttributeDefinition()
          Constructor.
 
Method Summary
protected  BaseAttribute doResolve(ShibbolethResolutionContext resolutionContext)
          Creates and populates the values for the resolved attribute.
 String getDefaultValue()
          Gets the default return value.
 Collection<ValueMap> getValueMaps()
          Get the value maps.
 boolean isPassThru()
          Gets whether the definition passes thru unmatched values.
protected  Set<String> mapValue(String value)
          Maps the value from a dependency in to the value(s) for this attribute.
 void setDefaultValue(String newDefaultValue)
          Sets the default return value.
 void setPassThru(boolean newPassThru)
          Sets whether the definition passes thru unmatched values.
 void validate()
          Validate the internal state of this plug-in.
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.BaseAttributeDefinition
getAttributeEncoders, getDisplayDescriptions, getDisplayNames, getSourceAttributeID, getValuesFromAllDependencies, isDependencyOnly, resolve, setDependencyOnly, setSourceAttributeID
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.AbstractResolutionPlugIn
getDependencyIds, getId, getValuesFromAllDependencies, getValuesFromAttributeDependency, getValuesFromConnectorDependency, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ResolutionPlugIn
getDependencyIds, getId
 

Field Detail

log

private static org.slf4j.Logger log
Class logger.


defaultValue

private String defaultValue
Default return value.


passThru

private boolean passThru
Whether the definition passes thru unmatched values.


valueMaps

private Collection<ValueMap> valueMaps
Value maps.

Constructor Detail

MappedAttributeDefinition

public MappedAttributeDefinition()
Constructor.

Method Detail

doResolve

protected BaseAttribute doResolve(ShibbolethResolutionContext resolutionContext)
                           throws AttributeResolutionException
Creates and populates the values for the resolved attribute. Implementations should *not* set, or otherwise manage, the attribute encoders for the resolved attribute.

Specified by:
doResolve in class BaseAttributeDefinition
Parameters:
resolutionContext - current attribute resolution context
Returns:
resolved attribute
Throws:
AttributeResolutionException - thrown if there is a problem resolving and creating the attribute

mapValue

protected Set<String> mapValue(String value)
Maps the value from a dependency in to the value(s) for this attribute.

Parameters:
value - the value from the dependency
Returns:
the set of attribute values that the given dependency value maps in to

validate

public void validate()
              throws AttributeResolutionException
Validate the internal state of this plug-in. This process may not rely on information from any dependency.

Throws:
AttributeResolutionException - if the plug-in has an invalid internal state

getDefaultValue

public String getDefaultValue()
Gets the default return value.

Returns:
the default return value.

setDefaultValue

public void setDefaultValue(String newDefaultValue)
Sets the default return value.

Parameters:
newDefaultValue - the default return value

isPassThru

public boolean isPassThru()
Gets whether the definition passes thru unmatched values.

Returns:
whether the definition passes thru unmatched values.

setPassThru

public void setPassThru(boolean newPassThru)
Sets whether the definition passes thru unmatched values.

Parameters:
newPassThru - whether the definition passes thru unmatched values.

getValueMaps

public Collection<ValueMap> getValueMaps()
Get the value maps.

Returns:
the value maps.


Copyright © 1999-2012. All Rights Reserved.