public class DefaultRestFragmentContext extends Object implements RestFragmentContext
Constructor and Description |
---|
DefaultRestFragmentContext(Map<String,Object> body,
String httpMethod,
javax.ws.rs.core.UriInfo uriInfo) |
Modifier and Type | Method and Description |
---|---|
Optional<Object> |
getBodyProperty(String key)
Return a property from the request body of the currently executing REST request.
|
String |
getMethod()
Return the HTTP method of the currently executing REST request.
|
Optional<String> |
getQueryParameter(String name)
Return the first value of a query parameter of the currently executing REST request.
|
Map<String,List<String>> |
getQueryParameters()
Return all of the query parameters of the currently executing REST request, and their values.
|
List<String> |
getQueryParameters(String name)
Return the values of a query parameter of the currently executing REST request.
|
@Nonnull public Optional<Object> getBodyProperty(@Nonnull String key)
RestFragmentContext
getBodyProperty
in interface RestFragmentContext
key
- the key of the body property@Nonnull public String getMethod()
RestFragmentContext
getMethod
in interface RestFragmentContext
HttpMethod
being used@Nonnull public Optional<String> getQueryParameter(@Nonnull String name)
RestFragmentContext
If the query parameter might have more than one value, use RestFragmentContext.getQueryParameters(java.lang.String)
instead. If this method is
used with a multivalued query parameter, the value returned is equal to the first value in the array returned by
RestFragmentContext.getQueryParameters(java.lang.String)
.
getQueryParameter
in interface RestFragmentContext
name
- the name of the query parameterString
representing the single value of the query parameter@Nonnull public List<String> getQueryParameters(@Nonnull String name)
RestFragmentContext
getQueryParameters
in interface RestFragmentContext
name
- the name of the query parameterList
of String Strings
representing the values of the query parameter, which will be
empty if the query parameter does not exist@Nonnull public Map<String,List<String>> getQueryParameters()
RestFragmentContext
getQueryParameters
in interface RestFragmentContext
Map
of query parameter names to a List
of query parameter values for each nameCopyright © 2021 Atlassian. All rights reserved.