Class ExceptionManager
- java.lang.Object
-
- org.gcube.datatransfer.resolver.services.error.ExceptionManager
-
public class ExceptionManager extends Object
The Class ExceptionManager.- Author:
- Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) Dec 14, 2018
-
-
Constructor Summary
Constructors Constructor Description ExceptionManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BadRequestExceptionbadRequestException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)Bad request exception.static URIcheckURI(String helpURI)Check uri.static ForbiddenRequestExceptionforbiddenException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)Forbidden exception.static InternalServerExceptioninternalErrorException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)Internal error exception.static NotFoundExceptionnotFoundException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)Not found exception.static NotAuthorizedRequestExceptionunauthorizedException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)Unauthorized exception.static WrongParameterExceptionwrongParameterException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)Wrong parameter exception.
-
-
-
Method Detail
-
internalErrorException
public static InternalServerException internalErrorException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)
Internal error exception.- Parameters:
httpRequest- the http requesterrorMessage- the error messagethrownBy- the thrown byhelpURI- the help uri- Returns:
- the internal server exception
-
badRequestException
public static BadRequestException badRequestException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)
Bad request exception.- Parameters:
httpRequest- the http requesterrorMessage- the error messagethrownBy- the thrown byhelpURI- the help uri- Returns:
- the bad request exception
-
wrongParameterException
public static WrongParameterException wrongParameterException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)
Wrong parameter exception.- Parameters:
httpRequest- the http requesterrorMessage- the error messagethrownBy- the thrown byhelpURI- the help uri- Returns:
- the wrong parameter exception
-
notFoundException
public static NotFoundException notFoundException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)
Not found exception.- Parameters:
httpRequest- the http requesterrorMessage- the error messagethrownBy- the thrown byhelpURI- the help uri- Returns:
- the not found exception
-
unauthorizedException
public static NotAuthorizedRequestException unauthorizedException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)
Unauthorized exception.- Parameters:
httpRequest- the http requesterrorMessage- the error messagethrownBy- the thrown byhelpURI- the help uri- Returns:
- the not authorized request exception
-
forbiddenException
public static ForbiddenRequestException forbiddenException(javax.servlet.http.HttpServletRequest httpRequest, String errorMessage, Class thrownBy, String helpURI)
Forbidden exception.- Parameters:
httpRequest- the http requesterrorMessage- the error messagethrownBy- the thrown byhelpURI- the help uri- Returns:
- the forbidden request exception
-
-