Class StateSetTransitionsActionBuilder

java.lang.Object
com.commercetools.api.models.state.StateSetTransitionsActionBuilder
All Implemented Interfaces:
Builder<StateSetTransitionsAction>

public class StateSetTransitionsActionBuilder extends Object implements Builder<StateSetTransitionsAction>
StateSetTransitionsActionBuilder
Example to create an instance using the builder pattern

     StateSetTransitionsAction stateSetTransitionsAction = StateSetTransitionsAction.builder()
             .build()
 
  • Constructor Details

    • StateSetTransitionsActionBuilder

      public StateSetTransitionsActionBuilder()
  • Method Details

    • transitions

      public StateSetTransitionsActionBuilder transitions(@Nullable StateResourceIdentifier... transitions)

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Parameters:
      transitions - value to be set
      Returns:
      Builder
    • transitions

      public StateSetTransitionsActionBuilder transitions(@Nullable List<StateResourceIdentifier> transitions)

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Parameters:
      transitions - value to be set
      Returns:
      Builder
    • plusTransitions

      public StateSetTransitionsActionBuilder plusTransitions(@Nullable StateResourceIdentifier... transitions)

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Parameters:
      transitions - value to be set
      Returns:
      Builder
    • plusTransitions

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Parameters:
      builder - function to build the transitions value
      Returns:
      Builder
    • withTransitions

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Parameters:
      builder - function to build the transitions value
      Returns:
      Builder
    • addTransitions

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Parameters:
      builder - function to build the transitions value
      Returns:
      Builder
    • setTransitions

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Parameters:
      builder - function to build the transitions value
      Returns:
      Builder
    • getTransitions

      @Nullable public List<StateResourceIdentifier> getTransitions()

      Value to set. If omitted, any existing value is removed.

      Possible transformations of the current State to other States of the same type (for example, Initial -> Shipped). When performing a transitionState update action and transitions is set, the currently referenced State must have a transition to the new State.

      If transitions is an empty list, it means the current State is a final State and no further transitions are allowed. If transitions is not set, the validation is turned off.

      When performing a transitionState update action, any other State of the same type can be transitioned to.

      If the new value is the same as the current value, an InvalidOperation error is returned.

      Returns:
      transitions
    • build

      public StateSetTransitionsAction build()
      builds StateSetTransitionsAction with checking for non-null required values
      Specified by:
      build in interface Builder<StateSetTransitionsAction>
      Returns:
      StateSetTransitionsAction
    • buildUnchecked

      public StateSetTransitionsAction buildUnchecked()
      builds StateSetTransitionsAction without checking for non-null required values
      Returns:
      StateSetTransitionsAction
    • of

      factory method for an instance of StateSetTransitionsActionBuilder
      Returns:
      builder
    • of

      create builder for StateSetTransitionsAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder