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
public abstract static class Operation.Builder<T extends Operation.Builder<T>> extends Object
Builder to help construct the Operation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()Creates a new Builder.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tdescription(String description)Set the description.Tdescription(LocalizableString description)Set the description.TdetailsFromAnnotation(Operation operation, ApiDescription descriptor, Class<?> relativeType)Set all properties in the Builder using the data in the annotation.Terror(ApiError apiError)Sets a single supported error.Terrors(List<ApiError> apiErrors)Set multiple supported errors.Tparameter(Parameter parameter)Sets a single supported parameters.Tparameters(List<Parameter> parameters)Set multiple supported parameters.protected abstract Tself()Abstract method that returns the instantiated Builder itself.Tstability(Stability stability)Sets stability of Operation.TsupportedLocales(String... supportedlocales)Set the supported locale.
-
-
-
Method Detail
-
self
protected abstract T self()
Abstract method that returns the instantiated Builder itself.- Returns:
- Builder
-
description
public T description(LocalizableString description)
Set the description.- Parameters:
description- A description of the endpoint- Returns:
- Builder
-
description
public T description(String description)
Set the description.- Parameters:
description- A description of the endpoint- Returns:
- Builder
-
supportedLocales
public T supportedLocales(String... supportedlocales)
Set the supported locale.- Parameters:
supportedlocales- Locales codes supported by the operation- Returns:
- Builder
-
errors
public T errors(List<ApiError> apiErrors)
Set multiple supported errors.- Parameters:
apiErrors- What errors may be returned by this operation- Returns:
- Builder
-
error
public T error(ApiError apiError)
Sets a single supported error.- Parameters:
apiError- An error that may be returned by this operation- Returns:
- Builder
-
parameters
public T parameters(List<Parameter> parameters)
Set multiple supported parameters.- Parameters:
parameters- Extra parameters supported by the operation- Returns:
- Builder
-
parameter
public T parameter(Parameter parameter)
Sets a single supported parameters.- Parameters:
parameter- Extra parameter supported by the operation- Returns:
- Builder
-
stability
public T stability(Stability 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
-
-