From cbd8e754af9c4898f7834e0c147c3e86b87d6f5f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 7 Jun 2019 10:43:43 +0200 Subject: fix problems in configuration tool --- .../moa/id/configuration/data/GeneralMOAIDConfig.java | 13 +++++++------ .../struts/action/EditGeneralConfigAction.java | 9 ++++++--- .../moa/id/configuration/struts/action/EditOAAction.java | 16 +++++++++++----- 3 files changed, 24 insertions(+), 14 deletions(-) (limited to 'id/ConfigWebTool') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java index 11fbccc0a..3929238f6 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java @@ -1149,18 +1149,19 @@ public class GeneralMOAIDConfig { return eidSystemServiceURL; } + public boolean isMoaidMode() { + return moaidMode; + } + /** - * @param eidSystemServiceURL the elgaMandateServiceURL to set + * @param eidSystemServiceURL the E-ID Service URL to set */ - public void setEidSystemeServiceURL(String eidSystemServiceURL) { + public void setEidSystemServiceURL(String eidSystemServiceURL) { if (MiscUtil.isNotEmpty(eidSystemServiceURL)) this.eidSystemServiceURL = KeyValueUtils.removeAllNewlineFromString(eidSystemServiceURL); else this.eidSystemServiceURL = eidSystemServiceURL; } - - public boolean isMoaidMode() { - return moaidMode; - } + } 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 7c3daf928..8e057db0f 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 @@ -691,7 +691,8 @@ public class EditGeneralConfigAction extends BasicAction { StringUtils.chomp(moaconfig.getElgaMandateServiceURL().trim())); } - } + } else + dbconfig.setElgaMandateServiceURLs(null); } @@ -710,8 +711,10 @@ public class EditGeneralConfigAction extends BasicAction { dbconfig.setEidSystemServiceURLs( StringUtils.chomp(moaconfig.getEidSystemServiceURL().trim())); - } - } + } + + } else + dbconfig.setEidSystemServiceURLs(null); if (isMoaidMode) { 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 6902a668f..31126d14f 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 @@ -167,7 +167,8 @@ public class EditOAAction extends BasicOAAction { } - getStorkOA().setHelperAttributes(attributes); + if (getStorkOA() != null) + getStorkOA().setHelperAttributes(attributes); UserDatabase userdb = configuration.getUserManagement().getUserWithID(authUser .getUserID()); @@ -180,11 +181,16 @@ public class EditOAAction extends BasicOAAction { return Constants.STRUTS_SUCCESS; } - session.setAttribute( - Constants.SESSION_OAUTH20SECRET, - ((OAOAuth20Config) formList.get(new OAOAuth20Config().getName())) + if (formList.get(new OAOAuth20Config().getName()) != null) + session.setAttribute( + Constants.SESSION_OAUTH20SECRET, + ((OAOAuth20Config) formList.get(new OAOAuth20Config().getName())) .getClientSecret()); - session.setAttribute(Constants.SESSION_BKUFORMPREVIEW, getFormOA().getFormMap()); + + if (getFormOA() != null) + session.setAttribute(Constants.SESSION_BKUFORMPREVIEW, getFormOA().getFormMap()); + + nextPage = Constants.STRUTS_RETURNAREA_VALUES.main.name(); return Constants.STRUTS_OA_EDIT; -- cgit v1.2.3