Package org.forgerock.api.annotations
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. 
- A 
org.forgerock.json.resource.CreateRequestfor the request. 
- A 
Contextto be given the context. 
- See Also:
 RequestHandler,SingletonProvider,CollectionProvider
 - A 
 
- 
- 
Required Element Summary
Required Elements Modifier and Type Required Element Description OperationoperationDescriptionDescribe the standard operation details of this action. 
- 
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description CreateMode[]modesSpecify the types of create request that are supported.CreateSingletonsingletonSpecify 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
 
 
 - 
 
 -