aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-10-29 14:06:00 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-10-29 14:06:00 +0100
commit08e1d59be7c555a49f75988b050a43e0431ce9be (patch)
treefa00dbb1fe13779decdb13aefe8b46e848371b6e /id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts
parent41b1942dc69f1284894270e724ef517fb689f075 (diff)
parentb9e2c8e57097ab446264a4e5f42765c5ed67dceb (diff)
downloadmoa-id-spss-08e1d59be7c555a49f75988b050a43e0431ce9be.tar.gz
moa-id-spss-08e1d59be7c555a49f75988b050a43e0431ce9be.tar.bz2
moa-id-spss-08e1d59be7c555a49f75988b050a43e0431ce9be.zip
Merge branch 'ISA-1.18-action' into moa-2.1-Snapshot
Conflicts: id/server/idserverlib/pom.xml
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IDPGatewayAction.java56
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java18
2 files changed, 74 insertions, 0 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IDPGatewayAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IDPGatewayAction.java
new file mode 100644
index 000000000..e238c6d37
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IDPGatewayAction.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2014 Federal Chancellery Austria
+ * MOA-ID has been developed in a cooperation between BRZ, the Federal
+ * Chancellery Austria - ICT staff unit, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egovernment.moa.id.configuration.struts.action;
+
+import java.util.LinkedHashMap;
+
+import at.gv.egovernment.moa.id.configuration.data.oa.IOnlineApplicationData;
+import at.gv.egovernment.moa.id.configuration.data.oa.OAMOAIDPInterfederationConfig;
+import at.gv.egovernment.moa.id.configuration.data.oa.OAPVP2Config;
+import at.gv.egovernment.moa.id.configuration.data.oa.PVPGatewayInterfederationConfig;
+
+/**
+ * @author tlenz
+ *
+ */
+public class IDPGatewayAction extends InterfederationIDPAction {
+
+ private static final long serialVersionUID = -2047128481980413334L;
+
+ public IDPGatewayAction() {
+ super();
+ formList.putAll(buildIDPGatewayFormList());
+ }
+
+ public static LinkedHashMap<String, IOnlineApplicationData> buildIDPGatewayFormList() {
+
+ LinkedHashMap<String, IOnlineApplicationData> forms =
+ new LinkedHashMap<String, IOnlineApplicationData>();
+
+ PVPGatewayInterfederationConfig pvpGatewayconfig = new PVPGatewayInterfederationConfig();
+ forms.put(pvpGatewayconfig.getName(), pvpGatewayconfig);
+
+ return forms;
+ }
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
index f84bcdbce..89dce3200 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
@@ -46,6 +46,7 @@ import at.gv.egovernment.moa.id.configuration.data.oa.OAMOAIDPInterfederationCon
import at.gv.egovernment.moa.id.configuration.data.oa.OAOAuth20Config;
import at.gv.egovernment.moa.id.configuration.data.oa.OASTORKConfig;
import at.gv.egovernment.moa.id.configuration.data.oa.OATargetConfiguration;
+import at.gv.egovernment.moa.id.configuration.data.oa.PVPGatewayInterfederationConfig;
import at.gv.egovernment.moa.id.configuration.exception.BasicActionException;
import at.gv.egovernment.moa.id.configuration.exception.BasicOAActionException;
import at.gv.egovernment.moa.id.configuration.helper.FormDataHelper;
@@ -63,6 +64,7 @@ public class InterfederationIDPAction extends BasicOAAction {
public static final String STRUTS_IDP_VIDP = "-VIDP";
public static final String STRUTS_IDP_MOA = "-MOAIDP";
+ public static final String STRUTS_IDP_GATEWAY = "-IDPGATEWAY";
private List<OAListElement> formOAs;
@@ -123,6 +125,9 @@ public class InterfederationIDPAction extends BasicOAAction {
if (STRUTS_IDP_MOA.equals(interfederationType)) {
formList.putAll(MOAIDPAction.buildMOAIDPFormList());
+
+ } else if (STRUTS_IDP_GATEWAY.equals(interfederationType)) {
+ formList.putAll(IDPGatewayAction.buildIDPGatewayFormList());
} else if (STRUTS_IDP_VIDP.equals(interfederationType)) {
formList.putAll(VIDPAction.buildVIDPFormList());
@@ -178,6 +183,10 @@ public class InterfederationIDPAction extends BasicOAAction {
getStorkOA().getAttributeProviderPlugins().add(new AttributeProviderPlugin());
interfederationType = STRUTS_IDP_VIDP;
+ } else if (oa.isIsInterfederationGateway() != null && oa.isIsInterfederationGateway()) {
+ formList.putAll(IDPGatewayAction.buildIDPGatewayFormList());
+ interfederationType = STRUTS_IDP_GATEWAY;
+
} else {
log.warn("Requested application is not an interfederation IDP.");
return Constants.STRUTS_NOTALLOWED;
@@ -217,6 +226,7 @@ public class InterfederationIDPAction extends BasicOAAction {
if ( onlineapplication != null &&
!((onlineapplication.isIsInterfederationIDP() != null && onlineapplication.isIsInterfederationIDP()) ||
+ (onlineapplication.isIsInterfederationGateway() != null && onlineapplication.isIsInterfederationGateway()) ||
(onlineapplication.getAuthComponentOA().getOASTORK() != null
&& onlineapplication.getAuthComponentOA().getOASTORK().isVidpEnabled() != null
&& onlineapplication.getAuthComponentOA().getOASTORK().isVidpEnabled()))) {
@@ -415,6 +425,14 @@ public class InterfederationIDPAction extends BasicOAAction {
formList.put(pvp2oa.getName(), pvp2oa);
}
+ public PVPGatewayInterfederationConfig getPVPGateway() {
+ return (PVPGatewayInterfederationConfig) formList.get(new PVPGatewayInterfederationConfig().getName());
+ }
+
+ public void setPVPGateway(PVPGatewayInterfederationConfig val) {
+ formList.put(val.getName(), val);
+ }
+
/**
* @return the formOA
*/