edu.internet2.middleware.shibboleth.common.attribute.encoding
Interface AttributeEncoder<EncodedType>

Type Parameters:
EncodedType - the type of object created by encoding the attribute
All Known Subinterfaces:
SAML1AttributeEncoder, SAML1NameIdentifierEncoder, SAML2AttributeEncoder, SAML2NameIDEncoder, SAMLNameIdentifierEncoder<NameIDType>, XMLObjectAttributeEncoder<XMLObjectType>
All Known Implementing Classes:
AbstractAttributeEncoder, AbstractSAML1AttributeEncoder, AbstractSAML2AttributeEncoder, AbstractScopedAttributeEncoder, SAML1Base64AttributeEncoder, SAML1ScopedStringAttributeEncoder, SAML1StringAttributeEncoder, SAML1StringNameIdentifierEncoder, SAML1XMLObjectAttributeEncoder, SAML2Base64AttributeEncoder, SAML2ScopedStringAttributeEncoder, SAML2StringAttributeEncoder, SAML2StringNameIDEncoder, SAML2XMLObjectAttributeEncoder

public interface AttributeEncoder<EncodedType>

Attribute encoders convert BaseAttributes into protocol specific representations. Encoders may have contain a category that can be used to distingush encoder types from each other. This inteded to be used to look up an encoder that can be used to encode attributes in accordance with a defined specification or tranmission protcol. Encoders MUST be thread-safe and stateless.


Method Summary
 EncodedType encode(BaseAttribute attribute)
          Enocdes the attribute into a protocol specific representations.
 String getAttributeName()
          Get the name of the attribute.
 void setAttributeName(String attributeName)
          Sets the name of the attribute.
 

Method Detail

getAttributeName

String getAttributeName()
Get the name of the attribute.

Returns:
name of the attribute

setAttributeName

void setAttributeName(String attributeName)
Sets the name of the attribute.

Parameters:
attributeName - name of the attribute

encode

EncodedType encode(BaseAttribute attribute)
                   throws AttributeEncodingException
Enocdes the attribute into a protocol specific representations.

Parameters:
attribute - the attribute to encode
Returns:
the Object the attribute was encoded into
Throws:
AttributeEncodingException - if unable to successfully encode attribute


Copyright © 2006-2010 Internet2. All Rights Reserved.