T
- the mapped ecms exception typepublic class EcmsExceptionMapping<T extends Throwable> extends Object implements ExceptionMapping<T>
EcmException
class.Constructor and Description |
---|
EcmsExceptionMapping(ErrorConstantType errorCode,
Class<T> exception)
Creates a new exception mapping entry with the given error code and the given exception class.
|
Modifier and Type | Method and Description |
---|---|
T |
createException(ErrorType fault,
Throwable cause)
Creates a new exception for the given server fault.
|
T |
createException(String message)
Creates a new exception for the given server fault.
|
T |
createException(String message,
Throwable cause)
Creates a new exception for the given server fault.
|
T |
createException(Throwable cause)
Creates a new exception for the given server fault.
|
ErrorCodeType |
getErrorCode()
Returns the error code this exception mapping applies to.
|
boolean |
validate()
Validates the integrity of the exception mapping.
|
public EcmsExceptionMapping(ErrorConstantType errorCode, Class<T> exception)
errorCode
- the error codeexception
- the exception classpublic T createException(ErrorType fault, Throwable cause)
ExceptionMapping
createException
in interface ExceptionMapping<T extends Throwable>
fault
- the server errorcause
- the exception causepublic T createException(String message)
ExceptionMapping
createException
in interface ExceptionMapping<T extends Throwable>
message
- the error messagepublic T createException(String message, Throwable cause)
ExceptionMapping
createException
in interface ExceptionMapping<T extends Throwable>
message
- the error messagecause
- the exception causepublic T createException(Throwable cause)
ExceptionMapping
createException
in interface ExceptionMapping<T extends Throwable>
cause
- the exception causepublic ErrorCodeType getErrorCode()
ExceptionMapping
getErrorCode
in interface ExceptionMapping<T extends Throwable>
public boolean validate()
ExceptionMapping
ErrorType
and a Throwable
.validate
in interface ExceptionMapping<T extends Throwable>
true
if the mapping is valid and the mapped exception fits the design rules, otherwise
false
Copyright © 2016 Lexmark Enterprise Software Deutschland GmbH. All rights reserved.