Class SemanticErrorErrorImpl

java.lang.Object
com.commercetools.api.models.error.SemanticErrorErrorImpl
All Implemented Interfaces:
ErrorObject, SemanticErrorError, io.vrap.rmf.base.client.ModelBase

public class SemanticErrorErrorImpl extends Object implements SemanticErrorError, io.vrap.rmf.base.client.ModelBase

Returned when a Discount predicate or API Extension predicate is not semantically correct.

  • Constructor Details

    • SemanticErrorErrorImpl

      public SemanticErrorErrorImpl()
      create empty instance
  • Method Details

    • getCode

      public String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Specified by:
      getCode in interface SemanticErrorError
      Returns:
      code
    • getMessage

      public String getMessage()

      Plain text description of the error concerning the predicate. For example, "Invalid country code $countryCode provided for the field $fieldDefinition.".

      Specified by:
      getMessage in interface ErrorObject
      Specified by:
      getMessage in interface SemanticErrorError
      Returns:
      message
    • values

      public Map<String,Object> values()

      Error-specific additional fields.

      Specified by:
      values in interface ErrorObject
      Returns:
      map of the pattern property values
    • setMessage

      public void setMessage(String message)
      Description copied from interface: SemanticErrorError

      Plain text description of the error concerning the predicate. For example, "Invalid country code $countryCode provided for the field $fieldDefinition.".

      Specified by:
      setMessage in interface ErrorObject
      Specified by:
      setMessage in interface SemanticErrorError
      Parameters:
      message - value to be set
    • setValue

      public void setValue(String key, Object value)
      Description copied from interface: ErrorObject

      Error-specific additional fields.

      Specified by:
      setValue in interface ErrorObject
      Parameters:
      key - property name
      value - property value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object