Enum Class RuntimeExceptionFactory.RuntimeErrors

java.lang.Object
java.lang.Enum<RuntimeExceptionFactory.RuntimeErrors>
com.lexmark.saperion.exceptions.mappings.RuntimeExceptionFactory.RuntimeErrors
All Implemented Interfaces:
ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>, Serializable, Comparable<RuntimeExceptionFactory.RuntimeErrors>, Constable
Enclosing class:
RuntimeExceptionFactory

public static enum RuntimeExceptionFactory.RuntimeErrors extends Enum<RuntimeExceptionFactory.RuntimeErrors> implements ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>
Runtime error definitions.
Author:
owaeldrich
  • Enum Constant Details

  • Method Details

    • values

      public static RuntimeExceptionFactory.RuntimeErrors[] 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 RuntimeExceptionFactory.RuntimeErrors 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
    • createException

      public com.lexmark.saperion.exceptions.EcmRuntimeException createException(com.lexmark.saperion.exceptions.ErrorType error, Throwable cause)
      Description copied from interface: ExceptionMapping
      Creates a new exception for the given server fault.
      Specified by:
      createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>
      Parameters:
      error - the server error
      cause - the exception cause
      Returns:
      the new exception
    • createException

      public com.lexmark.saperion.exceptions.EcmRuntimeException createException(String message)
      Description copied from interface: ExceptionMapping
      Creates a new exception for the given server fault.
      Specified by:
      createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>
      Parameters:
      message - the error message
      Returns:
      the new exception
    • createException

      public com.lexmark.saperion.exceptions.EcmRuntimeException createException(String message, Throwable cause)
      Description copied from interface: ExceptionMapping
      Creates a new exception for the given server fault.
      Specified by:
      createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>
      Parameters:
      message - the error message
      cause - the exception cause
      Returns:
      the new exception
    • createException

      public com.lexmark.saperion.exceptions.EcmRuntimeException createException(Throwable cause)
      Description copied from interface: ExceptionMapping
      Creates a new exception for the given server fault.
      Specified by:
      createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>
      Parameters:
      cause - the exception cause
      Returns:
      the new exception
    • getErrorCode

      public com.lexmark.saperion.exceptions.ErrorCodeType getErrorCode()
      Description copied from interface: ExceptionMapping
      Returns the error code this exception mapping applies to.
      Specified by:
      getErrorCode in interface ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>
      Returns:
      the exception mapping's error code
    • validate

      public boolean validate()
      Description copied from interface: ExceptionMapping
      Validates the integrity of the exception mapping. An exception mapping is valid if the mapped exception class can be instantiated and an appropriate factory constructor exists. Appropriate exception implementations must provide a factory constructors that consume an ErrorType and a Throwable.
      Specified by:
      validate in interface ExceptionMapping<com.lexmark.saperion.exceptions.EcmRuntimeException>
      Returns:
      true if the mapping is valid and the mapped exception fits the design rules, otherwise false