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

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

public class ContextualAttributeDefinition
extends Object
implements AttributeDefinition

Wrapper for an AttributeDefinition within a ShibbolethResolutionContext. This wrapper ensures that the definition is resolved only once per context.


Constructor Summary
ContextualAttributeDefinition(AttributeDefinition newDefinition)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          
 List<AttributeEncoder> getAttributeEncoders()
          Gets the map of encoders to be added to attributes produced by this definition, keyed on encoder category.
 List<String> getDependencyIds()
          Gets the IDs of the resolution plugins this plugin is dependent on.
 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 getId()
          Returns the unique ID of the plugin.
 int hashCode()
          
 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 validate()
          Validate the internal state of this plug-in.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextualAttributeDefinition

public ContextualAttributeDefinition(AttributeDefinition newDefinition)
Constructor.

Parameters:
newDefinition - attribute definition to wrap
Method Detail

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

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

getDependencyIds

public List<String> getDependencyIds()
Gets the IDs of the resolution plugins this plugin is dependent on.

Specified by:
getDependencyIds in interface ResolutionPlugIn<BaseAttribute>
Returns:
IDs of the data connectors this plugin is dependent on

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

getId

public String getId()
Returns the unique ID of the plugin.

Specified by:
getId in interface ResolutionPlugIn<BaseAttribute>
Returns:
unique ID of the plugin

hashCode

public int hashCode()

Overrides:
hashCode in class Object

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

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

validate

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

Specified by:
validate in interface ResolutionPlugIn<BaseAttribute>
Throws:
AttributeResolutionException - if the plug-in has an invalid internal state


Copyright © 2006-2009 Internet2. All Rights Reserved.