Class LockedFieldErrorBuilder

java.lang.Object
com.commercetools.api.models.error.LockedFieldErrorBuilder
All Implemented Interfaces:
Builder<LockedFieldError>

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

     LockedFieldError lockedFieldError = LockedFieldError.builder()
             .message("{message}")
             .field("{field}")
             .build()
 
  • Constructor Details

    • LockedFieldErrorBuilder

      public LockedFieldErrorBuilder()
  • Method Details

    • message

      public LockedFieldErrorBuilder message(String message)

      "'$field' is locked by another request. Please try again later."

      Parameters:
      message - value to be set
      Returns:
      Builder
    • values

      public LockedFieldErrorBuilder values(Map<String,Object> values)

      Error-specific additional fields.

      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      public LockedFieldErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • field

      public LockedFieldErrorBuilder field(String field)

      Field that is currently locked.

      Parameters:
      field - value to be set
      Returns:
      Builder
    • getMessage

      public String getMessage()

      "'$field' is locked by another request. Please try again later."

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • getField

      public String getField()

      Field that is currently locked.

      Returns:
      field
    • build

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

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

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

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