Interface SemanticErrorError

All Superinterfaces:
ErrorObject

public interface SemanticErrorError extends ErrorObject

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


Example to create an instance using the builder pattern

     SemanticErrorError semanticErrorError = SemanticErrorError.builder()
             .message("{message}")
             .build()
 
  • Field Details

  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

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

      @NotNull @NotNull 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
      Returns:
      message
    • setMessage

      void setMessage(String message)

      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
      Parameters:
      message - value to be set
    • of

      static SemanticErrorError of()
      factory method
      Returns:
      instance of SemanticErrorError
    • of

      static SemanticErrorError of(SemanticErrorError template)
      factory method to create a shallow copy SemanticErrorError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of SemanticErrorError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static SemanticErrorErrorBuilder builder()
      builder factory method for SemanticErrorError
      Returns:
      builder
    • builder

      static SemanticErrorErrorBuilder builder(SemanticErrorError template)
      create builder for SemanticErrorError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withSemanticErrorError

      default <T> T withSemanticErrorError(Function<SemanticErrorError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<SemanticErrorError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference