edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.dataConnector
Class ContextualDataConnector

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.dataConnector.ContextualDataConnector
All Implemented Interfaces:
DataConnector, ResolutionPlugIn<Map<String,BaseAttribute>>

public class ContextualDataConnector
extends Object
implements DataConnector

Wrapper for a DataConnector within a resolution context. This wrapper ensures that the connector is resolved only once per context.


Constructor Summary
ContextualDataConnector(DataConnector newConnector)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          
 List<String> getDependencyIds()
          Gets the IDs of the resolution plugins this plugin is dependent on.
 String getFailoverDependencyId()
          Returns the ID of data connectors to use if this one fails.
 String getId()
          Returns the unique ID of the plugin.
 int hashCode()
          
 Map<String,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

ContextualDataConnector

public ContextualDataConnector(DataConnector newConnector)
Constructor.

Parameters:
newConnector - data connector to wrap
Method Detail

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

getDependencyIds

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

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

getFailoverDependencyId

public String getFailoverDependencyId()
Returns the ID of data connectors to use if this one fails.

Specified by:
getFailoverDependencyId in interface DataConnector
Returns:
ID of data connectors to use if this one fails

getId

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

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

resolve

public Map<String,BaseAttribute> resolve(ShibbolethResolutionContext resolutionContext)
                                  throws AttributeResolutionException
Performs the attribute resolution for this plugin.

Specified by:
resolve in interface ResolutionPlugIn<Map<String,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<Map<String,BaseAttribute>>
Throws:
AttributeResolutionException - if the plug-in has an invalid internal state


Copyright © 2006-2009 Internet2. All Rights Reserved.