Interface ErrorObject

All Known Subinterfaces:
AccessDeniedError, ConcurrentModificationError, ContentionError, DuplicateAttributeValueError, DuplicateAttributeValuesError, DuplicateFieldError, DuplicateVariantValuesError, GenericError, InsufficientScopeError, InvalidCredentialsError, InvalidFieldError, InvalidInput, InvalidJsonInput, InvalidOperation, InvalidScopeError, InvalidStateTransitionError, InvalidTokenError, RequiredFieldError, ResourceCreationError, ResourceDeletionError, ResourceNotFoundError, ResourceUpdateError

public interface ErrorObject
ErrorObject
Example to create a subtype instance using the builder pattern

     ErrorObject errorObject = ErrorObject.accessDeniedBuilder()
             message("{message}")
             .build()
 
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()
      Returns:
      message
    • setMessage

      void setMessage(String message)
      set message
      Parameters:
      message - value to be set
    • deepCopy

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

      static AccessDeniedErrorBuilder accessDeniedBuilder()
      builder for accessDenied subtype
      Returns:
      builder
    • concurrentModificationBuilder

      static ConcurrentModificationErrorBuilder concurrentModificationBuilder()
      builder for concurrentModification subtype
      Returns:
      builder
    • contentionBuilder

      static ContentionErrorBuilder contentionBuilder()
      builder for contention subtype
      Returns:
      builder
    • duplicateAttributeValueBuilder

      static DuplicateAttributeValueErrorBuilder duplicateAttributeValueBuilder()
      builder for duplicateAttributeValue subtype
      Returns:
      builder
    • duplicateAttributeValuesBuilder

      static DuplicateAttributeValuesErrorBuilder duplicateAttributeValuesBuilder()
      builder for duplicateAttributeValues subtype
      Returns:
      builder
    • duplicateFieldBuilder

      static DuplicateFieldErrorBuilder duplicateFieldBuilder()
      builder for duplicateField subtype
      Returns:
      builder
    • duplicateVariantValuesBuilder

      static DuplicateVariantValuesErrorBuilder duplicateVariantValuesBuilder()
      builder for duplicateVariantValues subtype
      Returns:
      builder
    • genericBuilder

      static GenericErrorBuilder genericBuilder()
      builder for generic subtype
      Returns:
      builder
    • insufficientScopeBuilder

      static InsufficientScopeErrorBuilder insufficientScopeBuilder()
      builder for insufficientScope subtype
      Returns:
      builder
    • invalidCredentialsBuilder

      static InvalidCredentialsErrorBuilder invalidCredentialsBuilder()
      builder for invalidCredentials subtype
      Returns:
      builder
    • invalidFieldBuilder

      static InvalidFieldErrorBuilder invalidFieldBuilder()
      builder for invalidField subtype
      Returns:
      builder
    • invalidInputBuilder

      static InvalidInputBuilder invalidInputBuilder()
      builder for invalidInput subtype
      Returns:
      builder
    • invalidJsonInputBuilder

      static InvalidJsonInputBuilder invalidJsonInputBuilder()
      builder for invalidJsonInput subtype
      Returns:
      builder
    • invalidOperationBuilder

      static InvalidOperationBuilder invalidOperationBuilder()
      builder for invalidOperation subtype
      Returns:
      builder
    • invalidScopeBuilder

      static InvalidScopeErrorBuilder invalidScopeBuilder()
      builder for invalidScope subtype
      Returns:
      builder
    • invalidTransitionBuilder

      static InvalidStateTransitionErrorBuilder invalidTransitionBuilder()
      builder for invalidTransition subtype
      Returns:
      builder
    • invalidTokenBuilder

      static InvalidTokenErrorBuilder invalidTokenBuilder()
      builder for invalidToken subtype
      Returns:
      builder
    • requiredFieldBuilder

      static RequiredFieldErrorBuilder requiredFieldBuilder()
      builder for requiredField subtype
      Returns:
      builder
    • resourceCreationBuilder

      static ResourceCreationErrorBuilder resourceCreationBuilder()
      builder for resourceCreation subtype
      Returns:
      builder
    • resourceDeletionBuilder

      static ResourceDeletionErrorBuilder resourceDeletionBuilder()
      builder for resourceDeletion subtype
      Returns:
      builder
    • resourceNotFoundBuilder

      static ResourceNotFoundErrorBuilder resourceNotFoundBuilder()
      builder for resourceNotFound subtype
      Returns:
      builder
    • resourceUpdateBuilder

      static ResourceUpdateErrorBuilder resourceUpdateBuilder()
      builder for resourceUpdate subtype
      Returns:
      builder
    • withErrorObject

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