|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openid4java.message.ax.AxMessage
org.openid4java.message.ax.FetchRequest
public class FetchRequest
Implements the extension for Attribute Exchange fetch requests.
Message| Field Summary | |
|---|---|
private static org.apache.commons.logging.Log |
_log
|
private static boolean |
DEBUG
|
| Fields inherited from class org.openid4java.message.ax.AxMessage |
|---|
_parameters, OPENID_NS_AX |
| Constructor Summary | |
|---|---|
protected |
FetchRequest()
Constructs a Fetch Request with an empty parameter list. |
protected |
FetchRequest(ParameterList params)
Constructs a FetchRequest from a parameter list. |
| Method Summary | |
|---|---|
void |
addAttribute(java.lang.String alias,
java.lang.String typeUri,
boolean required)
Adds an attribute to the fetch request, with a default value-count of 1. |
void |
addAttribute(java.lang.String alias,
java.lang.String typeUri,
boolean required,
int count)
Adds an attribute to the fetch request. |
private boolean |
checkCount(java.lang.String alias)
|
static FetchRequest |
createFetchRequest()
Constructs a Fetch Request with an empty parameter list. |
static FetchRequest |
createFetchRequest(ParameterList params)
Constructs a FetchRequest from a parameter list. |
java.util.Map |
getAttributes()
Gets all requested attributes (required and optional). |
java.util.Map |
getAttributes(boolean required)
Returns a map with the requested attributes. |
int |
getCount(java.lang.String alias)
Returns the number of values requested for the specified attribute alias. |
java.lang.String |
getUpdateUrl()
Gets the optional 'update_url' parameter if available, or null otherwise. |
boolean |
isValid()
Checks the validity of the extension. |
void |
setCount(java.lang.String alias,
int count)
Sets the desired number of attribute vaules requested for the specified attribute alias. |
void |
setUpdateUrl(java.lang.String updateUrl)
Sets the optional 'update_url' parameter where the OP can later re-post fetch-response updates to the values of the requested attributes. |
| Methods inherited from class org.openid4java.message.ax.AxMessage |
|---|
getExtension, getParameters, getParameterValue, getTypeUri, providesIdentifier, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static org.apache.commons.logging.Log _log
private static final boolean DEBUG
| Constructor Detail |
|---|
protected FetchRequest()
protected FetchRequest(ParameterList params)
The parameter list can be extracted from a received message with the
getExtensionParams method of the Message class, and MUST NOT contain
the "openid.
| Method Detail |
|---|
public static FetchRequest createFetchRequest()
public static FetchRequest createFetchRequest(ParameterList params)
throws MessageException
The parameter list can be extracted from a received message with the
getExtensionParams method of the Message class, and MUST NOT contain
the "openid.
MessageException
public void addAttribute(java.lang.String alias,
java.lang.String typeUri,
boolean required,
int count)
throws MessageException
alias - The attribute alias that will be associated
with the attribute type URItypeUri - The attribute type URIrequired - If true, marks the attribute as 'required';
'if_available' otherwise.count - The number of attribute values requested.
0 for the special value "unlimited".
MessageException
public void addAttribute(java.lang.String alias,
java.lang.String typeUri,
boolean required)
throws MessageException
MessageExceptionaddAttribute(String, String, boolean, int)
public void setCount(java.lang.String alias,
int count)
alias - The attribute alias.public int getCount(java.lang.String alias)
alias - The attribute alias.
public void setUpdateUrl(java.lang.String updateUrl)
throws MessageException
updateUrl - The URL where the RP accepts later updates
to the requested attributes.
MessageExceptionpublic java.lang.String getUpdateUrl()
public java.util.Map getAttributes(boolean required)
required - If set to true the list of 'required' attributes
is returned, otherwise the list of 'if_available'
attributes.
public java.util.Map getAttributes()
public boolean isValid()
Used when constructing a extension from a parameter list.
private boolean checkCount(java.lang.String alias)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||