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

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
All Implemented Interfaces:
AttributeDefinition, ResolutionPlugIn<BaseAttribute>
Direct Known Subclasses:
MappedAttributeDefinition, PrescopedAttributeDefinition, PrincipalAuthenticationMethodDefinition, PrincipalNameDefinition, RegexSplitAttributeDefinition, SAML1NameIdentifierAttributeDefinition, SAML2NameIDAttributeDefinition, ScopedAttributeDefinition, ScriptedAttributeDefinition, SimpleAttributeDefinition, TemplateAttributeDefinition, TransientIdAttributeDefinition

public abstract class BaseAttributeDefinition
extends AbstractResolutionPlugIn<BaseAttribute>
implements AttributeDefinition

Base class for AttributeDefinition plug-ins.


Constructor Summary
BaseAttributeDefinition()
          Constructor.
 
Method Summary
protected abstract  BaseAttribute doResolve(ShibbolethResolutionContext resolutionContext)
          Creates and populates the values for the resolved attribute.
 List<AttributeEncoder> getAttributeEncoders()
          Gets the map of encoders to be added to attributes produced by this definition, keyed on encoder category.
 Map<Locale,String> getDisplayDescriptions()
          Gets the localized human readable description of attribute.
 Map<Locale,String> getDisplayNames()
          Gets the localized human readable name of the attribute.
 String getSourceAttributeID()
          Return the source attribute.
protected  Collection<Object> getValuesFromAllDependencies(ShibbolethResolutionContext context)
          Get values from dependencies.
 boolean isDependencyOnly()
          Gets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.
 BaseAttribute resolve(ShibbolethResolutionContext resolutionContext)
          Performs the attribute resolution for this plugin.
 void setDependencyOnly(boolean isDependencyOnly)
          Sets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.
 void setSourceAttributeID(String newSourceAttributeID)
          Set the source attribute.
 
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, validate
 

Constructor Detail

BaseAttributeDefinition

public BaseAttributeDefinition()
Constructor.

Method Detail

getDisplayDescriptions

public Map<Locale,String> getDisplayDescriptions()
Gets the localized human readable description of attribute.

Specified by:
getDisplayDescriptions in interface AttributeDefinition
Returns:
human readable description of attribute

getDisplayNames

public Map<Locale,String> getDisplayNames()
Gets the localized human readable name of the attribute.

Specified by:
getDisplayNames in interface AttributeDefinition
Returns:
human readable name of the attribute

isDependencyOnly

public boolean isDependencyOnly()
Gets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.

Specified by:
isDependencyOnly in interface AttributeDefinition
Returns:
whether this attribute definition is only a dependency

setDependencyOnly

public void setDependencyOnly(boolean isDependencyOnly)
Sets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.

Parameters:
isDependencyOnly - whether this attribute definition is only a dependency

getAttributeEncoders

public List<AttributeEncoder> getAttributeEncoders()
Gets the map of encoders to be added to attributes produced by this definition, keyed on encoder category.

Specified by:
getAttributeEncoders in interface AttributeDefinition
Returns:
encoders to be added to attributes produced by this definition

resolve

public BaseAttribute resolve(ShibbolethResolutionContext resolutionContext)
                      throws AttributeResolutionException
Performs the attribute resolution for this plugin.

Specified by:
resolve in interface ResolutionPlugIn<BaseAttribute>
Parameters:
resolutionContext - the context for the resolution
Returns:
the attributes made available by the resolution, never null
Throws:
AttributeResolutionException - the problem that occurred during the resolution

doResolve

protected abstract 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.

Parameters:
resolutionContext - current attribute resolution context
Returns:
resolved attribute
Throws:
AttributeResolutionException - thrown if there is a problem resolving and creating the attribute

getValuesFromAllDependencies

protected Collection<Object> getValuesFromAllDependencies(ShibbolethResolutionContext context)
Get values from dependencies.

Parameters:
context - resolution context
Returns:
collection of values

getSourceAttributeID

public String getSourceAttributeID()
Return the source attribute. If the source attribute is null, return the definition ID.

Returns:
Returns the sourceAttribute.

setSourceAttributeID

public void setSourceAttributeID(String newSourceAttributeID)
Set the source attribute.

Parameters:
newSourceAttributeID - The sourceAttribute to set.


Copyright © 2006-2009 Internet2. All Rights Reserved.