public class FetchRequest extends AxMessage
Message_parameters, OPENID_NS_AX| Modifier | Constructor and Description |
|---|---|
protected |
FetchRequest()
Constructs a Fetch Request with an empty parameter list.
|
protected |
FetchRequest(ParameterList params)
Constructs a FetchRequest from a parameter list.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addAttribute(String typeUri,
boolean required)
Adds an attribute to the fetch request, with a default value-count of 1.
|
void |
addAttribute(String alias,
String typeUri,
boolean required)
Adds an attribute to the fetch request, with a default value-count of 1.
|
void |
addAttribute(String alias,
String typeUri,
boolean required,
int count)
Adds an attribute to the fetch request.
|
static FetchRequest |
createFetchRequest()
Constructs a Fetch Request with an empty parameter list.
|
static FetchRequest |
createFetchRequest(ParameterList params)
Constructs a FetchRequest from a parameter list.
|
Map |
getAttributes()
Gets all requested attributes (required and optional).
|
Map |
getAttributes(boolean required)
Returns a map with the requested attributes.
|
int |
getCount(String alias)
Returns the number of values requested for the specified attribute alias.
|
String |
getUpdateUrl()
Gets the optional 'update_url' parameter if available, or null otherwise.
|
boolean |
isValid()
Checks the validity of the extension.
|
void |
setCount(String alias,
int count)
Sets the desired number of attribute vaules requested for the specified
attribute alias.
|
void |
setUpdateUrl(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.
|
getExtension, getParameters, getParameterValue, getTypeUri, providesIdentifier, setParameters, signRequiredprotected FetchRequest()
protected FetchRequest(ParameterList params)
public static FetchRequest createFetchRequest()
public static FetchRequest createFetchRequest(ParameterList params) throws MessageException
MessageExceptionpublic void addAttribute(String alias, 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".MessageExceptionpublic void addAttribute(String alias, String typeUri, boolean required) throws MessageException
MessageExceptionaddAttribute(String, String, boolean, int)public String addAttribute(String typeUri, boolean required) throws MessageException
MessageExceptionaddAttribute(String, String, boolean, int)public void setCount(String alias, int count)
alias - The attribute alias.public int getCount(String alias)
alias - The attribute alias.public String getUpdateUrl()
public void setUpdateUrl(String updateUrl) throws MessageException
updateUrl - The URL where the RP accepts later updates
to the requested attributes.MessageExceptionpublic Map getAttributes(boolean required)
required - If set to true the list of 'required' attributes
is returned, otherwise the list of 'if_available'
attributes.public Map getAttributes()
public boolean isValid()
Copyright © 2015 WSO2. All rights reserved.