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 Details

    • Builder

      protected Builder()
      Creates a new Builder.
  • Method Details

    • 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 data
      descriptor - The root descriptor
      relativeType - The type relative to which schema resources should be resolved.
      Returns:
      Builder