aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-08-06 18:53:14 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-08-06 18:53:14 +0200
commit328f850d0b5775bc8aed8f5ced1a6ef6269cb831 (patch)
tree8b1cd2f0cf4e6e303af7fcd4f53f74d53db1b855 /id/server/idserverlib/src/main
parent845d7241c2556d36cfd91cdca8ddeb11f0395e6e (diff)
downloadmoa-id-spss-328f850d0b5775bc8aed8f5ced1a6ef6269cb831.tar.gz
moa-id-spss-328f850d0b5775bc8aed8f5ced1a6ef6269cb831.tar.bz2
moa-id-spss-328f850d0b5775bc8aed8f5ced1a6ef6269cb831.zip
- Change UserBase implementation
- starts with general MOAID Config
Diffstat (limited to 'id/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java6
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java10
2 files changed, 13 insertions, 3 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
index d4736efbb..ff8c562a7 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
@@ -304,6 +304,12 @@ public class AuthConfigurationProvider extends ConfigurationProvider {
moaidconfig = ConfigurationDBRead.getMOAIDConfiguration();
if (moaidconfig != null)
ConfigurationDBUtils.delete(moaidconfig);
+
+ List<OnlineApplication> oas = ConfigurationDBRead.getAllOnlineApplications();
+ if (oas != null && oas.size() > 0) {
+ for (OnlineApplication oa : oas)
+ ConfigurationDBUtils.delete(oa);
+ }
}
//load legacy config if it is configured
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
index 61f0f7e90..7ec8c823e 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
@@ -127,6 +127,7 @@ public class BuildFromLegacyConfig {
//Load generic Config
Map genericConfiguration = builder.buildGenericConfiguration();
GeneralConfiguration authGeneral = new GeneralConfiguration();
+
if (genericConfiguration.containsKey(GENERIC_CONFIG_PARAM_SOURCEID))
authGeneral.setAlternativeSourceID(
(String)genericConfiguration.get(GENERIC_CONFIG_PARAM_SOURCEID));
@@ -210,12 +211,14 @@ public class BuildFromLegacyConfig {
String[] transformsInfos = builder.loadTransformsInfos(transformsInfoFileNames);
List<TransformsInfoType> auth_transformInfos = new ArrayList<TransformsInfoType>();
- for (String transformInfo : transformsInfos) {
+
+ for (int i=0; i<transformsInfos.length; i++) {
+// for (String transformInfo : transformsInfos) {
TransformsInfoType transforminfotype = new TransformsInfoType();
- transforminfotype.setFilename("");
+ transforminfotype.setFilename(transformsInfoFileNames[i]);
//TODO: Transformation is stored in BASE64
- transforminfotype.setTransformation(Base64Utils.encode(transformInfo.getBytes("UTF-8")).getBytes("UTF-8"));
+ transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
auth_transformInfos.add(transforminfotype);
}
SecurityLayer auth_securityLayer = new SecurityLayer();
@@ -355,6 +358,7 @@ public class BuildFromLegacyConfig {
moa_oa.setTarget(oa.getTarget());
moa_oa.setTargetFriendlyName(oa.getTargetFriendlyName());
moa_oa.setType(oa.getOaType());
+ moa_oa.setIsActive(true);
AuthComponentOA oa_auth = new AuthComponentOA();