Package org.forgerock.audit.util
Class ResourceExceptionsUtil
java.lang.Object
org.forgerock.audit.util.ResourceExceptionsUtil
Utility class to use on ResourceExceptions.
- 
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceExceptionAdapts aThrowableto aResourceException.static ResourceExceptionnotSupported(Request request) Creates a NotSupportedException.static ResourceExceptionnotSupportedOnCollection(Request request) Creates a NotSupportedException.static ResourceExceptionnotSupportedOnInstance(Request request) Creates a NotSupportedException. 
- 
Method Details
- 
adapt
Adapts aThrowableto aResourceException. If theThrowableis an JSONJsonValueExceptionthen an appropriateResourceExceptionis returned, otherwise anInternalServerErrorExceptionis returned.- Parameters:
 t- TheThrowableto be converted.- Returns:
 - The equivalent resource exception.
 
 - 
notSupported
Creates a NotSupportedException.- Parameters:
 request- the crest request- Returns:
 - a NotSupportedException
 
 - 
notSupportedOnCollection
Creates a NotSupportedException.- Parameters:
 request- the crest request- Returns:
 - a NotSupportedException
 
 - 
notSupportedOnInstance
Creates a NotSupportedException.- Parameters:
 request- the crest request- Returns:
 - a NotSupportedException
 
 
 -