Package java.util

Examples of java.util.Properties.containsKey()


        boolean omitSet = options.containsKey("__omit_set__");
        boolean multiple = getBundleIds().size() > 1;

        if (multiple || omitSet)
        {
            if (!options.containsKey(BldAttr.OPTION_OMIT_IMPORTS) || omitSet)
            {
                c.setProp(null, BldConfig.P_OPTION, BldAttr.OPTION_OMIT_IMPORTS, multiple
                    + "");
                c.setProp(null, BldConfig.P_OPTION, "__omit_set__", "true");
            }
View Full Code Here


                    }
                    else
                    {
                        for (Object k : props.keySet())
                        {
                            if (!p2.containsKey(k))
                            {
                                p2.put(k, props.get(k));
                            }
                        }
                    }
View Full Code Here

        Properties properties = analyzer.getProperties();
        String exported = properties.getProperty( Analyzer.EXPORT_PACKAGE );
        if ( exported == null )
        {
            if ( !properties.containsKey( Analyzer.EXPORT_CONTENTS ) )
            {
                // no -exportcontents overriding the exports, so use our computed list
                for ( Attrs attrs : exportedPkgs.values() )
                {
                    attrs.put( Constants.SPLIT_PACKAGE_DIRECTIVE, "merge-first" );
View Full Code Here

    {
        Properties props = null;
        for(IRepositoryConfig c : getConfigs()) {
            props = c.getRepositoryConfig(name);
            if ( props != null ) {
                if ( !props.containsKey(RepositoryModel.NAME)) {
                    props.setProperty(RepositoryModel.NAME, name);
                }
                break;
            }
        }
View Full Code Here

        for(String required: requireds) {
            // Allow system properties to override
            if(System.getProperties().containsKey(required))
                properties.put(required, System.getProperty(required));

            if(!properties.containsKey(required))
                throw new VoldemortException("Required properties: "
                                             + StringUtils.join(requireds, ", ") + "; missing "
                                             + required);
        }
View Full Code Here

        String line = "";

        List<String> authors = new ArrayList<String>();
        while ((line = b.readLine()) != null) {
            String author = line;
            if (authorMap.containsKey(author)) {
                author = authorMap.getProperty(author);
            }
            if (author != null && !author.equals("")
                    && !authors.contains(author)) {
                authors.add(author);
View Full Code Here

          props.load(resourceAsStream);
      } finally {
        if (resourceAsStream != null)
          resourceAsStream.close();
      }
      if (props.containsKey(VERSION_KEY))
        version = props.getProperty(VERSION_KEY);
    } catch (IOException e) {
      logger.warn("Can not load config.properties", e);
    }
  }
View Full Code Here

    Properties jdbcProperties = new Properties();
    if (jdbcConfig.extraProperties != null) {
      jdbcProperties.putAll(jdbcConfig.extraProperties);
    }

    if (jdbcProperties.containsKey("ssl.keys")) {
      String trustKeys = (String) jdbcProperties.remove("ssl.keys");

      // http://jdbc.postgresql.org/documentation/80/ssl-factory.html
      jdbcProperties.put("sslfactory", TrustedKeysSSLSocketFactory.class.getName());
      jdbcProperties.put("sslfactoryarg", trustKeys);
View Full Code Here

    int count(String event, List<Report> reports) {
        int count = 0;
        for (Report report : reports) {
            Properties stats = report.asProperties("stats");
            if (stats.containsKey(event)) {
                count = count + Integer.parseInt((String) stats.get(event));
            }
        }
        return count;
    }
View Full Code Here

            // ---------------------
            if (connection == null && j != null) {
                Class<? extends Driver> driver = (Class<? extends Driver>) loadClass(driverClass(j));

                Properties properties = properties(j.getProperties());
                if (!properties.containsKey("user"))
                    properties.put("user", defaultString(j.getUser()));
                if (!properties.containsKey("password"))
                    properties.put("password", defaultString(j.getPassword()));

                connection = driver.newInstance().connect(defaultString(j.getUrl()), properties);
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.