aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-20 16:57:14 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-24 12:19:36 +0100
commit42c8940c7b813744933d261e4c414f17762062cd (patch)
tree4ce71d8cf987a960d65fa29411f0bd9ebc01381b
parent44b1f27b00306cac728f6921befd0c1eddb97f81 (diff)
downloadmoa-id-spss-42c8940c7b813744933d261e4c414f17762062cd.tar.gz
moa-id-spss-42c8940c7b813744933d261e4c414f17762062cd.tar.bz2
moa-id-spss-42c8940c7b813744933d261e4c414f17762062cd.zip
ap plugins are persisted now
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeProviderPlugin.java22
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java12
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java2
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd13
4 files changed, 24 insertions, 25 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeProviderPlugin.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeProviderPlugin.java
deleted file mode 100644
index 00b7b09ce..000000000
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeProviderPlugin.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package at.gv.egovernment.moa.id.configuration.data.oa;
-
-public class AttributeProviderPlugin {
- private String url = "demourl";
- private String plugin = "demo";
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public String getPlugin() {
- return plugin;
- }
-
- public void setPlugin(String plugin) {
- this.plugin = plugin;
- }
-}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
index 23181076a..72fc6e3a1 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
@@ -26,6 +26,7 @@ import java.util.ArrayList;
import java.util.List;
import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead;
+import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin;
import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA;
import at.gv.egovernment.moa.id.commons.db.dao.config.OASTORK;
import at.gv.egovernment.moa.id.commons.db.dao.config.OAStorkAttribute;
@@ -79,8 +80,15 @@ public class OASTORKConfig {
}
// fetch vidp config
- attributeProviderPlugins = new ArrayList<AttributeProviderPlugin>();
- attributeProviderPlugins.add(new AttributeProviderPlugin());
+ setVidpEnabled(config.isVidpEnabled());
+
+ attributeProviderPlugins = config.getAttributeProviders();
+ // - if no attribute providers are configured, add a dummy
+ // TODO this is a dirty hack since we have to have one entry to
+ // clone from in the web form. Happens when time is short.
+ // Sorry.
+ if (attributeProviderPlugins.isEmpty())
+ attributeProviderPlugins.add(new AttributeProviderPlugin());
}
}
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 775443689..c257c76c8 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -984,6 +984,8 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware,
stork.setStorkLogonEnabled(storkOA.isStorkLogonEnabled());
stork.setQaa(storkOA.getQaa());
stork.setOAAttributes(storkOA.getAttributes());
+ stork.setVidpEnabled(storkOA.isVidpEnabled());
+ stork.setAttributeProviders(storkOA.getAttributeProviderPlugins());
try {
if (newentry) {
diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
index 33ad5c990..ea78918b6 100644
--- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
+++ b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
@@ -49,7 +49,7 @@
<xsd:extension base="xsd:string"/>
</xsd:simpleContent>
</xsd:complexType>
- <xsd:element name="AbstractSimpleIdentification" type="StorkAttribute">
+ <xsd:element name="AbstractSimpleIdentification" type="AttributeProviderPlugin">
<xsd:annotation>
<xsd:documentation>possibility to include common austrian primary
keys in human readable way, english translation not available
@@ -933,6 +933,8 @@
type="xsd:boolean" />
<xsd:element ref="Qaa" maxOccurs="1" minOccurs="0"></xsd:element>
<xsd:element ref="OAAttributes" maxOccurs="unbounded" minOccurs="0"></xsd:element>
+ <xsd:element name="VidpEnabled" type="xsd:boolean"></xsd:element>
+ <xsd:element ref="AttributeProviders" maxOccurs="unbounded" minOccurs="0"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
@@ -1010,4 +1012,13 @@
</xsd:complexType>
<xsd:element name="OAAttributes" type="OAStorkAttribute"></xsd:element>
+
+ <xsd:complexType name="AttributeProviderPlugin">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"></xsd:element>
+ <xsd:element name="url" type="xsd:anyURI"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="AttributeProviders" type="AttributeProviderPlugin"></xsd:element>
</xsd:schema>