Package org.forgerock.json.resource
Interface SingletonResourceProvider
- All Known Implementing Classes:
ServerInfoSingletonProvider
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
Modifier and TypeMethodDescriptiondefault 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 Details
-
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:
-
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:
-
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:
-
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:
-