public class Message extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
_destinationUrl |
static String |
MODE_CANCEL |
static String |
MODE_IDRES |
static String |
MODE_SETUP_NEEDED |
static String |
OPENID2_NS |
| Modifier | Constructor and Description |
|---|---|
protected |
Message() |
protected |
Message(ParameterList params) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(MessageExtension extension)
Adds a set of extension-specific parameters to a message.
|
static void |
addExtensionFactory(Class clazz)
Adds a new extension factory.
|
static Message |
createMessage() |
static Message |
createMessage(ParameterList params) |
String |
getDestinationUrl(boolean httpGet)
Gets the URL where the message should be sent, where applicable.
|
MessageExtension |
getExtension(String typeUri)
Gets a MessageExtension for the specified Type URI if an implementation
is available, or null otherwise.
|
String |
getExtensionAlias(String extensionTypeUri)
Retrieves the extension alias that will be used for the extension
identified by the supplied extension type URI.
|
static MessageExtensionFactory |
getExtensionFactory(String typeUri)
Gets a MessageExtensionFactory for the specified Type URI
if an implementation is available, or null otherwise.
|
Set |
getExtensions()
Gets a set of extension Type URIs that are present in the message.
|
protected Parameter |
getParameter(String name) |
Map |
getParameterMap() |
protected List |
getParameters() |
String |
getParameterValue(String name) |
List |
getRequiredFields() |
boolean |
hasExtension(String typeUri)
Returns true if the message has parameters for the specified
extension type URI.
|
static boolean |
hasExtensionFactory(String typeUri)
Returns true if there is an extension factory available for extension
identified by the specified Type URI, or false otherwise.
|
boolean |
hasParameter(String name) |
String |
keyValueFormEncoding() |
protected void |
set(String name,
String value) |
void |
validate()
Checks that all required parameters are present
|
String |
wwwFormEncoding() |
public static final String MODE_IDRES
public static final String MODE_CANCEL
public static final String MODE_SETUP_NEEDED
public static final String OPENID2_NS
protected String _destinationUrl
protected Message()
protected Message(ParameterList params)
public static Message createMessage() throws MessageException
MessageExceptionpublic static Message createMessage(ParameterList params) throws MessageException
MessageExceptionpublic static void addExtensionFactory(Class clazz) throws MessageException
clazz - The implementation class for the extension factory,
must implement MessageExtensionFactory.MessageExceptionpublic static boolean hasExtensionFactory(String typeUri)
typeUri - The Type URI that identifies an extension.public static MessageExtensionFactory getExtensionFactory(String typeUri)
typeUri - The Type URI that identifies a extension.Messagepublic boolean hasParameter(String name)
protected List getParameters()
public Map getParameterMap()
public void validate()
throws MessageException
MessageExceptionpublic List getRequiredFields()
public String keyValueFormEncoding()
public String wwwFormEncoding()
public String getDestinationUrl(boolean httpGet)
httpGet - If true, the wwwFormEncoding() is appended to the
destination URL; the return value should be used
with a GET-redirect.
If false, the verbatim destination URL is returned,
which should be used with a FORM POST redirect.wwwFormEncoding()public boolean hasExtension(String typeUri)
typeUri - The URI that identifies the extension.public Set getExtensions()
public String getExtensionAlias(String extensionTypeUri)
extensionTypeUri - The URI that identifies the extensionpublic void addExtension(MessageExtension extension) throws MessageException
extension - A MessageExtension containing parameters
to be added to the messageMessageExceptionpublic MessageExtension getExtension(String typeUri) throws MessageException
typeUri - The Type URI that identifies a extension.MessageExceptionCopyright © 2015 WSO2. All rights reserved.