org.openid4java.message.ax
Class AxMessage

java.lang.Object
  extended by org.openid4java.message.ax.AxMessage
All Implemented Interfaces:
MessageExtension, MessageExtensionFactory
Direct Known Subclasses:
AxPayload, FetchRequest, StoreResponse

public class AxMessage
extends java.lang.Object
implements MessageExtension, MessageExtensionFactory

Base class for the Attribute Exchange implementation.

Encapsulates:

Author:
Marius Scurtescu, Johnny Bufu
See Also:
MessageExtension

Field Summary
protected  ParameterList _parameters
          The Attribute Exchange extension-specific parameters.
static java.lang.String OPENID_NS_AX
          The Attribute Exchange Type URI.
 
Constructor Summary
AxMessage()
          Constructs an empty (no parameters) Attribute Exchange extension.
AxMessage(ParameterList params)
          Constructs an Attribute Exchange extension with a specified list of parameters.
 
Method Summary
 MessageExtension getExtension(ParameterList parameterList, boolean isRequest)
          Instantiates the apropriate Attribute Exchange object (fetch / store - request / response) for the supplied parameter list.
 ParameterList getParameters()
          Gets ParameterList containing the Attribute Exchange extension-specific parameters.
 java.lang.String getParameterValue(java.lang.String name)
          Gets a the value of the parameter with the specified name.
 java.lang.String getTypeUri()
          Gets the Type URI that identifies the Attribute Exchange extension.
 boolean providesIdentifier()
          Attribute exchange doesn't implement authentication services.
 void setParameters(ParameterList params)
          Sets the extension's parameters to the supplied list.
 boolean signRequired()
          Attribute exchange parameters are required to be signed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPENID_NS_AX

public static final java.lang.String OPENID_NS_AX
The Attribute Exchange Type URI.

See Also:
Constant Field Values

_parameters

protected ParameterList _parameters
The Attribute Exchange extension-specific parameters.

The openid. prefix is not part of the parameter names

Constructor Detail

AxMessage

public AxMessage()
Constructs an empty (no parameters) Attribute Exchange extension.


AxMessage

public AxMessage(ParameterList params)
Constructs an Attribute Exchange extension with a specified list of parameters.

The parameter names in the list should not contain the openid..

Method Detail

getTypeUri

public java.lang.String getTypeUri()
Gets the Type URI that identifies the Attribute Exchange extension.

Specified by:
getTypeUri in interface MessageExtension
Specified by:
getTypeUri in interface MessageExtensionFactory

getParameters

public ParameterList getParameters()
Gets ParameterList containing the Attribute Exchange extension-specific parameters.

The openid. prefix is not part of the parameter names, as it is handled internally by the Message class.

The openid.ns. parameter is also handled by the Message class.

Specified by:
getParameters in interface MessageExtension
See Also:
Message

getParameterValue

public java.lang.String getParameterValue(java.lang.String name)
Gets a the value of the parameter with the specified name.

Parameters:
name - The name of the parameter, without the openid. prefix.
Returns:
The parameter value, or null if not found.

setParameters

public void setParameters(ParameterList params)
Sets the extension's parameters to the supplied list.

The parameter names in the list should not contain the openid. prefix.

Specified by:
setParameters in interface MessageExtension
See Also:
Message

providesIdentifier

public boolean providesIdentifier()
Attribute exchange doesn't implement authentication services.

Specified by:
providesIdentifier in interface MessageExtension
Returns:
false

signRequired

public boolean signRequired()
Attribute exchange parameters are required to be signed.

Specified by:
signRequired in interface MessageExtension
Returns:
true

getExtension

public MessageExtension getExtension(ParameterList parameterList,
                                     boolean isRequest)
                              throws MessageException
Instantiates the apropriate Attribute Exchange object (fetch / store - request / response) for the supplied parameter list.

Specified by:
getExtension in interface MessageExtensionFactory
Parameters:
parameterList - The Attribute Exchange specific parameters (without the openid. prefix) extracted from the openid message.
isRequest - Indicates whether the parameters were extracted from an OpenID request (true), or from an OpenID response.
Returns:
MessageExtension implementation for the supplied extension parameters.
Throws:
MessageException - If a Attribute Exchange object could not be instantiated from the supplied parameter list.


Copyright © 2012 Sxip. All Rights Reserved.