edu.internet2.middleware.shibboleth.common.attribute.encoding.provider
Class SAML1StringNameIdentifierEncoder

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.attribute.encoding.provider.AbstractAttributeEncoder<org.opensaml.saml1.core.NameIdentifier>
      extended by edu.internet2.middleware.shibboleth.common.attribute.encoding.provider.SAML1StringNameIdentifierEncoder
All Implemented Interfaces:
AttributeEncoder<org.opensaml.saml1.core.NameIdentifier>, SAML1NameIdentifierEncoder, SAMLNameIdentifierEncoder<org.opensaml.saml1.core.NameIdentifier>, XMLObjectAttributeEncoder<org.opensaml.saml1.core.NameIdentifier>

public class SAML1StringNameIdentifierEncoder
extends AbstractAttributeEncoder<org.opensaml.saml1.core.NameIdentifier>
implements SAML1NameIdentifierEncoder

An attribute encoder that takes the first value of an attribute and creates a NameIdentifier of it. Attribute values are turned into the values for the NameIdentifier by invoking the values Object.toString() method.


Field Summary
private  org.opensaml.common.SAMLObjectBuilder<org.opensaml.saml1.core.NameIdentifier> identifierBuilder
          Identifier builder.
private  String nameFormat
          Format of the identifier.
private  String nameQualifier
          Name qualifier for the identifier.
 
Constructor Summary
SAML1StringNameIdentifierEncoder()
          Constructor.
 
Method Summary
 org.opensaml.saml1.core.NameIdentifier encode(BaseAttribute attribute)
          Enocdes the attribute into a protocol specific representations.
 String getNameFormat()
          Gets the name format URI for the NameID.
 String getNameQualifier()
          Gets the name domain qualifier for the NameID.
 void setNameFormat(String format)
          Sets the name format URI for the NameID.
 void setNameQualifier(String qualifier)
          Sets the name domain qualifier for the NameID.
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.encoding.provider.AbstractAttributeEncoder
getAttributeName, setAttributeName
 
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.encoding.AttributeEncoder
getAttributeName, setAttributeName
 

Field Detail

identifierBuilder

private org.opensaml.common.SAMLObjectBuilder<org.opensaml.saml1.core.NameIdentifier> identifierBuilder
Identifier builder.


nameFormat

private String nameFormat
Format of the identifier.


nameQualifier

private String nameQualifier
Name qualifier for the identifier.

Constructor Detail

SAML1StringNameIdentifierEncoder

public SAML1StringNameIdentifierEncoder()
Constructor.

Method Detail

getNameFormat

public String getNameFormat()
Gets the name format URI for the NameID.

Specified by:
getNameFormat in interface SAMLNameIdentifierEncoder<org.opensaml.saml1.core.NameIdentifier>
Returns:
name format URI for the NameID

setNameFormat

public void setNameFormat(String format)
Sets the name format URI for the NameID.

Specified by:
setNameFormat in interface SAMLNameIdentifierEncoder<org.opensaml.saml1.core.NameIdentifier>
Parameters:
format - name format URI for the NameID

getNameQualifier

public String getNameQualifier()
Gets the name domain qualifier for the NameID.

Specified by:
getNameQualifier in interface SAMLNameIdentifierEncoder<org.opensaml.saml1.core.NameIdentifier>
Returns:
name domain qualifier for the NameID

setNameQualifier

public void setNameQualifier(String qualifier)
Sets the name domain qualifier for the NameID.

Specified by:
setNameQualifier in interface SAMLNameIdentifierEncoder<org.opensaml.saml1.core.NameIdentifier>
Parameters:
qualifier - name domain qualifier for the NameID

encode

public org.opensaml.saml1.core.NameIdentifier encode(BaseAttribute attribute)
                                              throws AttributeEncodingException
Enocdes the attribute into a protocol specific representations.

Specified by:
encode in interface AttributeEncoder<org.opensaml.saml1.core.NameIdentifier>
Parameters:
attribute - the attribute to encode
Returns:
the Object the attribute was encoded into
Throws:
AttributeEncodingException - if unable to successfully encode attribute


Copyright © 1999-2012. All Rights Reserved.