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

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.SAML1NameIdentifierAttributeDefinition
All Implemented Interfaces:
AttributeDefinition, ResolutionPlugIn<BaseAttribute>

public class SAML1NameIdentifierAttributeDefinition
extends BaseAttributeDefinition

An attribute definition the creates attributes whose values are NameIdentifier. When building the NameIdentifier the textual content of the NameIdentifier is the value of the source attribute. If a nameIdQualifier is provided that value is used as the NameIdentifier's name qualifier otherwise the attribute issuer's entity ID is used. The attribute requester's entity ID is always used as the NameIdentifier's SP name qualifier.


Constructor Summary
SAML1NameIdentifierAttributeDefinition()
          Constructor.
 
Method Summary
protected  org.opensaml.saml1.core.NameIdentifier buildNameId(String nameIdValue, ShibbolethResolutionContext resolutionContext)
          Builds a name ID.
protected  BaseAttribute<?> doResolve(ShibbolethResolutionContext resolutionContext)
          Creates and populates the values for the resolved attribute.
 String getNameIdFormat()
          Gets the format for the NameIdentifier used as an attribute value.
 String getNameIdQualifier()
          Gets the NameIdentifier qualifier for the NameIdentifier used as an attribute value.
 void setNameIdFormat(String format)
          Sets the format for the NameIdentifier used as an attribute value.
 void setNameIdQualifier(String qualifier)
          Sets the NameIdentifier qualifier for the NameIdentifier used as an attribute value.
 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
 

Constructor Detail

SAML1NameIdentifierAttributeDefinition

public SAML1NameIdentifierAttributeDefinition()
Constructor.

Method Detail

getNameIdFormat

public String getNameIdFormat()
Gets the format for the NameIdentifier used as an attribute value.

Returns:
format for the NameIdentifier used as an attribute value

setNameIdFormat

public void setNameIdFormat(String format)
Sets the format for the NameIdentifier used as an attribute value.

Parameters:
format - format for the NameIdentifier used as an attribute value

getNameIdQualifier

public String getNameIdQualifier()
Gets the NameIdentifier qualifier for the NameIdentifier used as an attribute value.

Returns:
NameIdentifier qualifier for the NameIdentifier used as an attribute value

setNameIdQualifier

public void setNameIdQualifier(String qualifier)
Sets the NameIdentifier qualifier for the NameIdentifier used as an attribute value.

Parameters:
qualifier - NameIdentifier qualifier for the NameIdentifier used as an attribute value

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

buildNameId

protected org.opensaml.saml1.core.NameIdentifier buildNameId(String nameIdValue,
                                                             ShibbolethResolutionContext resolutionContext)
Builds a name ID. The provided value is the textual content of the NameIdentifier. If a nameIdQualifier is not null it is used as the NameIdentifier's name qualifier, otherwise the attribute issuer's entity id is used.

Parameters:
nameIdValue - value of the NameIdentifier
resolutionContext - current resolution context
Returns:
the constructed NameIdentifier

validate

public void validate()
              throws AttributeResolutionException
Validate the internal state of this plug-in.

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


Copyright © 2006-2008 Internet2. All Rights Reserved.