public static class ExecutionContext.ApplicationData
extends java.lang.Object
ExecutionContext.
The application data format is key-value pairs of Strings.
This application data is provided by the client initiating the execution, it is then transported as is over the wire and is available for the provider-side service implementations on the server. This extra data is completely opaque for the infrastructure, in other words it is a contract between the client and the service implementation only.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACCEPT_LANGUAGE_KEY
ApplicationData translation language preference property key. |
static java.lang.String |
FORMAT_LOCALE_KEY
ApplicationData formatting locale property key. |
static java.lang.String |
TIMEZONE_KEY
ApplicationData timezone preference property key. |
static java.lang.String |
USER_AGENT_KEY
ApplicationData property key for user agent. |
| Constructor and Description |
|---|
ApplicationData()
Constructs an empty instance.
|
ApplicationData(java.util.Map<java.lang.String,java.lang.String> data)
Constructs an instance with the specified data as a source.
|
ApplicationData(java.lang.String key,
java.lang.String value)
Constructs an instance with a single property only.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getAllProperties() |
java.lang.String |
getProperty(java.lang.String key) |
static ExecutionContext.ApplicationData |
merge(ExecutionContext.ApplicationData source,
java.util.Map<java.lang.String,java.lang.String> data)
Merges the specified
source and data into a newly
created ApplicationData instance. |
static ExecutionContext.ApplicationData |
merge(ExecutionContext.ApplicationData source,
java.lang.String key,
java.lang.String value)
Merges the specified
source and property into a newly created
ApplicationData instance. |
public static final java.lang.String USER_AGENT_KEY
ApplicationData property key for user agent.public static final java.lang.String TIMEZONE_KEY
ApplicationData timezone preference property key.
Optional Timezone ID from the IANA database to be used for rendering date and time values. When missing, UTC will be used.
public static final java.lang.String ACCEPT_LANGUAGE_KEY
ApplicationData translation language preference property key.
Optional parameter following the format of the HTTP 1.1 Accept-Language header (RFC 7231 section 5.3.5) used for selecting localization bundle.
When missing "en" will be used.
public static final java.lang.String FORMAT_LOCALE_KEY
ApplicationData formatting locale property key.
Optional parameter following the format of the HTTP 1.1
Accept-Language header (RFC 7231 section 5.3.5) used for overriding
the value format locale. When missing, implementations will fall back
to the accept-language parameter.
If both parameters are missing, locale neutral formatting should be applied i.e. short date to use "yyyy-MM-dd".
public ApplicationData()
public ApplicationData(java.util.Map<java.lang.String,java.lang.String> data)
data - key-value entriesjava.lang.NullPointerException - if data is
nullpublic ApplicationData(java.lang.String key,
java.lang.String value)
key - the key of the propertyvalue - the value of the propertypublic java.lang.String getProperty(java.lang.String key)
key - of the propertykey or null
if it is unavailablepublic java.util.Map<java.lang.String,java.lang.String> getAllProperties()
Map representing all the properties;
cannot be nullpublic static ExecutionContext.ApplicationData merge(ExecutionContext.ApplicationData source, java.util.Map<java.lang.String,java.lang.String> data)
source and data into a newly
created ApplicationData instance. Any conflicts are resolved
in favor of the specified data.source - the source of data; may be nulldata - a collection of properties to merge with the
sourceApplicationData combining the
specified source and datajava.lang.NullPointerException - if data is
nullpublic static ExecutionContext.ApplicationData merge(ExecutionContext.ApplicationData source, java.lang.String key, java.lang.String value)
source and property into a newly created
ApplicationData instance. The specified value will
override the previous one, if a property with the specified
key is already present in the source.source - the source of data; may be nullkey - the key of the property to merge with the sourcevalue - the value of the property to merge with the
sourceApplicationData combining the
specified source and property