diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-10-11 14:00:05 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-10-11 14:00:05 +0200 |
commit | 550ba6452a44cd93066fc5317de626d21758901b (patch) | |
tree | cfe49f04d9c8c2c06e8e4353e5bd676e6e963530 /id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data | |
parent | 663ad546237fe9102c97e0eed2970e703d3034d9 (diff) | |
download | moa-id-spss-550ba6452a44cd93066fc5317de626d21758901b.tar.gz moa-id-spss-550ba6452a44cd93066fc5317de626d21758901b.tar.bz2 moa-id-spss-550ba6452a44cd93066fc5317de626d21758901b.zip |
-- Customizable BKUSelection Form and SendAssertion Form
-- OA specific Checkbox to disable SAML1
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data')
3 files changed, 305 insertions, 69 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java new file mode 100644 index 000000000..0d13de3fe --- /dev/null +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java @@ -0,0 +1,286 @@ +package at.gv.egovernment.moa.id.configuration.data; + +import java.util.Arrays; +import java.util.List; + +import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA; +import at.gv.egovernment.moa.id.commons.db.dao.config.BKUSelectionCustomizationType; +import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; +import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType; +import at.gv.egovernment.moa.util.MiscUtil; + +public class FormularCustomization { + + private boolean showMandateLoginButton = true; + private boolean onlyMandateAllowed = false; + + private String fontType = null; + + private String frontColor = null; + private String backGroundColor = null; + private String header_FrontColor = null; + private String header_BackGroundColor = null; + private String header_text = null; + private String button_BackGroundColor = null; + private String button_BackGroundColorFocus = null; + private String button_FrontColor = null; + + private String appletRedirectTarget = null; + public static List<String> appletRedirectTargetList = null; + + public FormularCustomization() { + appletRedirectTargetList = Arrays.asList("","_blank","_self","_parent","_top"); + } + + + public void parse(OnlineApplication dbOAConfig) { + AuthComponentOA auth = dbOAConfig.getAuthComponentOA(); + + if (auth != null) { + TemplatesType templates = auth.getTemplates(); + if (templates != null) { + BKUSelectionCustomizationType formcustom = templates.getBKUSelectionCustomization(); + if (formcustom != null) { + + if (formcustom.isMandateLoginButton() != null) + showMandateLoginButton = formcustom.isMandateLoginButton(); + + if (formcustom.isOnlyMandateLoginAllowed() != null) + onlyMandateAllowed = formcustom.isOnlyMandateLoginAllowed(); + + if (MiscUtil.isNotEmpty(formcustom.getAppletRedirectTarget())) + appletRedirectTarget = formcustom.getAppletRedirectTarget(); + + if (MiscUtil.isNotEmpty(formcustom.getBackGroundColor())) + backGroundColor = formcustom.getBackGroundColor(); + + if (MiscUtil.isNotEmpty(formcustom.getButtonBackGroundColor())) + button_BackGroundColor = formcustom.getButtonBackGroundColor(); + + if (MiscUtil.isNotEmpty(formcustom.getButtonBackGroundColorFocus())) + button_BackGroundColorFocus = formcustom.getButtonBackGroundColorFocus(); + + if (MiscUtil.isNotEmpty(formcustom.getButtonFontColor())) + button_FrontColor = formcustom.getButtonFontColor(); + + if (MiscUtil.isNotEmpty(formcustom.getFontType())) + fontType = formcustom.getFontType(); + + if (MiscUtil.isNotEmpty(formcustom.getFrontColor())) + frontColor = formcustom.getFrontColor(); + + if (MiscUtil.isNotEmpty(formcustom.getHeaderBackGroundColor())) + header_BackGroundColor = formcustom.getHeaderBackGroundColor(); + + if (MiscUtil.isNotEmpty(formcustom.getHeaderFrontColor())) + header_FrontColor = formcustom.getHeaderFrontColor(); + + if (MiscUtil.isNotEmpty(formcustom.getHeaderText())) + header_text = formcustom.getHeaderText(); + } + } + } + } + + + /** + * @return the showMandateLoginButton + */ + public boolean isShowMandateLoginButton() { + return showMandateLoginButton; + } + + + /** + * @param showMandateLoginButton the showMandateLoginButton to set + */ + public void setShowMandateLoginButton(boolean showMandateLoginButton) { + this.showMandateLoginButton = showMandateLoginButton; + } + + + /** + * @return the onlyMandateAllowed + */ + public boolean isOnlyMandateAllowed() { + return onlyMandateAllowed; + } + + + /** + * @param onlyMandateAllowed the onlyMandateAllowed to set + */ + public void setOnlyMandateAllowed(boolean onlyMandateAllowed) { + this.onlyMandateAllowed = onlyMandateAllowed; + } + + + /** + * @return the fontType + */ + public String getFontType() { + return fontType; + } + + + /** + * @param fontType the fontType to set + */ + public void setFontType(String fontType) { + this.fontType = fontType; + } + + + /** + * @return the frontColor + */ + public String getFrontColor() { + return frontColor; + } + + + /** + * @param frontColor the frontColor to set + */ + public void setFrontColor(String frontColor) { + this.frontColor = frontColor; + } + + + /** + * @return the backGroundColor + */ + public String getBackGroundColor() { + return backGroundColor; + } + + + /** + * @param backGroundColor the backGroundColor to set + */ + public void setBackGroundColor(String backGroundColor) { + this.backGroundColor = backGroundColor; + } + + + /** + * @return the header_FrontColor + */ + public String getHeader_FrontColor() { + return header_FrontColor; + } + + + /** + * @param header_FrontColor the header_FrontColor to set + */ + public void setHeader_FrontColor(String header_FrontColor) { + this.header_FrontColor = header_FrontColor; + } + + + /** + * @return the header_BackGroundColor + */ + public String getHeader_BackGroundColor() { + return header_BackGroundColor; + } + + + /** + * @param header_BackGroundColor the header_BackGroundColor to set + */ + public void setHeader_BackGroundColor(String header_BackGroundColor) { + this.header_BackGroundColor = header_BackGroundColor; + } + + + /** + * @return the header_text + */ + public String getHeader_text() { + return header_text; + } + + + /** + * @param header_text the header_text to set + */ + public void setHeader_text(String header_text) { + this.header_text = header_text; + } + + + /** + * @return the button_BackGroundColor + */ + public String getButton_BackGroundColor() { + return button_BackGroundColor; + } + + + /** + * @param button_BackGroundColor the button_BackGroundColor to set + */ + public void setButton_BackGroundColor(String button_BackGroundColor) { + this.button_BackGroundColor = button_BackGroundColor; + } + + + /** + * @return the button_BackGroundColorFocus + */ + public String getButton_BackGroundColorFocus() { + return button_BackGroundColorFocus; + } + + + /** + * @param button_BackGroundColorFocus the button_BackGroundColorFocus to set + */ + public void setButton_BackGroundColorFocus(String button_BackGroundColorFocus) { + this.button_BackGroundColorFocus = button_BackGroundColorFocus; + } + + + /** + * @return the button_FrontColor + */ + public String getButton_FrontColor() { + return button_FrontColor; + } + + + /** + * @param button_FrontColor the button_FrontColor to set + */ + public void setButton_FrontColor(String button_FrontColor) { + this.button_FrontColor = button_FrontColor; + } + + + /** + * @return the appletRedirectTarget + */ + public String getAppletRedirectTarget() { + return appletRedirectTarget; + } + + /** + * @param appletRedirectTarget the appletRedirectTarget to set + */ + public void setAppletRedirectTarget(String appletRedirectTarget) { + this.appletRedirectTarget = appletRedirectTarget; + } + + + /** + * @return the appletredirecttargetlist + */ + public List<String> getAppletRedirectTargetList() { + return appletRedirectTargetList; + } + + + +} diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java index 90c02e0e4..07c07a964 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java @@ -8,7 +8,6 @@ import java.util.Map; import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA; -import at.gv.egovernment.moa.id.commons.db.dao.config.BKUSelectionCustomizationType; import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS; import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs; import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber; @@ -63,10 +62,6 @@ public class OAGeneralConfig { private boolean isHideBPKAuthBlock = false; - private boolean showMandateLoginButton = true; - private boolean onlyMandateAllowed = false; - private String bkuSelectionBackGroundColor = null; - private Map<String, byte[]> transformations; @@ -197,19 +192,6 @@ public class OAGeneralConfig { SLTemplates.add(el.getURL()); } } - - BKUSelectionCustomizationType bkuselectioncustom = templates.getBKUSelectionCustomization(); - if (bkuselectioncustom != null) { - - if (MiscUtil.isNotEmpty(bkuselectioncustom.getBackGroundColor())) - bkuSelectionBackGroundColor = bkuselectioncustom.getBackGroundColor(); - - if (bkuselectioncustom.isMandateLoginButton() != null) - showMandateLoginButton = bkuselectioncustom.isMandateLoginButton(); - - if (bkuselectioncustom.isOnlyMandateLoginAllowed() != null) - onlyMandateAllowed = bkuselectioncustom.isOnlyMandateLoginAllowed(); - } } if (SLTemplates != null && SLTemplates.size() > 0) @@ -571,55 +553,5 @@ public class OAGeneralConfig { */ public void setHideBPKAuthBlock(boolean isHideBPKAuthBlock) { this.isHideBPKAuthBlock = isHideBPKAuthBlock; - } - - - /** - * @return the showMandateLoginButton - */ - public boolean isShowMandateLoginButton() { - return showMandateLoginButton; - } - - - /** - * @param showMandateLoginButton the showMandateLoginButton to set - */ - public void setShowMandateLoginButton(boolean showMandateLoginButton) { - this.showMandateLoginButton = showMandateLoginButton; - } - - - /** - * @return the onlyMandateAllowed - */ - public boolean isOnlyMandateAllowed() { - return onlyMandateAllowed; - } - - - /** - * @param onlyMandateAllowed the onlyMandateAllowed to set - */ - public void setOnlyMandateAllowed(boolean onlyMandateAllowed) { - this.onlyMandateAllowed = onlyMandateAllowed; - } - - - /** - * @return the bkuSelectionBackGroundColor - */ - public String getBkuSelectionBackGroundColor() { - return bkuSelectionBackGroundColor; - } - - - /** - * @param bkuSelectionBackGroundColor the bkuSelectionBackGroundColor to set - */ - public void setBkuSelectionBackGroundColor(String bkuSelectionBackGroundColor) { - this.bkuSelectionBackGroundColor = bkuSelectionBackGroundColor; - } - - + } } diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java index 687a06b9e..951052877 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASAML1Config.java @@ -6,6 +6,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; public class OASAML1Config { + private boolean isActive = false; private boolean provideStammZahl = false; private boolean provideAuthBlock = false; private boolean provideIdentityLink = false; @@ -30,6 +31,8 @@ public class OASAML1Config { provideStammZahl = saml1.isProvideStammzahl(); useCondition = saml1.isUseCondition(); conditionLength = saml1.getConditionLength().intValue(); + if (saml1.isIsActive() != null) + isActive = saml1.isIsActive(); } } } @@ -76,6 +79,21 @@ public class OASAML1Config { public void setConditionLength(int conditionLength) { this.conditionLength = conditionLength; } + + /** + * @return the isActive + */ + public boolean isActive() { + return isActive; + } + + /** + * @param isActive the isActive to set + */ + public void setActive(boolean isActive) { + this.isActive = isActive; + } + } |