Class ErrorObjectImpl

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

public class ErrorObjectImpl extends Object implements ErrorObject, io.vrap.rmf.base.client.ModelBase

Represents a single error. Multiple errors may be included in an ErrorResponse.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase

    io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
  • Constructor Summary

    Constructors
    Constructor
    Description
    create empty instance
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Error identifier.
    Plain text description of the cause of the error.
    int
     
    void
    setMessage(String message)
    Plain text description of the cause of the error.
    void
    setValue(String key, Object value)
    Error-specific additional fields.
    Error-specific additional fields.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.commercetools.api.models.error.ErrorObject

    withErrorObject

    Methods inherited from interface io.vrap.rmf.base.client.ModelBase

    reflectionString, reflectionString
  • Constructor Details

    • ErrorObjectImpl

      public ErrorObjectImpl()
      create empty instance
  • Method Details

    • getCode

      public String getCode()

      Error identifier.

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

      public String getMessage()

      Plain text description of the cause of the error.

      Specified by:
      getMessage in interface ErrorObject
      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: ErrorObject

      Plain text description of the cause of the error.

      Specified by:
      setMessage in interface ErrorObject
      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