Enum Class CoreErrorCode

java.lang.Object
java.lang.Enum<CoreErrorCode>
es.kukenan.smartfi.microservice.transfer.enums.CoreErrorCode
All Implemented Interfaces:
Serializable, Comparable<CoreErrorCode>, Constable

public enum CoreErrorCode extends Enum<CoreErrorCode>
Core error codes enum.
  • Enum Constant Details

    • CAN_NOT_DO_THE_TRANSFER

      public static final CoreErrorCode CAN_NOT_DO_THE_TRANSFER
      Can't do the transfer error.
    • REQUIRED_FIELDS

      public static final CoreErrorCode REQUIRED_FIELDS
      Required fields error.
    • CAN_NOT_SIGN

      public static final CoreErrorCode CAN_NOT_SIGN
      Can't sign error.
    • ALREADY_SIGNED

      public static final CoreErrorCode ALREADY_SIGNED
      Already signed error.
    • EXCEEDED_LIMITS

      public static final CoreErrorCode EXCEEDED_LIMITS
      Exceeded limits error.
    • ALREADY_FAVORITE_TRANSFER

      public static final CoreErrorCode ALREADY_FAVORITE_TRANSFER
      Already favorite transfer error.
    • INTERNATIONAL_TRANSFER

      public static final CoreErrorCode INTERNATIONAL_TRANSFER
      Internation transfer error.
    • INCORRECT_IBAN

      public static final CoreErrorCode INCORRECT_IBAN
      Incorrect IBAN error.
    • NOT_CORRESPONDED_BIC

      public static final CoreErrorCode NOT_CORRESPONDED_BIC
      IBAN not correspond BIC error.
    • CURRENCY_MUST_BE_EUR

      public static final CoreErrorCode CURRENCY_MUST_BE_EUR
      Currency must be EUR error.
    • PHONE_MUST_BE_NATIONAL

      public static final CoreErrorCode PHONE_MUST_BE_NATIONAL
      Phone must be national error.
    • FORBIDDEN

      public static final CoreErrorCode FORBIDDEN
      Forbidden error.
    • ENTITY_NOT_FOUND

      public static final CoreErrorCode ENTITY_NOT_FOUND
      Entity not found.
    • ALREADY_CANCELLED

      public static final CoreErrorCode ALREADY_CANCELLED
      Transfer already canceled.
    • INVALID_CURRENCY

      public static final CoreErrorCode INVALID_CURRENCY
      Invalid currency.
    • INTERNATIONAL_TRANSFER_AS_SEPA

      public static final CoreErrorCode INTERNATIONAL_TRANSFER_AS_SEPA
      International transfer as SEPA.
    • INVALID_CURRENCY_FOR_INTERNATIONAL_TRANSFER

      public static final CoreErrorCode INVALID_CURRENCY_FOR_INTERNATIONAL_TRANSFER
      Ivalid currency for international transfer.
  • Field Details

    • coreErrorCodesList

      private final List<Integer> coreErrorCodesList
      Core error codes list.
    • exceptionTypeClass

      private final Class<? extends es.kukenan.smartfi.common.service.exceptions.KukenanWalletException> exceptionTypeClass
      Exception type class.
    • exceptionCode

      private final String exceptionCode
      Exception code.
    • errorMessage

      private final String errorMessage
      Error message.
  • Constructor Details

    • CoreErrorCode

      private CoreErrorCode(List<Integer> coreErrorCodesList, Class<? extends es.kukenan.smartfi.common.service.exceptions.KukenanWalletException> exceptionTypeClass, String exceptionCode, String errorMessage)
      Default constructor.
      Parameters:
      coreErrorCodesList - Core error codes list
      exceptionTypeClass - Exception type class
      exceptionCode - Exception code
      errorMessage - Error message
  • Method Details

    • values

      public static CoreErrorCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CoreErrorCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getByCoreErrorCode

      public static CoreErrorCode getByCoreErrorCode(Integer coreErrorCode)
      Get the CoreErrorCode that contain the parameter in "coreErrorCodeList" property. If the parameter is not found, null is returned.
      Parameters:
      coreErrorCode - Core error code
      Returns:
      The CoreErrorCode