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
Modifier and TypeMethodDescriptionactionInstance(Context context, ActionRequest request) Performs the providedactionagainst the single resource instance.patchInstance(Context context, PatchRequest request) Patchesthe single resource instance.readInstance(Context context, ReadRequest request) Readsthe single resource instance.updateInstance(Context context, UpdateRequest request) Updatesthe single resource instance.
-
Method Details
-
actionInstance
Performs the providedactionagainst the single resource instance.- Parameters:
context- The request server context.request- The action request.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
-
patchInstance
Patchesthe single resource instance.- Parameters:
context- The request server context.request- The patch request.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
-
readInstance
Readsthe single resource instance.- Parameters:
context- The request server context.request- The read request.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
-
updateInstance
Updatesthe single resource instance.- Parameters:
context- The request server context.request- The update request.- Returns:
- A
Promisecontaining the result of the operation. - See Also:
-