List of usage examples for java.util Properties keySet
@Override
public Set<Object> keySet()
From source file:org.apache.oozie.service.ShareLibService.java
/** * Load share lib text file. Sharelib mapping files contains list of key=value. where key is the action key and * value is the DFS location of sharelib files. * * @param shareLibMap the share lib jar map * @param symlinkMapping the symlink mapping * @param sharelibFileMapping the sharelib file mapping * @param shareLibKey the share lib key/*from w w w.java 2 s .c o m*/ * @throws IOException Signals that an I/O exception has occurred. * @parm shareLibKey the sharelib key */ private void loadShareLibMetaFile(Map<String, List<Path>> shareLibMap, Map<String, Map<Path, Path>> symlinkMapping, Map<String, Map<Path, Configuration>> shareLibConfigMap, String sharelibFileMapping, String shareLibKey) throws IOException { Path shareFileMappingPath = new Path(sharelibFileMapping); HadoopAccessorService has = Services.get().get(HadoopAccessorService.class); FileSystem filesystem = FileSystem.get(has.createJobConf(shareFileMappingPath.toUri().getAuthority())); Properties prop = new Properties(); prop.load(filesystem.open(new Path(sharelibFileMapping))); for (Object keyObject : prop.keySet()) { String key = (String) keyObject; String mapKey = key.substring(SHARE_LIB_CONF_PREFIX.length() + 1); if (key.toLowerCase().startsWith(SHARE_LIB_CONF_PREFIX) && (shareLibKey == null || shareLibKey.equals(mapKey))) { loadSharelib(shareLibMap, symlinkMapping, shareLibConfigMap, mapKey, ((String) prop.get(key)).split(",")); } } }
From source file:jp.terasoluna.fw.web.struts.action.DBMessageResources.java
/** * ?bZ?[W\?[X`t@C?bZ?[WL?[?bZ?[W/* ww w . ja v a 2s . c om*/ * yA?B * * @param propertyFile ?bZ?[W\?[X`t@C */ protected void propertyInit(String propertyFile) { Properties props = null; Iterator names = null; if (log.isDebugEnabled()) { log.debug("call propertyInit()"); } // ?bZ?[W\?[X`t@C??[h props = PropertyUtil.loadProperties(propertyFile); if (props == null) { log.error("Message resources file \"" + propertyFile + "\" is illegal."); return; } // nbV}bvl?s names = props.keySet().iterator(); while (names.hasNext()) { String key = (String) names.next(); if (log.isDebugEnabled()) { log.debug("Saving property message key [" + key + "]" + "value [" + props.getProperty(key) + "]"); } messages.put(key, props.getProperty(key)); } }
From source file:com.github.jengelman.gradle.plugins.integration.TestFile.java
public Map<String, String> getProperties() { assertIsFile();//from w ww .j a v a2 s . c o m Properties properties = new Properties(); try { FileInputStream inStream = new FileInputStream(this); try { properties.load(inStream); } finally { inStream.close(); } } catch (IOException e) { throw new RuntimeException(e); } Map<String, String> map = new HashMap<String, String>(); for (Object key : properties.keySet()) { map.put(key.toString(), properties.getProperty(key.toString())); } return map; }
From source file:com.sikulix.core.SX.java
public static void dumpSysProps(String filter) { filter = filter == null ? "" : filter; p("*** system properties dump " + filter); Properties sysProps = System.getProperties(); ArrayList<String> keysProp = new ArrayList<String>(); Integer nL = 0;/*from w w w .j a v a 2 s .c o m*/ String entry; for (Object e : sysProps.keySet()) { entry = (String) e; if (entry.length() > nL) { nL = entry.length(); } if (filter.isEmpty() || !filter.isEmpty() && entry.contains(filter)) { keysProp.add(entry); } } Collections.sort(keysProp); String form = "%-" + nL.toString() + "s = %s"; for (Object e : keysProp) { p(form, e, sysProps.get(e)); } p("*** system properties dump end" + filter); }
From source file:org.duracloud.duradmin.spaces.controller.SnapshotController.java
@RequestMapping(value = "/spaces/snapshot", method = RequestMethod.GET) public ModelAndView get(@RequestParam String storeId, @RequestParam String spaceId) { Properties props = new Properties(); try {//from w w w. j a va2s.co m ContentStore store = this.contentStoreManager.getContentStore(storeId); if (store.contentExists(spaceId, Constants.SNAPSHOT_PROPS_FILENAME)) { try (InputStream is = store.getContent(spaceId, Constants.SNAPSHOT_PROPS_FILENAME).getStream()) { props.load(is); } } } catch (Exception e) { log.error(e.getMessage(), e); props.put("error", "Snapshot properties could not be loaded: " + e.getMessage()); } ModelAndView mav = new ModelAndView("jsonView"); for (Object key : props.keySet()) { mav.addObject(key.toString(), props.get(key)); } return mav; }
From source file:com.adaptris.jdbc.connection.FailoverConfig.java
/** * Perform initialisation from some map. * * @param p the map containing the properties. *//* ww w . j a va 2 s.co m*/ private void initialise(Properties p) { setDatabaseDriver(p.getProperty(JDBC_DRIVER, MYSQL_DRIVER)); setAutoCommit(Boolean.valueOf(p.getProperty(JDBC_AUTO_COMMIT, "true"))); setDebugMode(Boolean.valueOf(p.getProperty(JDBC_DEBUG, "false"))); setAlwaysValidateConnection(Boolean.valueOf(p.getProperty(JDBC_ALWAYS_VERIFY, "true"))); if (!isEmpty(p.getProperty(JDBC_USERNAME))) { setUsername(p.getProperty(JDBC_USERNAME)); } if (!isEmpty(p.getProperty(JDBC_PASSWORD))) { setPassword(p.getProperty(JDBC_PASSWORD)); } List<String> connectionUrls = new ArrayList<String>(); for (Iterator i = p.keySet().iterator(); i.hasNext();) { String key = (String) i.next(); if (key.startsWith(JDBC_URL_ROOT)) { connectionUrls.add(p.getProperty(key)); } } // Bug#2555 // for (String key : p.stringPropertyNames()) { // if (key.startsWith(JDBC_URL_ROOT)) { // connectionUrls.add(p.getProperty(key)); // } // } setConnectionUrls(connectionUrls); setTestStatement(p.getProperty(JDBC_TEST_STATEMENT, MYSQL_TEST_STMT)); }
From source file:com.jaspersoft.studio.statistics.UsageManager.java
/** * Send the statistics to the defined server. They are read from the properties filed and converted into a JSON * string. Then this string is sent to the server as a post parameter named data *///from www.jav a2s . c om protected void sendStatistics() { BufferedReader responseReader = null; DataOutputStream postWriter = null; try { if (!STATISTICS_SERVER_URL.trim().isEmpty()) { URL obj = new URL(STATISTICS_SERVER_URL); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); // add request header con.setRequestMethod("POST"); //$NON-NLS-1$ con.setRequestProperty("User-Agent", "Mozilla/5.0"); //$NON-NLS-1$ //$NON-NLS-2$ con.setRequestProperty("Accept-Language", "en-US,en;q=0.5"); //$NON-NLS-1$ //$NON-NLS-2$ // Read and convert the statistics into a JSON string UsagesContainer container = new UsagesContainer(getAppDataFolder().getName()); boolean fileChanged = false; synchronized (UsageManager.this) { Properties prop = getStatisticsContainer(); for (Object key : new ArrayList<Object>(prop.keySet())) { try { String[] id_category = key.toString().split(Pattern.quote(ID_CATEGORY_SEPARATOR)); String value = prop.getProperty(key.toString(), "0"); int usageNumber = Integer.parseInt(value); //$NON-NLS-1$ String version = getVersion(); //Check if the id contains the version if (id_category.length == 3) { version = id_category[2]; } else { //Old structure, remove the old entry and insert the new fixed one //this is a really limit case and should almost never happen prop.remove(key); String fixed_key = id_category[0] + ID_CATEGORY_SEPARATOR + id_category[1] + ID_CATEGORY_SEPARATOR + version; prop.setProperty(fixed_key, value); fileChanged = true; } container.addStat( new UsageStatistic(id_category[0], id_category[1], version, usageNumber)); } catch (Exception ex) { //if a key is invalid remove it ex.printStackTrace(); prop.remove(key); fileChanged = true; } } } if (fileChanged) { //The statistics file was changed, maybe a fix or an invalid property removed //write it corrected on the disk writeStatsToDisk.cancel(); writeStatsToDisk.setPriority(Job.SHORT); writeStatsToDisk.schedule(MINIMUM_WAIT_TIME); } ObjectMapper mapper = new ObjectMapper(); String serializedData = mapper.writeValueAsString(container); // Send post request with the JSON string as the data parameter String urlParameters = "data=" + serializedData; //$NON-NLS-1$ con.setDoOutput(true); postWriter = new DataOutputStream(con.getOutputStream()); postWriter.writeBytes(urlParameters); postWriter.flush(); int responseCode = con.getResponseCode(); responseReader = new BufferedReader(new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = responseReader.readLine()) != null) { response.append(inputLine); } // Update the upload time if (responseCode == 200 && ModelUtils.safeEquals(response.toString(), "ok")) { setInstallationInfo(TIMESTAMP_INFO, String.valueOf(getCurrentTime())); } else { //print result System.out.println("Response error: " + response.toString()); } } } catch (Exception ex) { ex.printStackTrace(); JaspersoftStudioPlugin.getInstance().logError(Messages.UsageManager_errorStatUpload, ex); } finally { FileUtils.closeStream(postWriter); FileUtils.closeStream(responseReader); } }
From source file:org.aon.esolutions.appconfig.web.controller.EnvironmentController.java
@Transactional @RequestMapping(value = "/{environmentName}/import", method = RequestMethod.POST) public void importProperties(@PathVariable String applicationName, @PathVariable String environmentName, @RequestParam(value = "file") MultipartFile multipartFile, @RequestParam(value = "importMode") String importMode) { if (multipartFile.getName().endsWith(".xml") || multipartFile.getOriginalFilename().endsWith(".xml")) { new XmlImporter(applicationRepository, environmentRepository, updateUtility) .importFromXml(multipartFile, importMode); return;// ww w .j ava 2 s . c om } Environment env = updateUtility.getEnvironmentForWrite(applicationName, environmentName); if (env != null) { Properties props = new Properties(); try { props.load(multipartFile.getInputStream()); } catch (IOException e) { logger.error("Error importing properties", e); throw new IllegalArgumentException("Uploaded file does not look like a properties file"); } if ("full".equals(importMode)) { env.clearVariables(); } else if ("newOnly".equals(importMode)) { for (Entry<String, String> entry : env.getVariableEntries()) { props.remove(entry.getKey()); } } for (Object key : props.keySet()) { env.put((String) key, props.getProperty((String) key)); env.getEncryptedVariables().remove((String) key); } updateUtility.saveEnvironment(env); } }
From source file:br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.java
protected ConfigurationOptionSetting[] introspectOptionSettings() { Set<ConfigurationOptionSetting> configOptionSetting = new TreeSet<ConfigurationOptionSetting>( COS_COMPARATOR);/*from w w w . j a v a 2s .c o m*/ Properties properties = new Properties(); if (null != project) { for (Map.Entry<Object, Object> entry : project.getProperties().entrySet()) { if (("" + entry.getKey()).startsWith("beanstalk")) { properties.put(entry.getKey(), entry.getValue()); } } } for (Map.Entry<Object, Object> entry : System.getProperties().entrySet()) { if (("" + entry.getKey()).startsWith("beanstalk")) { properties.put(entry.getKey(), entry.getValue()); } } for (Object o : properties.keySet()) { String k = "" + o; if (k.startsWith("beanstalk.env.aws.")) { String realKey = k.substring("beanstalk.env.".length()); String v = "" + properties.get(k); List<String> elements = new ArrayList<String>(Arrays.asList(realKey.split("\\."))); String namespace = StringUtils.join(elements.subList(0, -1 + elements.size()), ":"); String optionName = elements.get(-1 + elements.size()); getLog().info("importing " + k + " as " + namespace + ":" + optionName + "=" + v); configOptionSetting.add(new ConfigurationOptionSetting().withNamespace(namespace) .withOptionName(optionName).withValue(v)); } else if (COMMON_PARAMETERS.containsKey(k)) { String v = "" + properties.get(k); String namespace = COMMON_PARAMETERS.get(k).getNamespace(); String optionName = COMMON_PARAMETERS.get(k).getOptionName(); getLog().info("Found alias " + k + " for " + namespace + ":" + optionName + "(value=" + v + ")"); configOptionSetting.add(new ConfigurationOptionSetting().withNamespace(namespace) .withOptionName(optionName).withValue(v)); } } return (ConfigurationOptionSetting[]) configOptionSetting .toArray(new ConfigurationOptionSetting[configOptionSetting.size()]); }
From source file:org.apache.ranger.common.PropertiesUtil.java
@Override protected void processProperties(ConfigurableListableBeanFactory beanFactory, Properties props) throws BeansException { // First let's add the system properties Set<Object> keySet = System.getProperties().keySet(); for (Object key : keySet) { String keyStr = key.toString(); propertiesMap.put(keyStr, System.getProperties().getProperty(keyStr).trim()); }// w ww . j a va 2 s. c om // Let's add our properties now keySet = props.keySet(); for (Object key : keySet) { String keyStr = key.toString(); propertiesMap.put(keyStr, props.getProperty(keyStr).trim()); } // update system trust store path with custom trust store. if (propertiesMap != null && propertiesMap.containsKey("ranger.truststore.file")) { if (!StringUtils.isEmpty(propertiesMap.get("ranger.truststore.file"))) { System.setProperty("javax.net.ssl.trustStore", propertiesMap.get("ranger.truststore.file")); System.setProperty("javax.net.ssl.trustStoreType", KeyStore.getDefaultType()); Path trustStoreFile = Paths.get(propertiesMap.get("ranger.truststore.file")); if (!Files.exists(trustStoreFile) || !Files.isReadable(trustStoreFile)) { logger.debug("Could not find or read truststore file '" + propertiesMap.get("ranger.truststore.file") + "'"); } else { if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path")) { String path = propertiesMap.get("ranger.credential.provider.path"); String trustStoreAlias = getProperty("ranger.truststore.alias", "trustStoreAlias"); if (path != null && trustStoreAlias != null) { String trustStorePassword = CredentialReader.getDecryptedString(path.trim(), trustStoreAlias.trim()); if (trustStorePassword != null && !trustStorePassword.trim().isEmpty() && !trustStorePassword.trim().equalsIgnoreCase("none")) { propertiesMap.put("ranger.truststore.password", trustStorePassword); props.put("ranger.truststore.password", trustStorePassword); } else { logger.info( "trustStorePassword password not applied; clear text password shall be applicable"); } } } } } System.setProperty("javax.net.ssl.trustStorePassword", propertiesMap.get("ranger.truststore.password")); } // update system key store path with custom key store. if (propertiesMap != null && propertiesMap.containsKey("ranger.keystore.file")) { if (!StringUtils.isEmpty(propertiesMap.get("ranger.keystore.file"))) { System.setProperty("javax.net.ssl.keyStore", propertiesMap.get("ranger.keystore.file")); System.setProperty("javax.net.ssl.keyStoreType", KeyStore.getDefaultType()); Path keyStoreFile = Paths.get(propertiesMap.get("ranger.keystore.file")); if (!Files.exists(keyStoreFile) || !Files.isReadable(keyStoreFile)) { logger.debug("Could not find or read keystore file '" + propertiesMap.get("ranger.keystore.file") + "'"); } else { if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path")) { String path = propertiesMap.get("ranger.credential.provider.path"); String keyStoreAlias = getProperty("ranger.keystore.alias", "keyStoreAlias"); if (path != null && keyStoreAlias != null) { String keyStorePassword = CredentialReader.getDecryptedString(path.trim(), keyStoreAlias.trim()); if (keyStorePassword != null && !keyStorePassword.trim().isEmpty() && !keyStorePassword.trim().equalsIgnoreCase("none")) { propertiesMap.put("ranger.keystore.password", keyStorePassword); props.put("ranger.keystore.password", keyStorePassword); } else { logger.info( "keyStorePassword password not applied; clear text password shall be applicable"); } } } } } System.setProperty("javax.net.ssl.keyStorePassword", propertiesMap.get("ranger.keystore.password")); } //update unixauth keystore and truststore credentials if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path")) { String path = propertiesMap.get("ranger.credential.provider.path"); if (path != null) { String unixAuthKeyStoreAlias = getProperty("ranger.unixauth.keystore.alias", "unixAuthKeyStoreAlias"); if (unixAuthKeyStoreAlias != null) { String unixAuthKeyStorePass = CredentialReader.getDecryptedString(path.trim(), unixAuthKeyStoreAlias.trim()); if (unixAuthKeyStorePass != null && !unixAuthKeyStorePass.trim().isEmpty() && !unixAuthKeyStorePass.trim().equalsIgnoreCase("none")) { propertiesMap.put("ranger.unixauth.keystore.password", unixAuthKeyStorePass); props.put("ranger.unixauth.keystore.password", unixAuthKeyStorePass); } else { logger.info( "unixauth keystore password not applied; clear text password shall be applicable"); } } // String unixAuthTrustStoreAlias = getProperty("ranger.unixauth.truststore.alias", "unixAuthTrustStoreAlias"); if (unixAuthTrustStoreAlias != null) { String unixAuthTrustStorePass = CredentialReader.getDecryptedString(path.trim(), unixAuthTrustStoreAlias.trim()); if (unixAuthTrustStorePass != null && !unixAuthTrustStorePass.trim().isEmpty() && !unixAuthTrustStorePass.trim().equalsIgnoreCase("none")) { propertiesMap.put("ranger.unixauth.truststore.password", unixAuthTrustStorePass); props.put("ranger.unixauth.truststore.password", unixAuthTrustStorePass); } else { logger.info( "unixauth truststore password not applied; clear text password shall be applicable"); } } } } //update credential from keystore if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path") && propertiesMap.containsKey("ranger.jpa.jdbc.credential.alias")) { String path = propertiesMap.get("ranger.credential.provider.path"); String alias = propertiesMap.get("ranger.jpa.jdbc.credential.alias"); if (path != null && alias != null) { String xaDBPassword = CredentialReader.getDecryptedString(path.trim(), alias.trim()); if (xaDBPassword != null && !xaDBPassword.trim().isEmpty() && !"none".equalsIgnoreCase(xaDBPassword.trim())) { propertiesMap.put("ranger.jpa.jdbc.password", xaDBPassword); props.put("ranger.jpa.jdbc.password", xaDBPassword); } else { logger.info( "Credential keystore password not applied for Ranger DB; clear text password shall be applicable"); } } } if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path") && propertiesMap.containsKey("ranger.jpa.audit.jdbc.credential.alias")) { String path = propertiesMap.get("ranger.credential.provider.path"); String alias = propertiesMap.get("ranger.jpa.audit.jdbc.credential.alias"); if (path != null && alias != null) { String auditDBPassword = CredentialReader.getDecryptedString(path.trim(), alias.trim()); if (auditDBPassword != null && !auditDBPassword.trim().isEmpty() && !"none".equalsIgnoreCase(auditDBPassword.trim())) { propertiesMap.put("ranger.jpa.audit.jdbc.password", auditDBPassword); props.put("ranger.jpa.audit.jdbc.password", auditDBPassword); } else { logger.info( "Credential keystore password not applied for Audit DB; clear text password shall be applicable"); } } } if (propertiesMap != null && propertiesMap.containsKey("ranger.authentication.method")) { String authenticationMethod = propertiesMap.get("ranger.authentication.method"); if (authenticationMethod != null && ("ACTIVE_DIRECTORY".equalsIgnoreCase(authenticationMethod) || "AD".equalsIgnoreCase(authenticationMethod))) { if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path") && propertiesMap.containsKey("ranger.ldap.ad.binddn.credential.alias")) { String path = propertiesMap.get("ranger.credential.provider.path"); String alias = propertiesMap.get("ranger.ldap.ad.binddn.credential.alias"); if (path != null && alias != null) { String bindDNPassword = CredentialReader.getDecryptedString(path.trim(), alias.trim()); if (bindDNPassword != null && !bindDNPassword.trim().isEmpty() && !"none".equalsIgnoreCase(bindDNPassword.trim())) { propertiesMap.put("ranger.ldap.ad.bind.password", bindDNPassword); props.put("ranger.ldap.ad.bind.password", bindDNPassword); } else { logger.info( "Credential keystore password not applied for AD Bind DN; clear text password shall be applicable"); } } } } } if (propertiesMap != null && propertiesMap.containsKey("ranger.authentication.method")) { String authenticationMethod = propertiesMap.get("ranger.authentication.method"); if (authenticationMethod != null && ("LDAP".equalsIgnoreCase(authenticationMethod))) { if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path") && propertiesMap.containsKey("ranger.ldap.binddn.credential.alias")) { String path = propertiesMap.get("ranger.credential.provider.path"); String alias = propertiesMap.get("ranger.ldap.binddn.credential.alias"); if (path != null && alias != null) { String bindDNPassword = CredentialReader.getDecryptedString(path.trim(), alias.trim()); if (bindDNPassword != null && !bindDNPassword.trim().isEmpty() && !"none".equalsIgnoreCase(bindDNPassword.trim())) { propertiesMap.put("ranger.ldap.bind.password", bindDNPassword); props.put("ranger.ldap.bind.password", bindDNPassword); } else { logger.info( "Credential keystore password not applied for LDAP Bind DN; clear text password shall be applicable"); } } } } } if (propertiesMap != null && propertiesMap.containsKey("ranger.audit.source.type")) { String auditStore = propertiesMap.get("ranger.audit.source.type"); if (auditStore != null && ("solr".equalsIgnoreCase(auditStore))) { if (propertiesMap != null && propertiesMap.containsKey("ranger.credential.provider.path") && propertiesMap.containsKey("ranger.solr.audit.credential.alias")) { String path = propertiesMap.get("ranger.credential.provider.path"); String alias = propertiesMap.get("ranger.solr.audit.credential.alias"); if (path != null && alias != null) { String solrAuditPassword = CredentialReader.getDecryptedString(path.trim(), alias.trim()); if (solrAuditPassword != null && !solrAuditPassword.trim().isEmpty() && !"none".equalsIgnoreCase(solrAuditPassword.trim())) { propertiesMap.put("ranger.solr.audit.user.password", solrAuditPassword); props.put("ranger.solr.audit.user.password", solrAuditPassword); } else { logger.info( "Credential keystore password not applied for Solr; clear text password shall be applicable"); } } } } } if (propertiesMap != null) { String sha256PasswordUpdateDisable = "false"; if (propertiesMap.containsKey("ranger.sha256Password.update.disable")) { sha256PasswordUpdateDisable = propertiesMap.get("ranger.sha256Password.update.disable"); if (sha256PasswordUpdateDisable == null || sha256PasswordUpdateDisable.trim().isEmpty() || !"true".equalsIgnoreCase(sha256PasswordUpdateDisable)) { sha256PasswordUpdateDisable = "false"; } } propertiesMap.put("ranger.sha256Password.update.disable", sha256PasswordUpdateDisable); props.put("ranger.sha256Password.update.disable", sha256PasswordUpdateDisable); } if (RangerBizUtil.getDBFlavor() == AppConstants.DB_FLAVOR_MYSQL) { if (propertiesMap != null && propertiesMap.containsKey("ranger.db.ssl.enabled")) { String db_ssl_enabled = propertiesMap.get("ranger.db.ssl.enabled"); if (StringUtils.isEmpty(db_ssl_enabled) || !"true".equalsIgnoreCase(db_ssl_enabled)) { db_ssl_enabled = "false"; } db_ssl_enabled = db_ssl_enabled.toLowerCase(); if ("true".equalsIgnoreCase(db_ssl_enabled)) { String db_ssl_required = propertiesMap.get("ranger.db.ssl.required"); if (StringUtils.isEmpty(db_ssl_required) || !"true".equalsIgnoreCase(db_ssl_required)) { db_ssl_required = "false"; } db_ssl_required = db_ssl_required.toLowerCase(); String db_ssl_verifyServerCertificate = propertiesMap .get("ranger.db.ssl.verifyServerCertificate"); if (StringUtils.isEmpty(db_ssl_verifyServerCertificate) || !"true".equalsIgnoreCase(db_ssl_verifyServerCertificate)) { db_ssl_verifyServerCertificate = "false"; } db_ssl_verifyServerCertificate = db_ssl_verifyServerCertificate.toLowerCase(); propertiesMap.put("ranger.db.ssl.enabled", db_ssl_enabled); props.put("ranger.db.ssl.enabled", db_ssl_enabled); propertiesMap.put("ranger.db.ssl.required", db_ssl_required); props.put("ranger.db.ssl.required", db_ssl_required); propertiesMap.put("ranger.db.ssl.verifyServerCertificate", db_ssl_verifyServerCertificate); props.put("ranger.db.ssl.verifyServerCertificate", db_ssl_verifyServerCertificate); String ranger_jpa_jdbc_url = propertiesMap.get("ranger.jpa.jdbc.url"); if (!StringUtils.isEmpty(ranger_jpa_jdbc_url)) { StringBuffer ranger_jpa_jdbc_url_ssl = new StringBuffer(ranger_jpa_jdbc_url); ranger_jpa_jdbc_url_ssl.append("?useSSL=" + db_ssl_enabled + "&requireSSL=" + db_ssl_required + "&verifyServerCertificate=" + db_ssl_verifyServerCertificate); propertiesMap.put("ranger.jpa.jdbc.url", ranger_jpa_jdbc_url_ssl.toString()); props.put("ranger.jpa.jdbc.url", ranger_jpa_jdbc_url_ssl.toString()); logger.info("ranger.jpa.jdbc.url=" + ranger_jpa_jdbc_url_ssl.toString()); } } } } super.processProperties(beanFactory, props); }