Package org.apache.commons.configuration

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


        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();

        configuration.addProperty("autodetect", auto);
        configuration.addProperty("autodetectIP", autoIP);
        for (int i= 0; i< names.size(); i++) {
            configuration.addProperty("domainnames.domainname", names.get(i).toString());
        }
        return configuration;
    }
   
    private DNSService setUpDNSServer(final String hostName) {
View Full Code Here


    private Object selectRepository(MailStore store, String type) throws Exception {
        DefaultConfigurationBuilder objectConfiguration
            = new DefaultConfigurationBuilder();

        objectConfiguration.addProperty("[@destinationURL]", destination);
        objectConfiguration.addProperty("[@type]", type);
        objectConfiguration.addProperty("[@model]", "SYNCHRONOUS");
        return store.select(objectConfiguration);
    }
View Full Code Here

    private Object selectRepository(MailStore store, String type) throws Exception {
        DefaultConfigurationBuilder objectConfiguration
            = new DefaultConfigurationBuilder();

        objectConfiguration.addProperty("[@destinationURL]", destination);
        objectConfiguration.addProperty("[@type]", type);
        objectConfiguration.addProperty("[@model]", "SYNCHRONOUS");
        return store.select(objectConfiguration);
    }

    /**
 
View Full Code Here

        DefaultConfigurationBuilder objectConfiguration
            = new DefaultConfigurationBuilder();

        objectConfiguration.addProperty("[@destinationURL]", destination);
        objectConfiguration.addProperty("[@type]", type);
        objectConfiguration.addProperty("[@model]", "SYNCHRONOUS");
        return store.select(objectConfiguration);
    }

    /**
     * @see org.apache.james.mailrepository.lib.AbstractMailRepository#internalStore(Mail)
View Full Code Here

        protected void delegatedLog(String logString) {}
    };
   
    private HierarchicalConfiguration setUpConfiguration(String url) {
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("repositoryPath", url);
        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        return configuration;
    }
   
    private DNSService setUpDNSServer(final String hostName) {
View Full Code Here

    };
   
    private HierarchicalConfiguration setUpConfiguration(String url) {
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("repositoryPath", url);
        configuration.addProperty("sqlFile", "file://conf/sqlResources.xml");
        return configuration;
    }
   
    private DNSService setUpDNSServer(final String hostName) {
        DNSService dns = new MockDNSService() {
View Full Code Here

    }

    private void checkTestMailet(String mailetName) throws MessagingException {
        // use standard package
        DefaultConfigurationBuilder configuration = new DefaultConfigurationBuilder();
        configuration.addProperty("testMailetKey", "testMailetValue");

        Mailet mailet = m_jamesMailetLoader.getMailet(mailetName, configuration);
        assertTrue("MailetLoaderTestMailet mailet is expected class", mailet instanceof MailetLoaderTestMailet);
        MailetLoaderTestMailet mailetLoaderTestMailet = ((MailetLoaderTestMailet) mailet);
        assertTrue("init was called by loader", mailetLoaderTestMailet.assertInitCalled());
View Full Code Here

       
    protected UsersRepository getUsersRepository() throws Exception {
        JCRUsersRepository repos = new JCRUsersRepository();
        repos.setRepository(repository);
        DefaultConfigurationBuilder config = new DefaultConfigurationBuilder();
        config.addProperty("username", "admin");
        config.addProperty("password", "test");
        repos.configure(config);
        repos.setLog(new SimpleLog("MockLog"));
        return repos;
    }
View Full Code Here

    protected UsersRepository getUsersRepository() throws Exception {
        JCRUsersRepository repos = new JCRUsersRepository();
        repos.setRepository(repository);
        DefaultConfigurationBuilder config = new DefaultConfigurationBuilder();
        config.addProperty("username", "admin");
        config.addProperty("password", "test");
        repos.configure(config);
        repos.setLog(new SimpleLog("MockLog"));
        return repos;
    }
View Full Code Here

        FilePersistentStreamRepository file_Persistent_Stream_Repository = new FilePersistentStreamRepository();
        file_Persistent_Stream_Repository.setFileSystem(fs);
        file_Persistent_Stream_Repository.setLog(new SimpleLog("MockLog"));
       
        DefaultConfigurationBuilder defaultConfiguration2 = new DefaultConfigurationBuilder();
        defaultConfiguration2.addProperty( "[@destinationURL]", "file://target/var/mr");
        file_Persistent_Stream_Repository.configure(defaultConfiguration2);
        file_Persistent_Stream_Repository.init();
       
        mockStore.add("STREAM.mr", file_Persistent_Stream_Repository);
        FilePersistentObjectRepository file_Persistent_Object_Repository = new FilePersistentObjectRepository();
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.