Class ReviewTransitionStateActionBuilder

java.lang.Object
com.commercetools.api.models.review.ReviewTransitionStateActionBuilder
All Implemented Interfaces:
Builder<ReviewTransitionStateAction>

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

     ReviewTransitionStateAction reviewTransitionStateAction = ReviewTransitionStateAction.builder()
             .state(stateBuilder -> stateBuilder)
             .build()
 
  • Constructor Details

    • ReviewTransitionStateActionBuilder

      public ReviewTransitionStateActionBuilder()
  • Method Details

    • state

      Value to set. If there is no State yet, the new State must be an initial State. If the existing State has transitions set, there must be a direct transition to the new State. If transitions is not set, no validation is performed. If the new State does not have the role ReviewIncludedInStatistics, the Review is not taken into account in the ratings statistics of the target.

      Parameters:
      builder - function to build the state value
      Returns:
      Builder
    • withState

      Value to set. If there is no State yet, the new State must be an initial State. If the existing State has transitions set, there must be a direct transition to the new State. If transitions is not set, no validation is performed. If the new State does not have the role ReviewIncludedInStatistics, the Review is not taken into account in the ratings statistics of the target.

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

      Value to set. If there is no State yet, the new State must be an initial State. If the existing State has transitions set, there must be a direct transition to the new State. If transitions is not set, no validation is performed. If the new State does not have the role ReviewIncludedInStatistics, the Review is not taken into account in the ratings statistics of the target.

      Parameters:
      state - value to be set
      Returns:
      Builder
    • force

      Switch validations on or off.

      Parameters:
      force - value to be set
      Returns:
      Builder
    • getState

      public StateResourceIdentifier getState()

      Value to set. If there is no State yet, the new State must be an initial State. If the existing State has transitions set, there must be a direct transition to the new State. If transitions is not set, no validation is performed. If the new State does not have the role ReviewIncludedInStatistics, the Review is not taken into account in the ratings statistics of the target.

      Returns:
      state
    • getForce

      @Nullable public Boolean getForce()

      Switch validations on or off.

      Returns:
      force
    • build

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

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

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

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