Annotation Interface Action


@Retention(RUNTIME) @Target(METHOD) public @interface Action
Indicates an CREST action method on an annotated POJO. This annotation can be used on methods in both singleton and collection resource request handlers.

The annotated method's return type must be:

  • A Promise<JsonValue, ? extends ResourceException> promise.
If the method is an instance action on a collection handler, it must take the following parameters:
  • A string parameter for the instance identifier.
The method may also take the following parameters:
  • A Context to be given the context.
  • A org.forgerock.json.resource.ActionRequest to be given the request.
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Describe the standard operation details of this action.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the action being exposed.
    Describe the schema of the request payload.
    Describe the schema of the response payload.
  • Element Details

    • operationDescription

      Operation operationDescription
      Describe the standard operation details of this action.
    • name

      String name
      The name of the action being exposed. If not supplied, the name of the method is assumed to be the name of the action.
      Default:
      ""
    • request

      Schema request
      Describe the schema of the request payload. Defaults to no content.
      Default:
      @org.forgerock.api.annotations.Schema
    • response

      Schema response
      Describe the schema of the response payload. Defaults to no content.
      Default:
      @org.forgerock.api.annotations.Schema