org.openid4java.message.ax
Class StoreResponse

java.lang.Object
  extended by org.openid4java.message.ax.AxMessage
      extended by org.openid4java.message.ax.StoreResponse
All Implemented Interfaces:
MessageExtension, MessageExtensionFactory

public class StoreResponse
extends AxMessage

Implements the extension for Attribute Exchange store responses.

Author:
Marius Scurtescu, Johnny Bufu

Field Summary
 
Fields inherited from class org.openid4java.message.ax.AxMessage
_parameters, OPENID_NS_AX
 
Constructor Summary
protected StoreResponse()
          Constructs a Store Response with an empty parameter list.
protected StoreResponse(ParameterList params)
          Constructs a StoreResponse from a parameter list.
 
Method Summary
static StoreResponse createStoreResponse()
          Constructs a Store Response with an empty parameter list.
static StoreResponse createStoreResponse(ParameterList params)
          Constructs a StoreResponse from a parameter list.
 java.lang.String getErrorDescription()
          Gets the status of the Store Response if the 'status' parameter is part of the response, or null otherwise.
 boolean hasFailed()
          Returns true if the Store Response is a failure message, true if it is a success response.
 void setFailure(java.lang.String description)
          Marks the Store Response as a failure, by setting the appropirate parameters.
 
Methods inherited from class org.openid4java.message.ax.AxMessage
getExtension, getParameters, getParameterValue, getTypeUri, providesIdentifier, setParameters, signRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreResponse

protected StoreResponse()
Constructs a Store Response with an empty parameter list.


StoreResponse

protected StoreResponse(ParameterList params)
Constructs a StoreResponse from a parameter list.

The parameter list can be extracted from a received message with the getExtensionParams method of the Message class, and MUST NOT contain the "openid.." prefix.

Method Detail

createStoreResponse

public static StoreResponse createStoreResponse()
Constructs a Store Response with an empty parameter list.


createStoreResponse

public static StoreResponse createStoreResponse(ParameterList params)
                                         throws MessageException
Constructs a StoreResponse from a parameter list.

The parameter list can be extracted from a received message with the getExtensionParams method of the Message class, and MUST NOT contain the "openid.." prefix.

Throws:
MessageException

setFailure

public void setFailure(java.lang.String description)
Marks the Store Response as a failure, by setting the appropirate parameters.

Parameters:
description - Describes the error condition leading to the failure response

hasFailed

public boolean hasFailed()
Returns true if the Store Response is a failure message, true if it is a success response.


getErrorDescription

public java.lang.String getErrorDescription()
Gets the status of the Store Response if the 'status' parameter is part of the response, or null otherwise.



Copyright © 2011 Sxip. All Rights Reserved.