Interface ExceptionFactory<T extends java.lang.Exception>
-
- Type Parameters:
T
- the exception type supported by the factory
- All Known Implementing Classes:
AbstractExceptionFactory
,ApplicationExceptionFactory
,RuntimeExceptionFactory
,SystemExceptionFactory
public interface ExceptionFactory<T extends java.lang.Exception>
Exception factories create ECM Service exceptions based on server faults. Exception factories maintain an internal exception mapping in order to define which exceptions are instantiated for which error codes.- Author:
- owaeldrich
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ExceptionFactory.IntegrityCheckResult
Result for a exception factory integrity checks.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExceptionFactory.IntegrityCheckResult
checkIntegrity()
Performs an integrity check on the factories exception mapping registries.T
createException(com.lexmark.saperion.exceptions.ErrorType error, java.lang.Throwable cause)
This method creates a new exception instance for the given server fault.boolean
supports(com.lexmark.saperion.exceptions.ErrorCodeType code)
This method determines if an exception mapping for faults with the given error code exists in the factory instance.
-
-
-
Method Detail
-
checkIntegrity
ExceptionFactory.IntegrityCheckResult checkIntegrity()
Performs an integrity check on the factories exception mapping registries.- Returns:
- the integrity check result
-
createException
T createException(com.lexmark.saperion.exceptions.ErrorType error, java.lang.Throwable cause)
This method creates a new exception instance for the given server fault.- Parameters:
error
- the server error representationcause
- the exception cause- Returns:
- the exception instance for the given server error
-
supports
boolean supports(com.lexmark.saperion.exceptions.ErrorCodeType code)
This method determines if an exception mapping for faults with the given error code exists in the factory instance. Therefore, the exception factory searches its internal exception mappings whether a mapping for the given error code exists or not.- Parameters:
code
- the server error code- Returns:
- the exception instance for the given server fault
-
-