public abstract class AxPayload extends AxMessage
Modifier and Type | Field and Description |
---|---|
private int |
_attrAliasCounter |
private static org.apache.commons.logging.Log |
_log |
private static boolean |
DEBUG |
_parameters, OPENID_NS_AX
Constructor and Description |
---|
AxPayload() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addAttribute(java.lang.String typeUri,
java.lang.String value)
Adds an attribute to the attribute payload, without the caller having to
specify an alias.
|
void |
addAttribute(java.lang.String alias,
java.lang.String typeUri,
java.lang.String value)
Adds an attribute to the attribute payload.
|
void |
addAttributes(java.util.Map attributes)
Adds the attributes in the supplied Map to the attribute payload.
|
private boolean |
checkAttributes() |
private java.lang.String |
generateAlias() |
java.lang.String |
getAttributeAlias(java.lang.String typeUri)
Gets the alias for an attribute type URI, if present.
|
java.util.List |
getAttributeAliases()
Gets a list of attribute aliases.
|
java.util.Map |
getAttributes()
Gets a map with attribute aliases -> list of values.
|
java.util.Map |
getAttributeTypes()
Gets a map with attribute aliases -> attribute type URI.
|
java.lang.String |
getAttributeTypeUri(java.lang.String alias)
Get typeURI value for the specified attribute alias.
|
java.lang.String |
getAttributeValue(java.lang.String alias)
Gets the (first) value for the specified attribute alias.
|
java.lang.String |
getAttributeValueByTypeUri(java.lang.String typeUri)
Gets the (first) value for the specified attribute type URI.
|
java.util.List |
getAttributeValues(java.lang.String alias)
Returns a list with the attribute value(s) associated for the specified
attribute alias.
|
java.util.List |
getAttributeValuesByTypeUri(java.lang.String typeUri)
Returns a list with the attribute value(s) associated for the specified
attribute type URI.
|
int |
getCount(java.lang.String alias)
Gets the number of values provided in the attribute payload for the
specified attribute alias.
|
protected boolean |
isValid() |
private void |
setCount(java.lang.String alias,
int count)
Sets the number of values provided in the attribute payload for the
specified attribute alias.
|
getExtension, getParameters, getParameterValue, getTypeUri, providesIdentifier, setParameters, signRequired
private static org.apache.commons.logging.Log _log
private static final boolean DEBUG
private int _attrAliasCounter
private java.lang.String generateAlias()
public void addAttribute(java.lang.String alias, java.lang.String typeUri, java.lang.String value) throws MessageException
alias
- The alias identifier that will be associated
with the attribute type URI.typeUri
- The attribute type URI.value
- The value of the attribute.MessageException
public java.lang.String addAttribute(java.lang.String typeUri, java.lang.String value)
typeUri
- The attribute type URI.value
- The attribute value.public void addAttributes(java.util.Map attributes)
attributes
- Mappublic java.util.List getAttributeValues(java.lang.String alias)
alias
- The attribute alias.public java.lang.String getAttributeTypeUri(java.lang.String alias)
public java.lang.String getAttributeAlias(java.lang.String typeUri)
typeUri
- the attribyte type URI for which the alias is looked uppublic java.lang.String getAttributeValueByTypeUri(java.lang.String typeUri)
typeUri
- public java.util.List getAttributeValuesByTypeUri(java.lang.String typeUri)
typeUri
- The attribute type URI.public java.lang.String getAttributeValue(java.lang.String alias)
public java.util.List getAttributeAliases()
public java.util.Map getAttributes()
public java.util.Map getAttributeTypes()
public int getCount(java.lang.String alias)
alias
- The attribute alias.private void setCount(java.lang.String alias, int count)
alias
- The attribute alias.count
- The number of values.protected boolean isValid()
private boolean checkAttributes()
Copyright 2006-2008 Sxip Identity Corporation