| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_ID_CREATE
The name of the action which is reserved for performing "create" operations.
|
static String |
FIELD_ACTION
The name of the field which contains the action ID in the JSON representation.
|
static String |
FIELD_CONTENT
The name of the field which contains the action content in the JSON representation.
|
FIELD_ADDITIONAL_PARAMETERS, FIELD_FIELDS, FIELD_RESOURCE_PATH| Modifier and Type | Method and Description |
|---|---|
<R,P> R |
accept(RequestVisitor<R,P> v,
P p)
Applies a
RequestVisitor to this Request. |
ActionRequest |
addField(JsonPointer... fields)
Adds one or more fields which should be included with each JSON resource returned by this request.
|
ActionRequest |
addField(String... fields)
Adds one or more fields which should be included with each JSON resource returned by this request.
|
String |
getAction()
Returns the ID of the action to be performed by this action request.
|
<T extends Enum<T>> |
getActionAsEnum(Class<T> type)
Returns the ID of the action to be performed by this action request as a enum constant of the specified enum
type.
|
String |
getAdditionalParameter(String name)
Returns the additional parameter which should be used to control the behavior of this action request.
|
Map<String,String> |
getAdditionalParameters()
Returns the additional parameters which should be used to control the behavior of this action request.
|
JsonValue |
getContent()
Returns the content of this action request.
|
List<JsonPointer> |
getFields()
Returns the list of fields which should be included with each JSON resource returned by this request.
|
PreferredLocales |
getPreferredLocales()
Get the locale preference for the request.
|
RequestType |
getRequestType()
Returns the type of this request.
|
String |
getResourcePath()
Returns the non-
null path of the JSON resource to which this request should be targeted. |
ResourcePath |
getResourcePathObject()
Returns the non-
null path of the JSON resource to which this request should be targeted. |
Version |
getResourceVersion()
Gets the requested API version of the resource.
|
ActionRequest |
setAction(String id)
Sets the ID of the action to be performed by this action request.
|
ActionRequest |
setAdditionalParameter(String name,
String value)
Sets an additional parameter which should be used to control the behavior of this action request.
|
ActionRequest |
setContent(JsonValue content)
Sets the content of this action request.
|
ActionRequest |
setPreferredLocales(PreferredLocales preferredLocales)
Set the locale preference for the request.
|
ActionRequest |
setResourcePath(ResourcePath path)
Sets the non-
null path of the JSON resource to which this request should be targeted. |
ActionRequest |
setResourcePath(String path)
Sets the non-
null path of the JSON resource to which this request should be targeted. |
ActionRequest |
setResourceVersion(Version resourceVersion)
Sets the requested API version of the resource.
|
JsonValue |
toJsonValue()
Return a JsonValue representation of this request.
|
static final String ACTION_ID_CREATE
static final String FIELD_ACTION
static final String FIELD_CONTENT
<R,P> R accept(RequestVisitor<R,P> v, P p)
RequestRequestVisitor to this Request.ActionRequest addField(JsonPointer... fields)
RequestActionRequest addField(String... fields)
RequestString getAction()
<T extends Enum<T>> T getActionAsEnum(Class<T> type)
T - the enum type sub-class.type - the enum type to match constants with the value.IllegalArgumentException - if type does not represent an enum type, or if the ID does not match any of the enum's
constants.NullPointerException - if type is null.String getAdditionalParameter(String name)
RequestgetAdditionalParameter in interface Requestname - The name of the additional parameter.Map<String,String> getAdditionalParameters()
RequestgetAdditionalParameters in interface Requestnull).JsonValue getContent()
List<JsonPointer> getFields()
RequestNOTE: field filtering alters the structure of a JSON resource and MUST only be performed once while processing a request. It is therefore the responsibility of front-end implementations (e.g. HTTP listeners, Servlets, etc) to perform field filtering. Request handler and resource provider implementations SHOULD NOT filter fields, but MAY choose to optimise their processing in order to return a resource containing only the fields targeted by the field filters.
PreferredLocales getPreferredLocales()
RequestgetPreferredLocales in interface RequestPreferredLocales instance for the request.RequestType getRequestType()
RequestgetRequestType in interface RequestString getResourcePath()
Requestnull path of the JSON resource to which this request should be targeted. The resource
path is relative and never begins or ends with a forward slash, but may be empty.
NOTE: for resource provider implementations the resource path is relative to the current resource being
accessed. See the description of UriRouterContext for more information.
getResourcePath in interface Requestnull path of the JSON resource to which this request should be targeted, which may be the
empty string.ResourcePath getResourcePathObject()
Requestnull path of the JSON resource to which this request should be targeted. The resource
path is relative and never begins or ends with a forward slash, but may be empty.
NOTE: for resource provider implementations the resource path is relative to the current resource being
accessed. See the description of UriRouterContext for more information.
getResourcePathObject in interface Requestnull path of the JSON resource to which this request should be targeted, which may be the
empty string.Version getResourceVersion()
RequestgetResourceVersion in interface RequestActionRequest setAction(String id)
id - The ID of the action to be performed by this action request.UnsupportedOperationException - If this action request does not permit changes to the action ID.ActionRequest setAdditionalParameter(String name, String value) throws BadRequestException
RequestsetAdditionalParameter in interface Requestname - The name of the additional parameter.value - The additional parameter's value.BadRequestException - If this request does not permit the additional parameter to be set.ActionRequest setContent(JsonValue content)
content - The content of this action request.UnsupportedOperationException - If this action request does not permit changes to the content.ActionRequest setPreferredLocales(PreferredLocales preferredLocales)
RequestsetPreferredLocales in interface RequestpreferredLocales - The PreferredLocales instance for the request.ActionRequest setResourcePath(ResourcePath path)
Requestnull path of the JSON resource to which this request should be targeted. The resource path
is relative and never begins or ends with a forward slash, but may be empty.
NOTE: for resource provider implementations the resource path is relative to the current resource being
accessed. See the description of UriRouterContext for more information.
setResourcePath in interface Requestpath - The non-null path of the JSON resource to which this request should be targeted, which may be the
empty string.ActionRequest setResourcePath(String path)
Requestnull path of the JSON resource to which this request should be targeted. The resource path
is relative and never begins or ends with a forward slash, but may be empty.
NOTE: for resource provider implementations the resource path is relative to the current resource being
accessed. See the description of UriRouterContext for more information.
setResourcePath in interface Requestpath - The non-null path of the JSON resource to which this request should be targeted, which may be the
empty string. The path should be URL-encoded.ActionRequest setResourceVersion(Version resourceVersion)
RequestsetResourceVersion in interface RequestresourceVersion - The requested API version of the resource.JsonValue toJsonValue()
RequesttoJsonValue in interface RequestCopyright © 2025 Open Identity Platform Community. All rights reserved.