Package java.util

Examples of java.util.Properties.keySet()


                    InputStream stream = null;
                    try {
                        stream = new FileInputStream(file);
                        props.load(stream);

                        for (Object key : props.keySet()) {
                            String name = (String) key;

                            if (name.startsWith(PREFIX_PATTERN)) {
                                String id = name.substring(PREFIX_PATTERN.length());
View Full Code Here


                // clear existing mappings
                clear();

                // read mappings from properties
                Iterator iter = props.keySet().iterator();
                while (iter.hasNext()) {
                    String prefix = (String) iter.next();
                    String uri = props.getProperty(prefix);
                    String idx = indexes.getProperty(uri);
                    if (idx != null) {
View Full Code Here

            log("BasicVelocityActionServlet : default " + DEFAULT_PROPS + " not found.", e);
            throw new ServletException(e);
        }

        // apply default propertis to velocitty engine
        for (Iterator iterator = p.keySet().iterator(); iterator.hasNext();) {
            String key = (String) iterator.next();
            velocityEngine.setProperty(key, p.getProperty(key));
        }

        // hook velocity logger up to the servlet logger
View Full Code Here

                try {
                    tmp = File.createTempFile("sling", "props");
                    mavenFileFilter.copyFile(propertiesFile, tmp, true, project, Collections.EMPTY_LIST, true,
                            System.getProperty("file.encoding"), mavenSession);
                    Properties loadedProps = PropertyUtils.loadPropertyFile(tmp, null);
                    for (Object key : loadedProps.keySet()) {
                        props.put((String) key, (String) loadedProps.get(key));
                    }
                } catch (IOException e) {
                    throw new MojoExecutionException("Unable to create filtered properties file", e);
                } catch (MavenFilteringException e) {
View Full Code Here

  }

  public void testSystemProperties()
  {
    Properties sysProps = System.getProperties();
    Set keys = sysProps.keySet();
    for (Iterator iter = keys.iterator(); iter.hasNext();)
    {
      String key = (String) iter.next();
      System.out.println(key + " = " + sysProps.getProperty(key));
    }
View Full Code Here

        project.getOriginalModel().setDependencies(newDependencies);

        Properties currentProperties = project.getOriginalModel().getProperties();

        Set<String> currentKeys = new LinkedHashSet<String>();
        for (Object key : currentProperties.keySet()) {
            currentKeys.add((String) key);
        }

        StringBuffer sortedProperties = new StringBuffer();
View Full Code Here

      p.load(new FileReader(new File(outputDirectory, "storyDurations.props")));
    } catch (IOException e) {
      e.printStackTrace();
    }
    Map<String,Long> durations = new HashMap<String, Long>();
    for ( Object key : p.keySet() ){
      durations.put(toReportPath(key), toMillis(p.get(key)));
    }
    return durations;
  }
View Full Code Here

    public void processSystemProperties() {
        Properties properties = systemProperties();
        embedderMonitor.processingSystemProperties(properties);
        if (!properties.isEmpty()) {
            for (Object key : properties.keySet()) {
                String name = (String) key;
                String value = properties.getProperty(name);
                System.setProperty(name, value);
                embedderMonitor.systemPropertySet(name, value);
            }
View Full Code Here

            p.load(bis);
            config.merge(p);

            Properties unknown = config.getUnknown();
            if (!unknown.isEmpty())
                System.err.println("WARN: unknown keys " + unknown.keySet() + " in "
                    + loc);

            loadDefaults(p);
            requirements = parseRequirements();
        }
View Full Code Here

                InputStream stream = uri.toURL().openStream();
                p.load(stream);
                stream.close();

                // expand variables in defaults
                for (Object k : p.keySet())
                {
                    String key = (String) k;
                    String value = p.getProperty(key);
                    p.setProperty(key, BldUtil.expand(value, bp));
                }
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.