Class ExtensionUpdateBuilder

java.lang.Object
com.commercetools.api.models.extension.ExtensionUpdateBuilder
All Implemented Interfaces:
Builder<ExtensionUpdate>

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

     ExtensionUpdate extensionUpdate = ExtensionUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • ExtensionUpdateBuilder

      public ExtensionUpdateBuilder()
  • Method Details

    • version

      public ExtensionUpdateBuilder version(Long version)

      Expected version of the Extension 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 ExtensionUpdateBuilder actions(ExtensionUpdateAction... actions)

      Update actions to be performed on the Extension.

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

      Update actions to be performed on the Extension.

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

      public ExtensionUpdateBuilder plusActions(ExtensionUpdateAction... actions)

      Update actions to be performed on the Extension.

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

      Update actions to be performed on the Extension.

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

      Update actions to be performed on the Extension.

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

      public Long getVersion()

      Expected version of the Extension 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<ExtensionUpdateAction> getActions()

      Update actions to be performed on the Extension.

      Returns:
      actions
    • build

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

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

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

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