Interface ExtensionError


public interface ExtensionError
ExtensionError
Example to create an instance using the builder pattern

     ExtensionError extensionError = ExtensionError.builder()
             .code("{code}")
             .message("{message}")
             .extensionId("{extensionId}")
             .build()
 
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()

      Error code caused by the Extension. For example, InvalidField.

      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      Plain text description of the error.

      Returns:
      message
    • getExtensionId

      @NotNull @NotNull String getExtensionId()

      Unique identifier of the Extension.

      Returns:
      extensionId
    • getExtensionKey

      String getExtensionKey()

      User-defined unique identifier of the Extension.

      Returns:
      extensionKey
    • values

      @NotNull @NotNull Map<String,Object> values()

      Error-specific additional fields.

      Returns:
      map of the pattern property values
    • setCode

      void setCode(String code)

      Error code caused by the Extension. For example, InvalidField.

      Parameters:
      code - value to be set
    • setMessage

      void setMessage(String message)

      Plain text description of the error.

      Parameters:
      message - value to be set
    • setExtensionId

      void setExtensionId(String extensionId)

      Unique identifier of the Extension.

      Parameters:
      extensionId - value to be set
    • setExtensionKey

      void setExtensionKey(String extensionKey)

      User-defined unique identifier of the Extension.

      Parameters:
      extensionKey - value to be set
    • setValue

      void setValue(String key, Object value)

      Error-specific additional fields.

      Parameters:
      key - property name
      value - property value
    • of

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

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

      @Nullable static ExtensionError deepCopy(@Nullable ExtensionError template)
      factory method to create a deep copy of ExtensionError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ExtensionErrorBuilder builder()
      builder factory method for ExtensionError
      Returns:
      builder
    • builder

      static ExtensionErrorBuilder builder(ExtensionError template)
      create builder for ExtensionError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withExtensionError

      default <T> T withExtensionError(Function<ExtensionError,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<ExtensionError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference