Class EcmsExceptionMapping<T extends java.lang.Throwable>
- java.lang.Object
- 
- com.lexmark.saperion.exceptions.mappings.EcmsExceptionMapping<T>
 
- 
- Type Parameters:
- T- the mapped ecms exception type
 - All Implemented Interfaces:
- ExceptionMapping<T>
 
 public class EcmsExceptionMapping<T extends java.lang.Throwable> extends java.lang.Object implements ExceptionMapping<T> Base implementation of an exception mapping entry. An exception mapping entry associates an error code with anEcmExceptionclass.- Author:
- owaeldrich
 
- 
- 
Constructor SummaryConstructors Constructor Description EcmsExceptionMapping(com.lexmark.saperion.exceptions.ErrorConstantType errorCode, java.lang.Class<T> exception)Creates a new exception mapping entry with the given error code and the given exception class.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description TcreateException(com.lexmark.saperion.exceptions.ErrorType fault, java.lang.Throwable cause)Creates a new exception for the given server fault.TcreateException(java.lang.String message)Creates a new exception for the given server fault.TcreateException(java.lang.String message, java.lang.Throwable cause)Creates a new exception for the given server fault.TcreateException(java.lang.Throwable cause)Creates a new exception for the given server fault.com.lexmark.saperion.exceptions.ErrorCodeTypegetErrorCode()Returns the error code this exception mapping applies to.booleanvalidate()Validates the integrity of the exception mapping.
 
- 
- 
- 
Constructor Detail- 
EcmsExceptionMappingpublic EcmsExceptionMapping(com.lexmark.saperion.exceptions.ErrorConstantType errorCode, java.lang.Class<T> exception)Creates a new exception mapping entry with the given error code and the given exception class.- Parameters:
- errorCode- the error code
- exception- the exception class
 
 
- 
 - 
Method Detail- 
createExceptionpublic T createException(com.lexmark.saperion.exceptions.ErrorType fault, java.lang.Throwable cause) Description copied from interface:ExceptionMappingCreates a new exception for the given server fault.- Specified by:
- createExceptionin interface- ExceptionMapping<T extends java.lang.Throwable>
- Parameters:
- fault- the server error
- cause- the exception cause
- Returns:
- the new exception
 
 - 
createExceptionpublic T createException(java.lang.String message) Description copied from interface:ExceptionMappingCreates a new exception for the given server fault.- Specified by:
- createExceptionin interface- ExceptionMapping<T extends java.lang.Throwable>
- Parameters:
- message- the error message
- Returns:
- the new exception
 
 - 
createExceptionpublic T createException(java.lang.String message, java.lang.Throwable cause) Description copied from interface:ExceptionMappingCreates a new exception for the given server fault.- Specified by:
- createExceptionin interface- ExceptionMapping<T extends java.lang.Throwable>
- Parameters:
- message- the error message
- cause- the exception cause
- Returns:
- the new exception
 
 - 
createExceptionpublic T createException(java.lang.Throwable cause) Description copied from interface:ExceptionMappingCreates a new exception for the given server fault.- Specified by:
- createExceptionin interface- ExceptionMapping<T extends java.lang.Throwable>
- Parameters:
- cause- the exception cause
- Returns:
- the new exception
 
 - 
getErrorCodepublic com.lexmark.saperion.exceptions.ErrorCodeType getErrorCode() Description copied from interface:ExceptionMappingReturns the error code this exception mapping applies to.- Specified by:
- getErrorCodein interface- ExceptionMapping<T extends java.lang.Throwable>
- Returns:
- the exception mapping's error code
 
 - 
validatepublic boolean validate() Description copied from interface:ExceptionMappingValidates 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 anErrorTypeand aThrowable.- Specified by:
- validatein interface- ExceptionMapping<T extends java.lang.Throwable>
- Returns:
- trueif the mapping is valid and the mapped exception fits the design rules, otherwise- false
 
 
- 
 
-