Interface ExceptionFactory
- All Known Subinterfaces:
AuthenticatorExceptionFactory
public interface ExceptionFactory
-
Method Summary
Modifier and TypeMethodDescriptionbadRequestException(ErrorCode errorCode) badRequestException(ErrorCode errorCode, String errorDetailMessage) configurationException(String errorDetailMessage) contentTypeNotAcceptable(Collection<String> acceptableContentTypes) credentialManagerException(String message) Create an Exception representing a failure on aCredentialManager.externalServiceException(String message) forbiddenException(ErrorCode errorCode) forbiddenException(ErrorCode errorCode, String errorDetailMessage) internalServerException(ErrorCode errorCode) internalServerException(ErrorCode errorCode, String errorDetailMessage) methodNotAllowed(String errorDetailMessage) notFoundException(ErrorCode errorCode, String errorDetailMessage) redirectException(String redirectUri) Redirects a request to another location.redirectException(String redirectUri, RedirectStatusCode redirectStatusCode) Creates a Redirect Exception that can be used to redirect the caller to a different location using the givenRedirectStatusCode.redirectException(String redirectUri, RedirectStatusCode redirectStatusCode, Map<String, Collection<String>> parameters, boolean addParametersToFragment) Creates a Redirect Exception with the given parameters on the query string or fragment that can be used to redirect the caller to a different location.redirectException(URI redirectUri, RedirectStatusCode redirectStatusCode, Map<String, Collection<String>> parameters, boolean addParametersToFragment) Creates a RedirectException with the given parameters on the query string or fragment that can be used to redirect the caller to a different location.requestValidationException(Set<ErrorMessage> errorMessages) templateNotFoundException(String template) unauthorizedException(ErrorCode errorCode) unauthorizedException(ErrorCode errorCode, String errorDetailMessage) unauthorizedException(ErrorCode errorCode, String errorDetailMessage, String realm) unauthorizedException(ErrorCode errorCode, String errorDetailMessage, String realm, String authScheme)
-
Method Details
-
forbiddenException
-
forbiddenException
-
unauthorizedException
-
unauthorizedException
-
unauthorizedException
RuntimeException unauthorizedException(ErrorCode errorCode, String errorDetailMessage, String realm) -
unauthorizedException
RuntimeException unauthorizedException(ErrorCode errorCode, String errorDetailMessage, String realm, String authScheme) -
badRequestException
-
badRequestException
-
internalServerException
-
internalServerException
-
configurationException
-
redirectException
Redirects a request to another location.- Parameters:
redirectUri- the URI to redirect to- Returns:
- an Exception that can be thrown to redirect the caller to the given URI
- See Also:
- "Implementation Requirements:"
- The redirect status code that implementations of this interface must use is a 302, moved temporarily.
-
redirectException
Creates a Redirect Exception that can be used to redirect the caller to a different location using the givenRedirectStatusCode.- Parameters:
redirectUri- the URI to redirect toredirectStatusCode- the status code to use when redirecting the client- Returns:
- an Exception that can be thrown to redirect the caller to the given URI
-
redirectException
RuntimeException redirectException(String redirectUri, RedirectStatusCode redirectStatusCode, Map<String, Collection<String>> parameters, boolean addParametersToFragment) Creates a Redirect Exception with the given parameters on the query string or fragment that can be used to redirect the caller to a different location.- Parameters:
redirectUri- the URI to redirect toredirectStatusCode- the status code to use when redirecting the clientparameters- any parameters that should be added to the query string or fragmentaddParametersToFragment-trueif the parameters should be added to the fragment; false if they should be added to the query string- Returns:
- an Exception that can be thrown to redirect the caller to the given URI
-
redirectException
RuntimeException redirectException(URI redirectUri, RedirectStatusCode redirectStatusCode, Map<String, Collection<String>> parameters, boolean addParametersToFragment) Creates a RedirectException with the given parameters on the query string or fragment that can be used to redirect the caller to a different location.- Parameters:
redirectUri- the URI to redirect toredirectStatusCode- the status code to use when redirecting the clientparameters- any parameters that should be added to the query string or fragmentaddParametersToFragment-trueif the parameters should be added to the fragment; false if they should be added to the query string- Returns:
- an Exception that can be thrown to redirect the caller to the given URI
-
notFoundException
RuntimeException notFoundException() -
notFoundException
-
methodNotAllowed
RuntimeException methodNotAllowed() -
methodNotAllowed
-
contentTypeNotAcceptable
-
requestValidationException
-
templateNotFoundException
-
externalServiceException
-
credentialManagerException
Create an Exception representing a failure on aCredentialManager.This error is normally thrown when a user's credentials are invalid or cannot be updated.
- Parameters:
message- detailed error message- Returns:
- Exception
- Since:
- 4.0.0
-