Package org.forgerock.api.models
Class Operation.Builder<T extends Operation.Builder<T>>
java.lang.Object
org.forgerock.api.models.Operation.Builder<T>
- Type Parameters:
T
- The self-type of the builder subclass.
- Direct Known Subclasses:
Action.Builder
,Create.Builder
,Delete.Builder
,Patch.Builder
,Query.Builder
,Read.Builder
,Update.Builder
- Enclosing class:
- Operation
Builder to help construct the Operation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondescription
(String description) Set the description.description
(LocalizableString description) Set the description.detailsFromAnnotation
(Operation operation, ApiDescription descriptor, Class<?> relativeType) Set all properties in the Builder using the data in the annotation.Sets a single supported error.Set multiple supported errors.Sets a single supported parameters.parameters
(List<Parameter> parameters) Set multiple supported parameters.protected abstract T
self()
Abstract method that returns the instantiated Builder itself.Sets stability of Operation.supportedLocales
(String... supportedlocales) Set the supported locale.
-
Constructor Details
-
Builder
protected Builder()Creates a new Builder.
-
-
Method Details
-
self
Abstract method that returns the instantiated Builder itself.- Returns:
- Builder
-
description
Set the description.- Parameters:
description
- A description of the endpoint- Returns:
- Builder
-
description
Set the description.- Parameters:
description
- A description of the endpoint- Returns:
- Builder
-
supportedLocales
Set the supported locale.- Parameters:
supportedlocales
- Locales codes supported by the operation- Returns:
- Builder
-
errors
Set multiple supported errors.- Parameters:
apiErrors
- What errors may be returned by this operation- Returns:
- Builder
-
error
Sets a single supported error.- Parameters:
apiError
- An error that may be returned by this operation- Returns:
- Builder
-
parameters
Set multiple supported parameters.- Parameters:
parameters
- Extra parameters supported by the operation- Returns:
- Builder
-
parameter
Sets a single supported parameters.- Parameters:
parameter
- Extra parameter supported by the operation- Returns:
- Builder
-
stability
Sets stability of Operation.- Parameters:
stability
- Stability- Returns:
- Builder
-
detailsFromAnnotation
public T detailsFromAnnotation(Operation operation, ApiDescription descriptor, Class<?> relativeType) Set all properties in the Builder using the data in the annotation.- Parameters:
operation
- The annotation that holds the datadescriptor
- The root descriptorrelativeType
- The type relative to which schema resources should be resolved.- Returns:
- Builder
-