Interface ActionRequest
- 
- 
Field SummaryFields Modifier and Type Field Description static StringACTION_ID_CREATEThe name of the action which is reserved for performing "create" operations.static StringFIELD_ACTIONThe name of the field which contains the action ID in the JSON representation.static StringFIELD_CONTENTThe name of the field which contains the action content in the JSON representation.- 
Fields inherited from interface org.forgerock.json.resource.RequestFIELD_ADDITIONAL_PARAMETERS, FIELD_FIELDS, FIELD_RESOURCE_PATH, FIELD_VALUE_ALL
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description <R,P>
 Raccept(RequestVisitor<R,P> v, P p)Applies aRequestVisitorto thisRequest.ActionRequestaddField(String... fields)Adds one or more fields which should be included with each JSON resource returned by this request.ActionRequestaddField(JsonPointer... fields)Adds one or more fields which should be included with each JSON resource returned by this request.StringgetAction()Returns the ID of the action to be performed by this action request.<T extends Enum<T>>
 TgetActionAsEnum(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.StringgetAdditionalParameter(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.JsonValuegetContent()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.PreferredLocalesgetPreferredLocales()Get the locale preference for the request.RequestTypegetRequestType()Returns the type of this request.StringgetResourcePath()Returns the non-nullpath of the JSON resource to which this request should be targeted.ResourcePathgetResourcePathObject()Returns the non-nullpath of the JSON resource to which this request should be targeted.VersiongetResourceVersion()Gets the requested API version of the resource.ActionRequestsetAction(String id)Sets the ID of the action to be performed by this action request.ActionRequestsetAdditionalParameter(String name, String value)Sets an additional parameter which should be used to control the behavior of this action request.ActionRequestsetContent(JsonValue content)Sets the content of this action request.ActionRequestsetPreferredLocales(PreferredLocales preferredLocales)Set the locale preference for the request.ActionRequestsetResourcePath(String path)Sets the non-nullpath of the JSON resource to which this request should be targeted.ActionRequestsetResourcePath(ResourcePath path)Sets the non-nullpath of the JSON resource to which this request should be targeted.ActionRequestsetResourceVersion(Version resourceVersion)Sets the requested API version of the resource.JsonValuetoJsonValue()Return a JsonValue representation of this request.
 
- 
- 
- 
Field Detail- 
ACTION_ID_CREATEstatic final String ACTION_ID_CREATE The name of the action which is reserved for performing "create" operations.- See Also:
- Constant Field Values
 
 - 
FIELD_ACTIONstatic final String FIELD_ACTION The name of the field which contains the action ID in the JSON representation.- See Also:
- Constant Field Values
 
 - 
FIELD_CONTENTstatic final String FIELD_CONTENT The name of the field which contains the action content in the JSON representation.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
accept<R,P> R accept(RequestVisitor<R,P> v, P p) Description copied from interface:RequestApplies aRequestVisitorto thisRequest.
 - 
addFieldActionRequest addField(JsonPointer... fields) Description copied from interface:RequestAdds one or more fields which should be included with each JSON resource returned by this request.
 - 
addFieldActionRequest addField(String... fields) Description copied from interface:RequestAdds one or more fields which should be included with each JSON resource returned by this request.
 - 
getActionString getAction() Returns the ID of the action to be performed by this action request.- Returns:
- The ID of the action to be performed by this action request.
 
 - 
getActionAsEnum<T extends Enum<T>> 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. The action ID string and enum constants are compared, ignoring case considerations.- Type Parameters:
- T- the enum type sub-class.
- Parameters:
- type- the enum type to match constants with the value.
- Returns:
- the enum constant represented by the Id of the action to be performed by this action request.
- Throws:
- IllegalArgumentException- if- typedoes not represent an enum type, or if the ID does not match any of the enum's constants.
- NullPointerException- if- typeis- null.
 
 - 
getAdditionalParameterString getAdditionalParameter(String name) Description copied from interface:RequestReturns the additional parameter which should be used to control the behavior of this action request.- Specified by:
- getAdditionalParameterin interface- Request
- Parameters:
- name- The name of the additional parameter.
- Returns:
- The additional parameter which should be used to control the behavior of this action request
 
 - 
getAdditionalParametersMap<String,String> getAdditionalParameters() Description copied from interface:RequestReturns the additional parameters which should be used to control the behavior of this action request. The returned map may be modified if permitted by this action request.- Specified by:
- getAdditionalParametersin interface- Request
- Returns:
- The additional parameters which should be used to control the behavior of this action request (never
 null).
 
 - 
getContentJsonValue getContent() Returns the content of this action request. The structure of the content is defined by the action.- Returns:
- The content of this action request.
 
 - 
getFieldsList<JsonPointer> getFields() Description copied from interface:RequestReturns the list of fields which should be included with each JSON resource returned by this request. The returned list may be modified if permitted by this query request. An empty list indicates that all fields should be included.NOTE: 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. 
 - 
getPreferredLocalesPreferredLocales getPreferredLocales() Description copied from interface:RequestGet the locale preference for the request.- Specified by:
- getPreferredLocalesin interface- Request
- Returns:
- The PreferredLocalesinstance for the request.
 
 - 
getRequestTypeRequestType getRequestType() Description copied from interface:RequestReturns the type of this request.- Specified by:
- getRequestTypein interface- Request
- Returns:
- The type of this request.
 
 - 
getResourcePathString getResourcePath() Description copied from interface:RequestReturns the non-nullpath 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 UriRouterContextfor more information.- Specified by:
- getResourcePathin interface- Request
- Returns:
- The non-nullpath of the JSON resource to which this request should be targeted, which may be the empty string.
 
 - 
getResourcePathObjectResourcePath getResourcePathObject() Description copied from interface:RequestReturns the non-nullpath 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 UriRouterContextfor more information.- Specified by:
- getResourcePathObjectin interface- Request
- Returns:
- The non-nullpath of the JSON resource to which this request should be targeted, which may be the empty string.
 
 - 
getResourceVersionVersion getResourceVersion() Description copied from interface:RequestGets the requested API version of the resource.- Specified by:
- getResourceVersionin interface- Request
- Returns:
- The requested API version of the resource.
 
 - 
setActionActionRequest setAction(String id) Sets the ID of the action to be performed by this action request.- Parameters:
- id- The ID of the action to be performed by this action request.
- Returns:
- This action request.
- Throws:
- UnsupportedOperationException- If this action request does not permit changes to the action ID.
 
 - 
setAdditionalParameterActionRequest setAdditionalParameter(String name, String value) throws BadRequestException Description copied from interface:RequestSets an additional parameter which should be used to control the behavior of this action request.- Specified by:
- setAdditionalParameterin interface- Request
- Parameters:
- name- The name of the additional parameter.
- value- The additional parameter's value.
- Returns:
- This request.
- Throws:
- BadRequestException- If this request does not permit the additional parameter to be set.
 
 - 
setContentActionRequest setContent(JsonValue content) Sets the content of this action request. The structure of the content is defined by the action.- Parameters:
- content- The content of this action request.
- Returns:
- This action request.
- Throws:
- UnsupportedOperationException- If this action request does not permit changes to the content.
 
 - 
setPreferredLocalesActionRequest setPreferredLocales(PreferredLocales preferredLocales) Description copied from interface:RequestSet the locale preference for the request.- Specified by:
- setPreferredLocalesin interface- Request
- Parameters:
- preferredLocales- The- PreferredLocalesinstance for the request.
- Returns:
- This request.
 
 - 
setResourcePathActionRequest setResourcePath(ResourcePath path) Description copied from interface:RequestSets the non-nullpath 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 UriRouterContextfor more information.- Specified by:
- setResourcePathin interface- Request
- Parameters:
- path- The non-- nullpath of the JSON resource to which this request should be targeted, which may be the empty string.
- Returns:
- This request.
 
 - 
setResourcePathActionRequest setResourcePath(String path) Description copied from interface:RequestSets the non-nullpath 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 UriRouterContextfor more information.- Specified by:
- setResourcePathin interface- Request
- Parameters:
- path- The non-- nullpath of the JSON resource to which this request should be targeted, which may be the empty string. The path should be URL-encoded.
- Returns:
- This request.
 
 - 
setResourceVersionActionRequest setResourceVersion(Version resourceVersion) Description copied from interface:RequestSets the requested API version of the resource.- Specified by:
- setResourceVersionin interface- Request
- Parameters:
- resourceVersion- The requested API version of the resource.
- Returns:
- This request.
 
 - 
toJsonValueJsonValue toJsonValue() Description copied from interface:RequestReturn a JsonValue representation of this request.- Specified by:
- toJsonValuein interface- Request
- Returns:
- this request as a JsonValue
 
 
- 
 
-