edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.principalConnector
Class ContextualPrincipalConnector

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.principalConnector.ContextualPrincipalConnector
All Implemented Interfaces:
PrincipalConnector, ResolutionPlugIn<String>

public class ContextualPrincipalConnector
extends Object
implements PrincipalConnector

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


Field Summary
private  PrincipalConnector connector
          Wrapped principal connector.
private  String principal
          Cached result of resolving the connector.
 
Constructor Summary
ContextualPrincipalConnector(PrincipalConnector newConnector)
          Constructor.
 
Method Summary
 List<String> getDependencyIds()
          Gets the IDs of the resolution plugins this plugin is dependent on.
 String getFormat()
          Get NamID format.
 String getId()
          Returns the unique ID of the plugin.
 Set<String> getRelyingParties()
          Get relying parties this connector is valid for.
 String 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connector

private PrincipalConnector connector
Wrapped principal connector.


principal

private String principal
Cached result of resolving the connector.

Constructor Detail

ContextualPrincipalConnector

public ContextualPrincipalConnector(PrincipalConnector newConnector)
Constructor.

Parameters:
newConnector - principal connector to wrap
Method Detail

getDependencyIds

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

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

getFormat

public String getFormat()
Get NamID format.

Specified by:
getFormat in interface PrincipalConnector
Returns:
the NameID format

getId

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

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

getRelyingParties

public Set<String> getRelyingParties()
Get relying parties this connector is valid for.

Specified by:
getRelyingParties in interface PrincipalConnector
Returns:
set of relying parties

resolve

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

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


Copyright © 1999-2012. All Rights Reserved.