Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.PropertiesConfiguration.addProperty()


          "cloudservers-uk:cloudfiles-uk"
      }) {
      String[] parts = pair.split(":");

      Configuration config = new PropertiesConfiguration();
      config.addProperty("whirr.provider", parts[0]);

      ClusterSpec spec = ClusterSpec.withTemporaryKeys(config);
      assertThat(spec.getBlobStoreProvider(), is(parts[1]));
    }
  }
View Full Code Here


 
  @Test
  public void testApplySubroleAliases() {
    CompositeConfiguration c = new CompositeConfiguration();
    Configuration config = new PropertiesConfiguration();
    config.addProperty("whirr.instance-templates",
        "1 puppet:somepup::pet+something-else, 1 something-else-only");
    c.addConfiguration(config);   
    InstanceTemplate template = InstanceTemplate.parse(c).get(0);
    Set<String> expected = Sets.newLinkedHashSet(Arrays.asList(new String[]{
        "puppet:somepup::pet", "something-else"}));
View Full Code Here

    public void testMemoryMessageStore()
    {

        PropertiesConfiguration config = new PropertiesConfiguration();

        config.addProperty("store.class", "org.apache.qpid.server.store.MemoryMessageStore");

        runTestWithStore(config);
    }

    public void DISABLE_testDerbyMessageStore()
View Full Code Here

    public void DISABLE_testDerbyMessageStore()
    {
        PropertiesConfiguration config = new PropertiesConfiguration();

        config.addProperty("store.environment-path", "derbyDB_MST");
        config.addProperty("store.class", "org.apache.qpid.server.store.DerbyMessageStore");

        runTestWithStore(config);
    }
View Full Code Here

    public void DISABLE_testDerbyMessageStore()
    {
        PropertiesConfiguration config = new PropertiesConfiguration();

        config.addProperty("store.environment-path", "derbyDB_MST");
        config.addProperty("store.class", "org.apache.qpid.server.store.DerbyMessageStore");

        runTestWithStore(config);
    }

    private void reload(Configuration configuration)
View Full Code Here

    @Override
    public void setUp() throws Exception
    {
        PropertiesConfiguration properties = new PropertiesConfiguration();
        properties.addProperty("plugin-directory", PLUGIN_DIRECTORY);
        properties.addProperty("cache-directory", CACHE_DIRECTORY);
        ServerConfiguration config = new ServerConfiguration(properties);

        // This Test requires an application Registry
        ApplicationRegistry.initialise(new TestApplicationRegistry(config));
View Full Code Here

    @Override
    public void setUp() throws Exception
    {
        PropertiesConfiguration properties = new PropertiesConfiguration();
        properties.addProperty("plugin-directory", PLUGIN_DIRECTORY);
        properties.addProperty("cache-directory", CACHE_DIRECTORY);
        ServerConfiguration config = new ServerConfiguration(properties);

        // This Test requires an application Registry
        ApplicationRegistry.initialise(new TestApplicationRegistry(config));
        _registry = ApplicationRegistry.getInstance();
View Full Code Here

    PropertiesConfiguration pc = new PropertiesConfiguration();
    for(Iterator<String> itr = sub.getKeys(); itr.hasNext();) {
      String key = itr.next();
      Object pval = sub.getProperty(key);
      String spval = pval == null ? "" : pval.toString();
      pc.addProperty(prependToken == null ? key : prependToken + key, spval);
    }
    return pc;
  }

  /**
 
View Full Code Here

    PropertiesConfiguration pc = new PropertiesConfiguration();
    for(Iterator<String> itr = sub.getKeys(); itr.hasNext();) {
      String key = itr.next();
      Object pval = sub.getProperty(key);
      String spval = pval == null ? "" : pval.toString();
      pc.addProperty(prependToken == null ? key : prependToken + key, spval);
    }
    return pc;
  }

  /**
 
View Full Code Here

      Enumeration keys = properties.keys();
      while (keys.hasMoreElements()) {
        Object key = keys.nextElement();
        Object value = properties.get(key);
        if (!ignoredKeys.contains(key)) {
          propertiesConfiguration.addProperty(String.valueOf(key), value);
        }
      }
    } catch (IOException e) {
      System.err.println(String.format("No configuration found for pid:%s.", pid));
      return null;
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.