Package org.forgerock.json.resource
Interface SingletonResourceProvider
-
public interface SingletonResourceProvider
An implementation interface for resource providers which exposes a single permanent resource instance. A singleton resource may support the following operations:- action
- patch
- read
- update
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.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Promise<ActionResponse,ResourceException>
actionInstance(Context context, ActionRequest request)
Performs the providedaction
against the single resource instance.default Promise<ResourceResponse,ResourceException>
patchInstance(Context context, PatchRequest request)
Patches
the single resource instance.default Promise<ResourceResponse,ResourceException>
readInstance(Context context, ReadRequest request)
Reads
the single resource instance.default Promise<ResourceResponse,ResourceException>
updateInstance(Context context, UpdateRequest request)
Updates
the single resource instance.
-
-
-
Method Detail
-
actionInstance
default Promise<ActionResponse,ResourceException> actionInstance(Context context, ActionRequest request)
Performs the providedaction
against the single resource instance.- Parameters:
context
- The request server context.request
- The action request.- Returns:
- A
Promise
containing the result of the operation. - See Also:
RequestHandler.handleAction(Context, ActionRequest)
-
patchInstance
default Promise<ResourceResponse,ResourceException> patchInstance(Context context, PatchRequest request)
Patches
the single resource instance.- Parameters:
context
- The request server context.request
- The patch request.- Returns:
- A
Promise
containing the result of the operation. - See Also:
RequestHandler.handlePatch(Context, PatchRequest)
-
readInstance
default Promise<ResourceResponse,ResourceException> readInstance(Context context, ReadRequest request)
Reads
the single resource instance.- Parameters:
context
- The request server context.request
- The read request.- Returns:
- A
Promise
containing the result of the operation. - See Also:
RequestHandler.handleRead(Context, ReadRequest)
-
updateInstance
default Promise<ResourceResponse,ResourceException> updateInstance(Context context, UpdateRequest request)
Updates
the single resource instance.- Parameters:
context
- The request server context.request
- The update request.- Returns:
- A
Promise
containing the result of the operation. - See Also:
RequestHandler.handleUpdate(Context, UpdateRequest)
-
-