Examples of propertyNames()


Examples of java.util.Properties.propertyNames()

    public static Context getInitialContext(JMSAddressPolicyType addrType) throws NamingException {
        Properties env = new Properties();
        populateContextEnvironment(addrType, env);

        if (LOG.isLoggable(Level.FINE)) {
            Enumeration props = env.propertyNames();

            while (props.hasMoreElements()) {
                String name = (String)props.nextElement();
                String value = env.getProperty(name);
                LOG.log(Level.FINE, "Context property: " + name + " | " + value);
View Full Code Here

Examples of java.util.Properties.propertyNames()

         }

        // 2. Read system environment, e.g. java -Dname=joe
        if (scanSystemProperties == true) {
         Properties env = System.getProperties();
         for (Enumeration e = env.propertyNames(); e.hasMoreElements();) {
            String key = (String) e.nextElement();
            String value = System.getProperty(key);
            properties.put(key, value);
            fireChangeEvent(key, null, value);
         }
View Full Code Here

Examples of java.util.Properties.propertyNames()

    Properties props = new Properties();

    addProperties(props, mPrefix, Constants.XBUS_ETC);
    addProperties(props, mPrefix, Constants.XBUS_PLUGIN_ETC);

    for (Enumeration e = props.propertyNames(); e.hasMoreElements();)
    {
      key = (String) e.nextElement();
      value = props.getProperty(key);
      cacheKeys = splitKey(key);
      cache = putCache(cache, cacheKeys, value);
View Full Code Here

Examples of java.util.Properties.propertyNames()

      }
      finally {
        stream.close();
      }

      Enumeration<?> names = prop.propertyNames();
      while (names.hasMoreElements()) {
        String name = names.nextElement().toString();
        URL url = cl.getResource(name);
        if (url == null) {
          logger.warn("{} not found", name);
View Full Code Here

Examples of java.util.Properties.propertyNames()

    Enumeration<URL> schemas = cl.getResources(resource);

    while (schemas.hasMoreElements()) {
      Properties prop = new Properties();
      prop.load(schemas.nextElement().openStream());
      Enumeration<?> names = prop.propertyNames();

      while (names.hasMoreElements()) {
        String name = names.nextElement().toString();

        URL url = cl.getResource(name);
View Full Code Here

Examples of java.util.Properties.propertyNames()

    }

    protected String[] getDefaultExcludedNamespaces(String excludeProps) {
        List<String> result = new ArrayList<String>();
        Properties props = loadProperties(excludeProps);
        java.util.Enumeration nexcludes = props.propertyNames();

        while (nexcludes.hasMoreElements()) {
            result.add(props.getProperty((String)nexcludes.nextElement()));
        }
        return result.toArray(new String[result.size()]);
View Full Code Here

Examples of java.util.Properties.propertyNames()

                        .getPersistenceProviderClassName());
            } else {
                logger.debug("Found a default configuration for the persistence provider {0}", jPersistenceunitInfo
                        .getPersistenceProviderClassName());
                Properties defaultProperties = providerDefaultConf.getProperties();
                Enumeration<?> providerPropertiesEnum = defaultProperties.propertyNames();
                while (providerPropertiesEnum.hasMoreElements()) {
                    String key = (String) providerPropertiesEnum.nextElement();
                    String value = defaultProperties.getProperty(key);
                    // set the value on the provider info
                    if (jPersistenceunitInfo.getProperties().getProperty(key) == null) {
View Full Code Here

Examples of java.util.Properties.propertyNames()

                }
            }

            // Now extract configuration of each persistence provider
            Properties providersProperties = pInfo.getProperties();
            Enumeration<?> providerNames = providersProperties.propertyNames();
            while (providerNames.hasMoreElements()) {
                String providerName = (String) providerNames.nextElement();

                // check if there is an existing provider, else create it
                JPersistenceUnitInfo existingProviderInfo = providersInfo.get(providerName);
View Full Code Here

Examples of java.util.Properties.propertyNames()

                    }
                    JPersistenceUnitInfo providerInfo = providerPersistenceunitInfos[0];

                    // get provider info and set values
                    Properties providerProperties = providerInfo.getProperties();
                    Enumeration<?> providerPropertiesEnum = providerProperties.propertyNames();
                    while (providerPropertiesEnum.hasMoreElements()) {
                        String key = (String) providerPropertiesEnum.nextElement();
                        String value = providerProperties.getProperty(key);
                        // set the value on the provider info
                        existingProviderInfo.getProperties().setProperty(key, value);
View Full Code Here

Examples of java.util.Properties.propertyNames()

  try { props.load(new BufferedInputStream(new FileInputStream(Constants.DOCTYPES_FILE))); }
  catch ( IOException e) { ctRef.cleanUp("Could not open " + Constants.DOCTYPES_FILE + " " + e.getMessage()); }

  //*-- load the types of media from the docTypes properties file
  docTypes = new String[props.size()]; int i = 0; Integer integerZero = new Integer(0);
  for (Enumeration keys = props.propertyNames(); keys.hasMoreElements(); )
  { String key = (String) keys.nextElement(); stats.put(key, integerZero.toString() );
  docTypes[i++] = key; }
  stats.put("duplicates", integerZero.toString() );
  stats.put("indexed earlier", integerZero.toString() );

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.