Enum Class ApplicationExceptionFactory.ApplicationErrors
java.lang.Object
java.lang.Enum<ApplicationExceptionFactory.ApplicationErrors>
com.lexmark.saperion.exceptions.mappings.ApplicationExceptionFactory.ApplicationErrors
- All Implemented Interfaces:
ExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
,Serializable
,Comparable<ApplicationExceptionFactory.ApplicationErrors>
,Constable
- Enclosing class:
- ApplicationExceptionFactory
public static enum ApplicationExceptionFactory.ApplicationErrors
extends Enum<ApplicationExceptionFactory.ApplicationErrors>
implements ExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
Application error definitions.
- Author:
- owaeldrich
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptioncom.lexmark.saperion.exceptions.application.ApplicationException
createException
(com.lexmark.saperion.exceptions.ErrorType fault, Throwable cause) Creates a new exception for the given server fault.com.lexmark.saperion.exceptions.application.ApplicationException
createException
(String message) Creates a new exception for the given server fault.com.lexmark.saperion.exceptions.application.ApplicationException
createException
(String message, Throwable cause) Creates a new exception for the given server fault.com.lexmark.saperion.exceptions.application.ApplicationException
createException
(Throwable cause) Creates a new exception for the given server fault.com.lexmark.saperion.exceptions.ErrorCodeType
Returns the error code this exception mapping applies to.boolean
validate()
Validates the integrity of the exception mapping.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GENERAL_ERROR
-
WORKFLOW_GENERAL_ERROR
-
WORKFLOW_ACTOR_REQUIRED_ERROR
-
APPLICATION_MALFORMED_ENTITY_ERROR
public static final ApplicationExceptionFactory.ApplicationErrors APPLICATION_MALFORMED_ENTITY_ERROR -
SEARCH_ERROR
-
SEARCH_STATEMENT_EXECUTION_ERROR
-
SEARCH_STATEMENT_SYNTAX_ERROR
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
createException
public com.lexmark.saperion.exceptions.application.ApplicationException createException(com.lexmark.saperion.exceptions.ErrorType fault, Throwable cause) Description copied from interface:ExceptionMapping
Creates a new exception for the given server fault.- Specified by:
createException
in interfaceExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
- Parameters:
fault
- the server errorcause
- the exception cause- Returns:
- the new exception
-
createException
public com.lexmark.saperion.exceptions.application.ApplicationException createException(String message) Description copied from interface:ExceptionMapping
Creates a new exception for the given server fault.- Specified by:
createException
in interfaceExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
- Parameters:
message
- the error message- Returns:
- the new exception
-
createException
public com.lexmark.saperion.exceptions.application.ApplicationException createException(String message, Throwable cause) Description copied from interface:ExceptionMapping
Creates a new exception for the given server fault.- Specified by:
createException
in interfaceExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
- Parameters:
message
- the error messagecause
- the exception cause- Returns:
- the new exception
-
createException
public com.lexmark.saperion.exceptions.application.ApplicationException createException(Throwable cause) Description copied from interface:ExceptionMapping
Creates a new exception for the given server fault.- Specified by:
createException
in interfaceExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
- 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 interfaceExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
- 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 anErrorType
and aThrowable
.- Specified by:
validate
in interfaceExceptionMapping<com.lexmark.saperion.exceptions.application.ApplicationException>
- Returns:
true
if the mapping is valid and the mapped exception fits the design rules, otherwisefalse
-