Package org.forgerock.api.models
Class Create
- java.lang.Object
-
- org.forgerock.api.models.Operation
-
- org.forgerock.api.models.Create
-
public final class Create extends Operation
Class that represents the Create Operation type in API descriptor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Create.Builder
Builder for the Create.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
allocateToResource(Resource.Builder resourceBuilder)
Allocates the Create operation type to the given Resource Builder.static Create.Builder
create()
Creates a new builder for Create.boolean
equals(Object o)
static Create
fromAnnotation(Create create, boolean instanceOperations, ApiDescription descriptor, Class<?> relativeType)
Builds a Create object from the data in the annotation.CreateMode
getMode()
Getter of the mode.int
hashCode()
Boolean
isSingleton()
Informs if operation creates singleton resources.-
Methods inherited from class org.forgerock.api.models.Operation
getApiErrors, getDescription, getParameters, getStability, getSupportedLocales
-
-
-
-
Method Detail
-
getMode
public CreateMode getMode()
Getter of the mode.- Returns:
- Mode
-
isSingleton
public Boolean isSingleton()
Informs if operation creates singleton resources.- Returns:
true
if operation creates singleton resources andfalse
otherwise
-
create
public static Create.Builder create()
Creates a new builder for Create.- Returns:
- New builder instance
-
allocateToResource
protected void allocateToResource(Resource.Builder resourceBuilder)
Allocates the Create operation type to the given Resource Builder.- Specified by:
allocateToResource
in classOperation
- Parameters:
resourceBuilder
- - Resource Builder to add the operation
-
fromAnnotation
public static Create fromAnnotation(Create create, boolean instanceOperations, ApiDescription descriptor, Class<?> relativeType)
Builds a Create object from the data in the annotation.- Parameters:
create
- Create annotation that holds the datainstanceOperations
- True if the resource is performing instance operations.descriptor
- The root descriptor to add definitions to.relativeType
- The type relative to which schema resources should be resolved.- Returns:
- Create instance
-
-