Annotation Type 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:
    RequestHandler, SingletonProvider, CollectionProvider
    • Required Element Summary

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

      Optional Elements 
      Modifier and Type Optional Element Description
      CreateMode[] modes
      Specify the types of create request that are supported.
      CreateSingleton singleton
      Specify whether or not the created resource is a singleton or one of a collection.
    • Element Detail

      • 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:
        {org.forgerock.api.enums.CreateMode.ID_FROM_CLIENT, org.forgerock.api.enums.CreateMode.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:
        org.forgerock.api.enums.CreateSingleton.FROM_CONTEXT