aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java4
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java3
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java28
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java2
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java2
5 files changed, 23 insertions, 16 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
index 854334bed..ce4803978 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
@@ -34,12 +34,14 @@ public class GeneralStorkConfig {
cpepslist.add(current);
}
- List<StorkAttribute> tmp = stork.getRequestedAttributes();
+ List<StorkAttribute> tmp = stork.getAttributes();
if(null != tmp) {
attributes = new ArrayList<StorkAttribute>();
for(StorkAttribute current : tmp)
attributes.add(current);
}
+ if(attributes.isEmpty())
+ attributes.add(new StorkAttribute());
try {
qaa = stork.getQualityAuthenticationAssuranceLevel();
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java
index 1590918c6..349f3bf4a 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java
@@ -15,9 +15,8 @@ public class AttributeHelper {
public AttributeHelper(OAStorkAttribute attribute) {
isUsed = true;
- name = attribute.getAttribute().getName();
+ name = attribute.getName();
mandatory = attribute.isMandatory();
- readonly = attribute.getAttribute().isMandatory();
}
public AttributeHelper(StorkAttribute attribute) {
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 42501b4d1..10ebbe112 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
@@ -43,11 +43,11 @@ public class OASTORKConfig {
// prepare attribute helper list
attributes = new ArrayList<AttributeHelper>();
- for(StorkAttribute current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getRequestedAttributes()) {
+ for(StorkAttribute current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getAttributes()) {
AttributeHelper tmp = null;
- for(OAStorkAttribute sepp : config.getAttributes())
- if(sepp.getAttribute().equals(current))
+ for(OAStorkAttribute sepp : config.getOAAttributes())
+ if(sepp.getName().equals(current.getName()))
tmp = new AttributeHelper(sepp);
if(null == tmp)
@@ -77,15 +77,21 @@ public class OASTORKConfig {
public List<OAStorkAttribute> getAttributes() {
List<OAStorkAttribute> result = new ArrayList<OAStorkAttribute>();
+
+ if(null == getHelperAttributes())
+ return result;
+
for(AttributeHelper current : getHelperAttributes()) {
- if(current.isUsed()) {
- OAStorkAttribute tmp = new OAStorkAttribute();
- for(StorkAttribute currentAttribute : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getRequestedAttributes())
- if(currentAttribute.getName().equals(current.getName()))
- tmp.setAttribute(currentAttribute);
- tmp.setMandatory(current.isMandatory());
- result.add(tmp);
- }
+ for(StorkAttribute currentAttribute : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getAttributes())
+ if(currentAttribute.getName().equals(current.getName())) {
+ if(current.isUsed() || currentAttribute.isMandatory()) {
+ OAStorkAttribute tmp = new OAStorkAttribute();
+ tmp.setName(current.getName());
+ tmp.setMandatory(current.isMandatory());
+ result.add(tmp);
+ }
+ break;
+ }
}
return result;
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
index 1de440506..1c0cc5c89 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
@@ -398,7 +398,7 @@ public class EditGeneralConfigAction extends ActionSupport
oldstork = new STORK();
oldstork.setQualityAuthenticationAssuranceLevel(storkconfig.getDefaultQaa());
- oldstork.setRequestedAttributes(storkconfig.getAttributes());
+ oldstork.setAttributes(storkconfig.getAttributes());
oldstork.setCPEPS(storkconfig.getCpepslist());
dbforeign.setSTORK(oldstork);
}
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 59d5f7302..ca027e578 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
@@ -968,7 +968,7 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware,
// transfer the incoming data to the database model
stork.setStorkLogonEnabled(storkOA.isStorkLogonEnabled());
stork.setQaa(storkOA.getQaa());
- stork.setAttributes(storkOA.getAttributes());
+ stork.setOAAttributes(storkOA.getAttributes());
try {
if (newentry) {