From 3cbba3fcda614fa37357822d0eeb543c3e19276e Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 21 Apr 2021 07:42:50 +0200 Subject: some small updates in central error-handling --- .../services/IProtocolAuthenticationService.java | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'eaaf_core_api/src/main') diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java index f110d50e..8def4e32 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java @@ -19,16 +19,18 @@ package at.gv.egiz.eaaf.core.api.idp.auth.services; +import java.io.IOException; + +import javax.annotation.Nonnull; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.logging.IStatisticLogger; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.exceptions.GuiBuildException; import at.gv.egiz.eaaf.core.impl.data.Pair; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - public interface IProtocolAuthenticationService { String PARAM_GUI_ERROMSG = "errorMsg"; @@ -49,8 +51,8 @@ public interface IProtocolAuthenticationService { * @throws IOException In case of a communication error * @throws EaafException In case of an application error */ - void performAuthentication(HttpServletRequest httpReq, HttpServletResponse httpResp, IRequest pendingReq) - throws IOException, EaafException; + void performAuthentication(@Nonnull HttpServletRequest httpReq, @Nonnull HttpServletResponse httpResp, + @Nonnull IRequest pendingReq) throws IOException, EaafException; /** * Finalize the requested protocol operation. @@ -62,8 +64,8 @@ public interface IProtocolAuthenticationService { * {@link HttpServletResponse} * @throws EaafException If an internal error occur */ - void finalizeAuthentication(HttpServletRequest httpReq, HttpServletResponse httpResp, IRequest pendingReq) - throws EaafException, IOException; + void finalizeAuthentication(@Nonnull HttpServletRequest httpReq, @Nonnull HttpServletResponse httpResp, + @Nonnull IRequest pendingReq) throws EaafException, IOException; /** * Build protocol-specific error message. @@ -76,8 +78,8 @@ public interface IProtocolAuthenticationService { * {@link HttpServletResponse} * @throws EaafException If an internal error occur */ - void buildProtocolSpecificErrorResponse(Throwable throwable, HttpServletRequest req, HttpServletResponse resp, - IRequest pendingReq) throws IOException, EaafException; + void buildProtocolSpecificErrorResponse(@Nonnull Throwable throwable, @Nonnull HttpServletRequest req, + @Nonnull HttpServletResponse resp, @Nonnull IRequest pendingReq) throws IOException, EaafException; /** * Handles all exceptions with no pending request. Therefore, the error is @@ -94,8 +96,8 @@ public interface IProtocolAuthenticationService { * {@link HttpServletResponse} * @throws EaafException If an internal error occure */ - void handleErrorNoRedirect(Throwable throwable, HttpServletRequest req, HttpServletResponse resp, - boolean writeExceptionToStatisticLog) throws IOException, EaafException; + void handleErrorNoRedirect(@Nonnull Throwable throwable, @Nonnull HttpServletRequest req, + @Nonnull HttpServletResponse resp, boolean writeExceptionToStatisticLog) throws IOException, EaafException; /** * Forward the process to error-handler in case of an error. @@ -106,8 +108,8 @@ public interface IProtocolAuthenticationService { * @param resp HTTP response * @throws GuiBuildException In case of an GUI generation error */ - void forwardToErrorHandler(Pair errorToHandle, String errorKey, - HttpServletRequest req, HttpServletResponse resp) throws GuiBuildException; + void forwardToErrorHandler(@Nonnull Pair errorToHandle, @Nonnull String errorKey, + @Nonnull HttpServletRequest req, @Nonnull HttpServletResponse resp) throws GuiBuildException; -- cgit v1.2.3