Class CategoryUpdateBuilder

java.lang.Object
com.commercetools.api.models.category.CategoryUpdateBuilder
All Implemented Interfaces:
Builder<CategoryUpdate>

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

     CategoryUpdate categoryUpdate = CategoryUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • CategoryUpdateBuilder

      public CategoryUpdateBuilder()
  • Method Details

    • version

      public CategoryUpdateBuilder version(Long version)

      Expected version of the Category 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 CategoryUpdateBuilder actions(CategoryUpdateAction... actions)

      Update actions to be performed on the Category.

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

      public CategoryUpdateBuilder actions(List<CategoryUpdateAction> actions)

      Update actions to be performed on the Category.

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

      public CategoryUpdateBuilder plusActions(CategoryUpdateAction... actions)

      Update actions to be performed on the Category.

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

      Update actions to be performed on the Category.

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

      Update actions to be performed on the Category.

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

      public Long getVersion()

      Expected version of the Category 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<CategoryUpdateAction> getActions()

      Update actions to be performed on the Category.

      Returns:
      actions
    • build

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

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

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

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