/** * Set the mappings of bean keys to a comma-separated list of method names. * The property key should match the bean key and the property value should match * the list of method names. When searching for method names for a bean, Spring * will check these mappings first. * @param mappings the mappings of bean keys to method names */ public void setMethodMappings(Properties mappings) { this.methodMappings = new HashMap<>(); for (Enumeration<?> en = mappings.keys(); en.hasMoreElements();) { String beanKey = (String) en.nextElement(); String[] methodNames = StringUtils.commaDelimitedListToStringArray(mappings.getProperty(beanKey)); this.methodMappings.put(beanKey, new HashSet<>(Arrays.asList(methodNames))); } }
public void clearCustomParameters() { Enumeration<Object> keys = properties.keys(); while ( keys.hasMoreElements() ) { String key = (String) keys.nextElement(); if ( key.startsWith( STRING_CUSTOM_PARAMETER ) ) { // Clear this one properties.remove( key ); } } }
_call.setUsername(super.cachedUsername); _call.setPortName(super.cachedPortName); java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key));
/** * Set the mappings of bean keys to a comma-separated list of method names. * <p>These method names are <b>ignored</b> when creating the management interface. * <p>The property key must match the bean key and the property value must match * the list of method names. When searching for method names to ignore for a bean, * Spring will check these mappings first. */ public void setIgnoredMethodMappings(Properties mappings) { this.ignoredMethodMappings = new HashMap<>(); for (Enumeration<?> en = mappings.keys(); en.hasMoreElements();) { String beanKey = (String) en.nextElement(); String[] methodNames = StringUtils.commaDelimitedListToStringArray(mappings.getProperty(beanKey)); this.ignoredMethodMappings.put(beanKey, new HashSet<>(Arrays.asList(methodNames))); } }
_call.setUsername(super.cachedUsername); _call.setPortName(super.cachedPortName); java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); for (int i = 0; i < cachedSerFactories.size(); ++i) { java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); javax.xml.namespace.QName qName =
for (Enumeration<Object> e = properties.keys(); e.hasMoreElements();) { appendXMLProperty(doc, conf, (String)e.nextElement()); conf.appendChild(doc.createTextNode("\n"));
/** * Set the mappings of bean keys to a comma-separated list of method names. * <p>These method names are <b>ignored</b> when creating the management interface. * <p>The property key must match the bean key and the property value must match * the list of method names. When searching for method names to ignore for a bean, * Spring will check these mappings first. */ public void setIgnoredMethodMappings(Properties mappings) { this.ignoredMethodMappings = new HashMap<>(); for (Enumeration<?> en = mappings.keys(); en.hasMoreElements();) { String beanKey = (String) en.nextElement(); String[] methodNames = StringUtils.commaDelimitedListToStringArray(mappings.getProperty(beanKey)); this.ignoredMethodMappings.put(beanKey, new HashSet<>(Arrays.asList(methodNames))); } }
_call.setUsername(super.cachedUsername); _call.setPortName(super.cachedPortName); java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); for (int i = 0; i < cachedSerFactories.size(); ++i) { java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); javax.xml.namespace.QName qName =
public static void initialize() { synchronized (ProviderRegistry.class) { if (initialized) return; IPAuthenticationProvider ipp = new IPAuthenticationProvider(); DigestAuthenticationProvider digp = new DigestAuthenticationProvider(); authenticationProviders.put(ipp.getScheme(), ipp); authenticationProviders.put(digp.getScheme(), digp); Enumeration<Object> en = System.getProperties().keys(); while (en.hasMoreElements()) { String k = (String) en.nextElement(); if (k.startsWith("zookeeper.authProvider.")) { String className = System.getProperty(k); try { Class<?> c = ZooKeeperServer.class.getClassLoader() .loadClass(className); AuthenticationProvider ap = (AuthenticationProvider) c.getDeclaredConstructor() .newInstance(); authenticationProviders.put(ap.getScheme(), ap); } catch (Exception e) { LOG.warn("Problems loading " + className,e); } } } initialized = true; } }
/** * Set the mappings of bean keys to a comma-separated list of method names. * The property key should match the bean key and the property value should match * the list of method names. When searching for method names for a bean, Spring * will check these mappings first. * @param mappings the mappings of bean keys to method names */ public void setMethodMappings(Properties mappings) { this.methodMappings = new HashMap<>(); for (Enumeration<?> en = mappings.keys(); en.hasMoreElements();) { String beanKey = (String) en.nextElement(); String[] methodNames = StringUtils.commaDelimitedListToStringArray(mappings.getProperty(beanKey)); this.methodMappings.put(beanKey, new HashSet<>(Arrays.asList(methodNames))); } }
_call.setUsername(super.cachedUsername); _call.setPortName(super.cachedPortName); Enumeration<Object> keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key));
public static void initialize() { synchronized (ProviderRegistry.class) { if (initialized) return; IPAuthenticationProvider ipp = new IPAuthenticationProvider(); DigestAuthenticationProvider digp = new DigestAuthenticationProvider(); authenticationProviders.put(ipp.getScheme(), ipp); authenticationProviders.put(digp.getScheme(), digp); Enumeration<Object> en = System.getProperties().keys(); while (en.hasMoreElements()) { String k = (String) en.nextElement(); if (k.startsWith("zookeeper.authProvider.")) { String className = System.getProperty(k); try { Class<?> c = ZooKeeperServer.class.getClassLoader() .loadClass(className); AuthenticationProvider ap = (AuthenticationProvider) c .getDeclaredConstructor().newInstance(); authenticationProviders.put(ap.getScheme(), ap); } catch (Exception e) { LOG.warn("Problems loading " + className,e); } } } initialized = true; } }
public static Properties interpolateVariables(Properties properties, Map<String, String> variables) { Properties result = new Properties(); Enumeration keys = properties.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); String value = (String) properties.get(key); String interpolatedValue = StrSubstitutor.replace(value, variables, "${env:", "}"); result.setProperty(key, interpolatedValue); } return result; }
_call.setUsername(super.cachedUsername); _call.setPortName(super.cachedPortName); java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); for (int i = 0; i < cachedSerFactories.size(); ++i) { java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); javax.xml.namespace.QName qName =
@DataProvider(name = "provider") public Object[][] createData() throws FileNotFoundException, IOException { Properties p = new Properties(); List<Object> vResult = new ArrayList<>(); p.load(new FileInputStream(new File("c:/t/data.properties"))); for (Enumeration e = p.keys(); e.hasMoreElements(); ) { vResult.add(e.nextElement()); } Object[][] result = new Object[vResult.size()][1]; for (int i = 0; i < result.length; i++) { result[i] = new Object[] { vResult.get(i) }; } return result; }
private void addEnvironment(Properties envProps) { JsonArray containerEnv = new JsonArray(); Enumeration keys = envProps.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); String value = envProps.getProperty(key); if (value == null) { value = ""; } containerEnv.add(key + "=" + value); } createConfig.add("Env", containerEnv); }
_call.setUsername(super.cachedUsername); _call.setPortName(super.cachedPortName); java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); for (int i = 0; i < cachedSerFactories.size(); ++i) { java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); javax.xml.namespace.QName qName =
/** * @return all the extra options that are set to be used for the database URL */ @Override public Map<String, String> getExtraOptions() { Map<String, String> map = new Hashtable<String, String>(); for ( Enumeration<Object> keys = attributes.keys(); keys.hasMoreElements(); ) { String attribute = (String) keys.nextElement(); if ( attribute.startsWith( ATTRIBUTE_PREFIX_EXTRA_OPTION ) ) { String value = attributes.getProperty( attribute, "" ); // Add to the map... map.put( attribute.substring( ATTRIBUTE_PREFIX_EXTRA_OPTION.length() ), value ); } } return map; }
_call.setUsername(super.cachedUsername); _call.setPortName(super.cachedPortName); java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); for (int i = 0; i < cachedSerFactories.size(); ++i) { java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); javax.xml.namespace.QName qName =
/** * The Protocol string is used to pass in other connection * properties. A properties file is a general purpose container * * @param p * */ public void setProtocol( Properties p ) { Enumeration e = p.keys(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); m_ConnectionProtocol.put(key, p.getProperty(key)); } }