Package java.util

Examples of java.util.Properties.stringPropertyNames()


            parameters.put(SessionParameter.COMPRESSION, "true");
        }

        // get additional workbench properties from system properties
        Properties sysProps = System.getProperties();
        for (String key : sysProps.stringPropertyNames()) {
            if (key.startsWith(WORKBENCH_PREFIX)) {
                parameters.put(key, sysProps.getProperty(key));
            }
        }
View Full Code Here


            Properties properties = new Properties();
            properties.load(stream);
            stream.close();

            List<FileEntry> result = new ArrayList<FileEntry>();
            for (String file : properties.stringPropertyNames()) {
                result.add(new FileEntry(properties.getProperty(file), path + file));
            }
            Collections.sort(result);

            return result;
View Full Code Here

      BufferedReader r = null;
      try {
        r = new BufferedReader(new FileReader(f));
        Properties props = new Properties();
        props.load(r);
        for (String key : props.stringPropertyNames()) {
          classIndexMap.put(Integer.parseInt(key),
              props.getProperty(key));
        }
      } finally {
        try {
View Full Code Here

      }
      argMap.put(arg, argValues.toArray(new String[argValues.size()]));
    }

    // Add properties from the .props file that are not overridden on the command line
    for (String key : mainProps.stringPropertyNames()) {
      String[] argNamePair = key.split("\\|");
      String shortArg = '-' + argNamePair[0].trim();
      String longArg = argNamePair.length < 2 ? null : "--" + argNamePair[1].trim();
      if (!argMap.containsKey(shortArg) && (longArg == null || !argMap.containsKey(longArg))) {
        argMap.put(longArg, new String[] {mainProps.getProperty(key)});
View Full Code Here

            {
                fileInputStream.close();
            }
        }

        for (String propertyName : propertiesFile.stringPropertyNames())
        {
            validatePropertyNameIsGroupName(propertyName);

            String groupName = propertyName.replaceAll("\\.users$", "");
            String userString = propertiesFile.getProperty(propertyName);
View Full Code Here

                    urlComponents.subList(1, urlComponents.size()));

            // Put each expected connection attribute in a HashSet.
            HashSet<String> expectedAttrs = new HashSet<String>();
            Properties ca = config.getConnectionAttributes();
            for (String key : ca.stringPropertyNames()) {
                expectedAttrs.add(key + '=' + ca.getProperty(key));
            }

            // Verify that the actual connection attributes match the
            // expected attributes. Order is irrelevant.
View Full Code Here

        props.load(new FileInputStream(initparmsfile));
      } catch (IOException ex) {
        throw new ResourceInstantiationException(
          "Could not read propertiles from file "+initParmsFileURL,ex);
      }
      for (String prop : props.stringPropertyNames()) {
        String val = props.getProperty(prop);
        System.out.println("Setting parameter "+prop+"="+val);
        // TODO: we could make this dynamically adjust to our parameters by inspection
        if(prop.equals("connectionURL")) {
            setConnectionURL(val);
View Full Code Here

        substitutableTokens.put(SERVER_NAME,  domainConfig.get(DomainConfig.K_HOST_NAME).toString());
        substitutableTokens.put(ORB_LISTENER1_PORT,  domainConfig.get(DomainConfig.K_ORB_LISTENER_PORT).toString());
        String domainLocation =  new File(domainConfig.getRepositoryRoot(), domainConfig.getRepositoryName()).getAbsolutePath();
        substitutableTokens.put(DOMAIN_DIR, domainLocation);

        for (String pname : domainProperties.stringPropertyNames()) {
            if (!substitutableTokens.containsKey(pname)) {
                substitutableTokens.put(pname, domainProperties.getProperty(pname));
            }
        }
        return substitutableTokens;
View Full Code Here

            {
                fileInputStream.close();
            }
        }

        for (String propertyName : propertiesFile.stringPropertyNames())
        {
            validatePropertyNameIsGroupName(propertyName);

            String groupName = propertyName.replaceAll("\\.users$", "");
            String userString = propertiesFile.getProperty(propertyName);
View Full Code Here

        log.infof("JBoss AS %s \"%s\" starting", Version.AS_VERSION, Version.AS_RELEASE_CODENAME);
        if (configLog.isDebugEnabled()) {
            final Properties properties = System.getProperties();
            final StringBuilder b = new StringBuilder(8192);
            b.append("Configured system properties:");
            for (String property : new TreeSet<String>(properties.stringPropertyNames())) {
                b.append("\n\t").append(property).append(" = ").append(properties.getProperty(property, "<undefined>"));
            }
            configLog.debug(b);
            if (configLog.isTraceEnabled()) {
                b.setLength(0);
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.