diff options
author | mcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2010-07-02 07:14:41 +0000 |
---|---|---|
committer | mcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2010-07-02 07:14:41 +0000 |
commit | 68af85701b6f797b0d662b89b95e043ee949defd (patch) | |
tree | 070935cdd1144aeeb8ce6adddd0da34a72e6ffef /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java | |
parent | 3d707db8bf4ec346b8ab6185b8e5ac5403bf2b0a (diff) | |
download | moa-id-spss-68af85701b6f797b0d662b89b95e043ee949defd.tar.gz moa-id-spss-68af85701b6f797b0d662b89b95e043ee949defd.tar.bz2 moa-id-spss-68af85701b6f797b0d662b89b95e043ee949defd.zip |
Merged branch 1.4.7_MOASP_TSL back into trunk.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1165 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java index d22fef5e7..7cc33ca52 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java @@ -98,7 +98,7 @@ public class ConfigurationBuilder { protected static final String INPUT_PROCESSOR_TEMPLATE_XPATH = ROOT + CONF + "AuthComponent/" + CONF + "Templates/" + CONF + "InputProcessorSignTemplate/@URL"; /** an XPATH-Expression */ - public static final String AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH = + public static final String AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH = ROOT + CONF + "AuthComponent/" + CONF + "SecurityLayer/" + CONF + "TransformsInfo/@filename"; /** an XPATH-Expression */ protected static final String AUTH_MOA_SP_XPATH = @@ -122,6 +122,12 @@ public class ConfigurationBuilder { ROOT + CONF + "AuthComponent/" + CONF + "VerifyInfoboxes"; /** an XPATH-Expression */ + public static final String AUTH_FOREIGN_IDENTITIES_XPATH = + ROOT + CONF + "AuthComponent/" + CONF + "ForeignIdentities"; + + + + /** an XPATH-Expression */ protected static final String OA_XPATH = ROOT + CONF + "OnlineApplication"; /** an XPATH-Expression */ protected static final String OA_LOGIN_XPATH = ROOT + CONF + "OnlineApplication/@loginURL"; @@ -182,10 +188,10 @@ public class ConfigurationBuilder { - /** - * main configuration file directory name used to configure MOA-ID - */ - protected String rootConfigFileDir_; + /** + * main configuration file directory name used to configure MOA-ID + */ + protected String rootConfigFileDir_; /** The root element of the MOA-ID configuration */ protected Element configElem_; @@ -220,6 +226,18 @@ public class ConfigurationBuilder { if (authBKU==null) return null; return buildConnectionParameter(authBKU); } + + /** + * Build a ConnectionParameter containing all information + * of the foreignid element in the authentication component + * @return ConnectionParameter of the authentication component foreignid element + */ + public ConnectionParameter buildForeignIDConnectionParameter() { + Element foreignid = (Element)XPathUtils.selectSingleNode(configElem_, AUTH_FOREIGN_IDENTITIES_XPATH); + if (foreignid==null) return null; + return buildConnectionParameter(foreignid); + + } /** * Method buildAuthBKUSelectionType. @@ -407,7 +425,7 @@ public class ConfigurationBuilder { { String bkuSelectionTemplateURL = - XPathUtils.getAttributeValue(configElem_, AUTH_BKUSELECT_TEMPLATE_XPATH, null); + XPathUtils.getAttributeValue(configElem_, AUTH_BKUSELECT_TEMPLATE_XPATH, null); String templateURL = XPathUtils.getAttributeValue(configElem_, AUTH_TEMPLATE_XPATH, null); String inputProcessorSignTemplateURL = @@ -425,6 +443,7 @@ public class ConfigurationBuilder { String publicURLPrefix = oAElem.getAttribute("publicURLPrefix"); oap.setPublicURLPrefix(publicURLPrefix); oap.setKeyBoxIdentier(oAElem.getAttribute("keyBoxIdentifier")); + oap.setFriendlyName(oAElem.getAttribute("friendlyName")); // get the type of the online application String oaType = oAElem.getAttribute("type"); @@ -447,12 +466,15 @@ public class ConfigurationBuilder { throw new ConfigurationException("config.02", null); } if ("false".equalsIgnoreCase(oAElem.getAttribute("calculateHPI"))) { - oap.setIdentityLinkDomainIdentifier(buildIdentityLinkDomainIdentifier(identificationNumberChild)); + oap.setIdentityLinkDomainIdentifier(buildIdentityLinkDomainIdentifier(identificationNumberChild)); + //BZ.., setting type of IdLinkDomainIdentifier + oap.setIdentityLinkDomainIdentifierType(identificationNumberChild.getLocalName()); + //..BZ } else { - // If we have business service and want to dealt with GDA, the security layer can be advised to calulate - // the Health Professional Identifier HPI instead of the wbPK + // If we have business service and want to dealt with GDA, the security layer can be advised to calulate + // the Health Professional Identifier HPI instead of the wbPK Logger.info("OA uses HPI for Identification"); - oap.setIdentityLinkDomainIdentifier(Constants.URN_PREFIX_HPI); + oap.setIdentityLinkDomainIdentifier(Constants.URN_PREFIX_HPI); } // if OA type is "businessSErvice" set slVersion to 1.2 and ignore parameter in config file @@ -514,7 +536,7 @@ public class ConfigurationBuilder { protected String buildTemplateURL(Element oaAuthComponent, String xpathExpr, String defaultURL) { String templateURL = XPathUtils.getAttributeValue(oaAuthComponent, xpathExpr, defaultURL); if (templateURL != null) { - templateURL = FileUtils.makeAbsoluteURL(templateURL, rootConfigFileDir_); + templateURL = FileUtils.makeAbsoluteURL(templateURL, rootConfigFileDir_); } return templateURL; } @@ -533,7 +555,7 @@ public class ConfigurationBuilder { XPathUtils.getElementValue(root,CONNECTION_PARAMETER_ACCEPTED_CERTS_XPATH,null)); result.setAcceptedServerCertificates(FileUtils.makeAbsoluteURL( - result.getAcceptedServerCertificates(), rootConfigFileDir_)); + result.getAcceptedServerCertificates(), rootConfigFileDir_)); result.setUrl( XPathUtils.getAttributeValue(root, CONNECTION_PARAMETER_URL_XPATH, "")); @@ -541,10 +563,10 @@ public class ConfigurationBuilder { XPathUtils.getElementValue(root,CONNECTION_PARAMETERN_KEYSTORE_XPATH,null)); result.setClientKeyStore(FileUtils.makeAbsoluteURL( - result.getClientKeyStore(), rootConfigFileDir_)); + result.getClientKeyStore(), rootConfigFileDir_)); result.setClientKeyStorePassword( - XPathUtils.getAttributeValue(root,CONNECTION_PARAMETER_KEYSTORE_PASS_XPATH,"")); + XPathUtils.getAttributeValue(root,CONNECTION_PARAMETER_KEYSTORE_PASS_XPATH,"")); if ((result.getAcceptedServerCertificates()==null) && (result.getUrl()=="") |