Annotation Interface Create


@Retention(RUNTIME) @Target(METHOD) public @interface Create
Indicates an CREST create method on an annotated POJO. This annotation can only be used on collection resource request handlers.

The annotated method's return type must be:

  • A Promise<JsonValue, ? extends ResourceException> promise.
The method must take the following parameters:
  • A org.forgerock.json.resource.CreateRequest for the request.
The method may also take the following parameters:
  • A Context to be given the context.
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
    Specify the types of create request that are supported.
    Specify whether or not the created resource is a singleton or one of a collection.
  • Element Details

    • operationDescription

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

      CreateMode[] modes
      Specify the types of create request that are supported. By default, both ID_FROM_CLIENT (POST-to-collection type) and ID_FROM_SERVER (PUT-to-instance type) are supported.
      Default:
      {ID_FROM_CLIENT, ID_FROM_SERVER}
    • singleton

      CreateSingleton singleton
      Specify whether or not the created resource is a singleton or one of a collection. By default this will be worked out from the context, and should rarely have to be set to anything different.
      Default:
      FROM_CONTEXT