summaryrefslogtreecommitdiff
path: root/eaaf_core_api/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core_api/src/main')
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java19
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IGuiBuilderConfigurationFactory.java13
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java16
3 files changed, 48 insertions, 0 deletions
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java
index 384446b8..05b7784e 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java
@@ -263,5 +263,24 @@ public interface IRequest extends Serializable {
* otherwise false
*/
void setAbortedByUser(boolean isAborted);
+
+ /**
+ * Indicates, if the current process stage is in iFrame.
+ *
+ * <p>If the current state is marked as 'in iFrame',
+ * than the process engine will perform an target=_parent hope in case of an error</p>
+ *
+ * @return true, if the process is in iFrame, otherwise false
+ */
+ boolean isProcessInIframe();
+
+ /**
+ * Set the 'isProcessInIframe' flag to this pending-request.
+ *
+ * @param flag true, if the process is in iFrame and needs a target=_parent hope in case of an error
+ */
+ void setProcessInFrame(boolean flag);
+
+
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IGuiBuilderConfigurationFactory.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IGuiBuilderConfigurationFactory.java
index ed888f87..618b5987 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IGuiBuilderConfigurationFactory.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IGuiBuilderConfigurationFactory.java
@@ -22,6 +22,8 @@ package at.gv.egiz.eaaf.core.api.gui;
import java.net.MalformedURLException;
import java.net.URI;
+import javax.annotation.Nonnull;
+
import at.gv.egiz.eaaf.core.api.IRequest;
public interface IGuiBuilderConfigurationFactory {
@@ -35,6 +37,17 @@ public interface IGuiBuilderConfigurationFactory {
IGuiBuilderConfiguration getDefaultErrorGui(String authUrl);
/**
+ * Get a default {@link IGuiBuilderConfiguration} that implements an iFrame to parent hop.
+ *
+ * @param pendingReq Current pending-request object
+ * @param endpoint Request end-point
+ * @param errorKey Error identifier
+ * @return GUIBuilder configuration with parent hop.
+ */
+ IGuiBuilderConfiguration getDefaultIFrameParentHopGui(@Nonnull IRequest pendingReq,
+ @Nonnull String endpoint, @Nonnull String errorKey);
+
+ /**
* Default Velocity based GUI builder configuration.
*
* <p>
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 86d15d5b..d1d68c2d 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
@@ -27,6 +27,8 @@ 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;
public interface IProtocolAuthenticationService {
@@ -92,4 +94,18 @@ public interface IProtocolAuthenticationService {
void handleErrorNoRedirect(Throwable throwable, HttpServletRequest req, HttpServletResponse resp,
boolean writeExceptionToStatisticLog) throws IOException, EaafException;
+ /**
+ * Forward the process to error-handler in case of an error.
+ *
+ * @param errorToHandle Error to handle
+ * @param errorKey ErrorId for error-handler
+ * @param req HTTP response
+ * @param resp HTTP response
+ * @throws GuiBuildException In case of an GUI generation error
+ */
+ void forwardToErrorHandler(Pair<IRequest, Throwable> errorToHandle, String errorKey,
+ HttpServletRequest req, HttpServletResponse resp) throws GuiBuildException;
+
+
+
}