Class StoreUpdateBuilder

java.lang.Object
com.commercetools.api.models.store.StoreUpdateBuilder
All Implemented Interfaces:
Builder<StoreUpdate>

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

     StoreUpdate storeUpdate = StoreUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • StoreUpdateBuilder

      public StoreUpdateBuilder()
  • Method Details

    • version

      public StoreUpdateBuilder version(Long version)

      Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • actions

      public StoreUpdateBuilder actions(StoreUpdateAction... actions)

      Update actions to be performed on the Store.

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

      public StoreUpdateBuilder actions(List<StoreUpdateAction> actions)

      Update actions to be performed on the Store.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      public StoreUpdateBuilder plusActions(StoreUpdateAction... actions)

      Update actions to be performed on the Store.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      Update actions to be performed on the Store.

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

      Update actions to be performed on the Store.

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

      public Long getVersion()

      Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Returns:
      version
    • getActions

      public List<StoreUpdateAction> getActions()

      Update actions to be performed on the Store.

      Returns:
      actions
    • build

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

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

      public static StoreUpdateBuilder of()
      factory method for an instance of StoreUpdateBuilder
      Returns:
      builder
    • of

      public static StoreUpdateBuilder of(StoreUpdate template)
      create builder for StoreUpdate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder