Package java.util

Examples of java.util.Properties.entrySet()


        }

        if (log.isInfoEnabled())
            log.info("System properties follow:");
        Properties sysProps = System.getProperties();
        for (Iterator i = sysProps.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            int idx = 0;
            String val = (String) entry.getValue();
            while (true) {
                if (entry.getKey().equals("java.class.path")) {
View Full Code Here


      provider.setUrl(urlReadHandler.getResult());
    }
    if (propertiesReadHandler != null)
    {
      final Properties p = (Properties) propertiesReadHandler.getObject();
      final Iterator it = p.entrySet().iterator();
      while (it.hasNext())
      {
        final Map.Entry entry = (Map.Entry) it.next();
        provider.setProperty((String) entry.getKey(), (String) entry.getValue());
      }
View Full Code Here

      provider.setUrl(urlReadHandler.getResult());
    }
    if (propertiesReadHandler != null)
    {
      final Properties p = (Properties) propertiesReadHandler.getObject();
      final Iterator it = p.entrySet().iterator();
      while (it.hasNext())
      {
        final Map.Entry entry = (Map.Entry) it.next();
        provider.setProperty((String) entry.getKey(), (String) entry.getValue());
      }
View Full Code Here

        int n = args.length - 1;
        for (int i = 0; i < n - 1; ++i) {
            properties.load(new FileInputStream(args[i]));
        }
       
        for(Map.Entry<Object, Object> entry: properties.entrySet()) {
            MAPPING.put((String)entry.getKey(), (String)entry.getValue());
        }
       
        final Set<String> unused = new HashSet<String>(MAPPING.keySet());
View Full Code Here

            // iterate through the properties and generate method patterns
            this.elementMatcher = new HashMap<Element, List<Attribute>>();
            String subject, elementName;
            Element element;
            Pattern pattern;
            for (final Map.Entry<Object, Object> entry: p.entrySet()) {
                final String k = (String) entry.getKey();
                final String v = (String) entry.getValue();
                final int w = k.indexOf('_');
                if (w < 0) {
                    Log.logSevere("PatternAnalysis", "wrong configuration in " + name + ": separator '_' missing: " + k);
View Full Code Here

        StringBuffer sb = new StringBuffer();

        // Since we don't have access to the XWiki object from Selenium tests and since we don't want to restart XWiki
        // with a different xwiki.cfg file for each test that requires a configuration change, we use the following
        // trick: We create a document and we access the XWiki object with a Velocity script inside that document.
        for (Entry<Object, Object> param : properties.entrySet()) {
            sb.append("$xwiki.xWiki.config.setProperty('").append(param.getKey()).append("', '").append(
                param.getValue()).append("')").append('\n');
        }
        editInWikiEditor("Test", "XWikiConfigurationPageForTest", "xwiki/1.0");
        setFieldValue("content", sb.toString());
View Full Code Here

            p.loadFromXML(new FileInputStream(initFile));
        } catch (final IOException e) {
            Log.logException(e);
            return m;
        }
        for (final Entry<Object, Object> e: p.entrySet()) m.put((String) e.getKey(), new File(dataPath, (String) e.getValue()));
        return m;
    }


    public static Map<String, String> getListFriends(final LoaderDispatcher loader) {
View Full Code Here

        }
        else {
          String strJobChainName = sosString.parseToString(arguments, "scheduler_job_chain");
          schedulerMessages = String.format("<add_order job_chain='%1$s'><params>", strJobChainName);

          for (final Entry element : objSchedulerOrderParameterSet.entrySet()) {
            final Map.Entry<String, String> mapItem = (Map.Entry<String, String>) element;
            String key = mapItem.getKey().toString();
            schedulerMessages += String.format("<param name='%1$s' value='%2$s'/>", key, mapItem.getValue());
          }
          schedulerMessages = schedulerMessages + "</params></add_order>";
View Full Code Here

    final String conMethodName = conClassName + "::LoadProperties ";
    final Properties objProp = new Properties();
    objProp.load(new FileInputStream(pstrPropertiesFileName));
    message(conMethodName + ": PropertyFile red. Name '" + pstrPropertiesFileName + "'.");
    this.Settings();
    for (final Object element : objProp.entrySet()) {
      final Map.Entry mapItem = (Map.Entry) element;
      final String strMapKey = mapItem.getKey().toString();
      if (mapItem.getValue() != null) {
        final String strTemp = mapItem.getValue().toString();
        if (strTemp != null && strTemp.length() > 0 && strTemp.equalsIgnoreCase(".") == false) {
View Full Code Here

                String datastorePropName = nameIter.next();
                String datastoreName = datastorePropName.substring("datanucleus.datastore.".length());
                String filename = nucleusContext.getPersistenceConfiguration().getStringProperty(datastorePropName);
                Properties fileProps = PersistenceUtils.setPropertiesUsingFile(filename);
                Map<String, Object> storeProps = new HashMap<String, Object>();
                Iterator filePropNamesIter = fileProps.entrySet().iterator();
                while (filePropNamesIter.hasNext())
                {
                    Map.Entry entry = (Map.Entry)filePropNamesIter.next();
                    String filePropName = (String)entry.getKey();
                    storeProps.put(filePropName, entry.getValue());
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.