aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-07-29 16:18:47 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-08-06 10:24:36 +0200
commite281b81475cc8a94a59f6ce7767d4b0996ea7180 (patch)
tree51b7a5e0e0a1abacc6157a0509377cdc5fb03fed /id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
parent99694b29f82f858f5b6163e6a3d6c11caaeb487e (diff)
downloadmoa-id-spss-e281b81475cc8a94a59f6ce7767d4b0996ea7180.tar.gz
moa-id-spss-e281b81475cc8a94a59f6ce7767d4b0996ea7180.tar.bz2
moa-id-spss-e281b81475cc8a94a59f6ce7767d4b0996ea7180.zip
Configuration Tool:
- OA Configuration TODO: - General Configuration - Import - User Management
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java359
1 files changed, 359 insertions, 0 deletions
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
new file mode 100644
index 000000000..ebd1b3862
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
@@ -0,0 +1,359 @@
+package at.gv.egovernment.moa.id.configuration.data.oa;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA;
+import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS;
+import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber;
+import at.gv.egovernment.moa.id.commons.db.dao.config.MOAKeyBoxSelector;
+import at.gv.egovernment.moa.id.commons.db.dao.config.Mandates;
+import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
+import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.TransformsInfoType;
+import at.gv.egovernment.moa.id.configuration.Constants;
+
+
+public class OAGeneralConfig {
+
+ private String dbID = null;
+
+ private String bkuOnlineURL = null;
+ private String bkuHandyURL = null;
+ private String bkuLocalURL = null;
+
+ private String identifier = null;
+ private String friendlyName = null;
+
+ private boolean businessService = false;
+
+ private String target = null;
+ private String targetFriendlyName = null;
+
+ private String identificationNumber = null;
+ private String identificationType = null;
+
+ private String aditionalAuthBlockText = null;
+
+ //TODO: look Template!!!
+
+ private String mandateProfiles = null;
+
+ private boolean isActive = false;
+ private String slVersion = null;
+ private boolean useIFrame = false;
+ private boolean useUTC = false;
+ private boolean calculateHPI = false;
+
+ private String keyBoxIdentifier = null;
+ private static Map<String, String> keyBoxIdentifierList;
+
+ private String templateURL = null;
+
+ private Map<String, byte[]> transformations;
+
+
+
+ public OAGeneralConfig() {
+ keyBoxIdentifierList = new HashMap<String, String>();
+ MOAKeyBoxSelector[] values = MOAKeyBoxSelector.values();
+ for (int i=0; i<values.length; i++) {
+ keyBoxIdentifierList.put(values[i].value(), values[i].value());
+ }
+ }
+
+
+ public void parse(OnlineApplication dbOAConfig) {
+
+ isActive = dbOAConfig.isIsActive();
+
+ friendlyName = dbOAConfig.getFriendlyName();
+
+ keyBoxIdentifier = dbOAConfig.getKeyBoxIdentifier().value();
+
+ identifier = dbOAConfig.getPublicURLPrefix();
+ target = dbOAConfig.getTarget();
+ targetFriendlyName = dbOAConfig.getTargetFriendlyName();
+
+ if (dbOAConfig.getType().equals(Constants.MOA_CONFIG_BUSINESSSERVICE))
+ businessService = true;
+ else
+ businessService = false;
+
+ AuthComponentOA oaauth = dbOAConfig.getAuthComponentOA();
+ if (oaauth != null) {
+ BKUURLS bkuurls = oaauth.getBKUURLS();
+ if (bkuurls != null) {
+ bkuHandyURL = bkuurls.getHandyBKU();
+ bkuLocalURL = bkuurls.getLocalBKU();
+ bkuOnlineURL = bkuurls.getOnlineBKU();
+ }
+
+ IdentificationNumber idnumber = oaauth.getIdentificationNumber();
+ if (idnumber != null) {
+ identificationNumber = idnumber.getValue();
+ }
+
+ Mandates mandates = oaauth.getMandates();
+ if (mandates != null) {
+ mandateProfiles = mandates.getProfiles();
+ }
+
+ slVersion = oaauth.getSlVersion();
+
+ TemplatesType templates = oaauth.getTemplates();
+ if (templates != null) {
+ aditionalAuthBlockText = templates.getAditionalAuthBlockText();
+ TemplateType templatetype = templates.getTemplate();
+
+ if (templatetype != null) {
+ templateURL = templatetype.getURL();
+ }
+ }
+
+ List<TransformsInfoType> transforminfos = oaauth.getTransformsInfo();
+ transformations = new HashMap<String, byte[]>();
+ for (TransformsInfoType el : transforminfos) {
+ transformations.put(el.getFilename(), el.getTransformation());
+ }
+
+ useIFrame = oaauth.isUseIFrame();
+ useUTC = oaauth.isUseUTC();
+ }
+
+
+
+
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public String getFriendlyName() {
+ return friendlyName;
+ }
+
+ public void setFriendlyName(String friendlyName) {
+ this.friendlyName = friendlyName;
+ }
+
+ public String getTarget() {
+ return target;
+ }
+
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+ public String getTargetFriendlyName() {
+ return targetFriendlyName;
+ }
+
+ public void setTargetFriendlyName(String targetFriendlyName) {
+ this.targetFriendlyName = targetFriendlyName;
+ }
+
+ public String getIdentificationNumber() {
+ return identificationNumber;
+ }
+
+ public void setIdentificationNumber(String identificationNumber) {
+ this.identificationNumber = identificationNumber;
+ }
+
+ public String getIdentificationType() {
+ return identificationType;
+ }
+
+ public void setIdentificationType(String identificationType) {
+ this.identificationType = identificationType;
+ }
+
+ public String getAditionalAuthBlockText() {
+ return aditionalAuthBlockText;
+ }
+
+ public void setAditionalAuthBlockText(String aditionalAuthBlockText) {
+ this.aditionalAuthBlockText = aditionalAuthBlockText;
+ }
+
+ public String getMandateProfiles() {
+ return mandateProfiles;
+ }
+
+ public void setMandateProfiles(String mandateProfiles) {
+ this.mandateProfiles = mandateProfiles;
+ }
+
+ public boolean isActive() {
+ return isActive;
+ }
+
+ public void setActive(boolean isActive) {
+ this.isActive = isActive;
+ }
+
+ public String getSlVersion() {
+ return slVersion;
+ }
+
+ public void setSlVersion(String slVersion) {
+ this.slVersion = slVersion;
+ }
+
+ public boolean isUseIFrame() {
+ return useIFrame;
+ }
+
+ public void setUseIFrame(boolean useIFrame) {
+ this.useIFrame = useIFrame;
+ }
+
+ public boolean isUseUTC() {
+ return useUTC;
+ }
+
+ public void setUseUTC(boolean useUTC) {
+ this.useUTC = useUTC;
+ }
+
+ public boolean isBusinessService() {
+ return businessService;
+ }
+
+ public void setBusinessService(boolean businessService) {
+ this.businessService = businessService;
+ }
+
+ public String getBkuOnlineURL() {
+ return bkuOnlineURL;
+ }
+
+ public void setBkuOnlineURL(String bkuOnlineURL) {
+ this.bkuOnlineURL = bkuOnlineURL;
+ }
+
+ public String getBkuHandyURL() {
+ return bkuHandyURL;
+ }
+
+ public void setBkuHandyURL(String bkuHandyURL) {
+ this.bkuHandyURL = bkuHandyURL;
+ }
+
+ public String getBkuLocalURL() {
+ return bkuLocalURL;
+ }
+
+ public void setBkuLocalURL(String bkuLocalURL) {
+ this.bkuLocalURL = bkuLocalURL;
+ }
+
+ /**
+ * @return the keyBoxIdentifier
+ */
+ public String getKeyBoxIdentifier() {
+ return keyBoxIdentifier;
+ }
+
+ /**
+ * @param keyBoxIdentifier the keyBoxIdentifier to set
+ */
+ public void setKeyBoxIdentifier(String keyBoxIdentifier) {
+ this.keyBoxIdentifier = keyBoxIdentifier;
+ }
+
+ /**
+ * @return the templateURL
+ */
+ public String getTemplateURL() {
+ return templateURL;
+ }
+
+ /**
+ * @param templateURL the templateURL to set
+ */
+ public void setTemplateURL(String templateURL) {
+ this.templateURL = templateURL;
+ }
+
+ /**
+ * @return the transformations
+ */
+ public Map<String, byte[]> getTransformations() {
+ return transformations;
+ }
+
+ /**
+ * @param transformations the transformations to set
+ */
+ public void setTransformations(Map<String, byte[]> transformations) {
+ this.transformations = transformations;
+ }
+
+
+ /**
+ * @return the dbID
+ */
+ public String getDbID() {
+ return dbID;
+ }
+
+
+ /**
+ * @param dbID the dbID to set
+ */
+ public void setDbID(long dbID) {
+ this.dbID = String.valueOf(dbID);
+ }
+
+ /**
+ * @param dbID the dbID to set
+ */
+ public void setDbID(String dbID) {
+ this.dbID = dbID;
+ }
+
+
+ /**
+ * @return the calculateHPI
+ */
+ public boolean isCalculateHPI() {
+ return calculateHPI;
+ }
+
+
+ /**
+ * @param calculateHPI the calculateHPI to set
+ */
+ public void setCalculateHPI(boolean calculateHPI) {
+ this.calculateHPI = calculateHPI;
+ }
+
+
+ /**
+ * @return the keyBoxIdentifierList
+ */
+ public Map<String, String> getKeyBoxIdentifierList() {
+ return keyBoxIdentifierList;
+ }
+
+
+ /**
+ * @param keyBoxIdentifierList the keyBoxIdentifierList to set
+ */
+ public void setKeyBoxIdentifierList(Map<String, String> list) {
+ keyBoxIdentifierList = list;
+ }
+
+
+
+}