Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationDeclaration


        } catch (Exception e) {
            // Ignore exception, default to false
        }

        try {
            DefaultConfigurationBuilder mailConf
                = new DefaultConfigurationBuilder();
            mailConf.addProperty("[@destinationURL]", repositoryPath);
            mailConf.addProperty("[@type]", "MAIL");
            mailConf.addProperty("[@CACHEKEYS]", getInitParameter("CACHEKEYS","TRUE"));
            repository = (MailRepository) mailStore.select(mailConf);
        } catch (Exception e) {
            log("Failed to retrieve Store component:" + e.getMessage());
        }
View Full Code Here


import junit.framework.TestCase;

public class XMLDomainListTest extends TestCase {
   
    private HierarchicalConfiguration setUpConfiguration(boolean auto,boolean autoIP, List<String> names) {
        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;
    }
View Full Code Here

            throw e;
        }
    }

    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 final JDBCUtil theJDBCUtil = new JDBCUtil() {
        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;
    }
View Full Code Here

        JDBCDomainList dom = new JDBCDomainList();
        dom.setDNSService(setUpDNSServer("localhost"));
        dom.setFileSystem(new MockFileSystem());
        dom.setDataSource(data);
        dom.setLog(new SimpleLog("MockLog"));
        dom.configure(new DefaultConfigurationBuilder());
        try {
            dom.init();
        } catch (ConfigurationException e) {
            exception = true;
        }
View Full Code Here

     */
    protected AbstractVirtualUserTable getVirtualUserTable() throws Exception {
        JPAVirtualUserTable virtualUserTable = new JPAVirtualUserTable();
        virtualUserTable.setLog(new SimpleLog("MockLog"));
        virtualUserTable.setEntityManagerFactory(factory);
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        virtualUserTable.configure(defaultConfiguration);
        return virtualUserTable;
    }   
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

     * @throws Exception
     */
    protected UsersRepository getUsersRepository() throws Exception {
        MockUsersRepository repos = new MockUsersRepository();
        repos.setLog(new SimpleLog("MockLog"));
        repos.configure(new DefaultConfigurationBuilder());
        return repos;
    }
View Full Code Here

    private RepositoryImpl repository;
       
    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

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

        mr.setLog(new SimpleLog("MockLog"));
        DefaultConfigurationBuilder defaultConfiguration = new DefaultConfigurationBuilder();
        defaultConfiguration.addProperty( "[@destinationURL]","file://target/var/mr");
        defaultConfiguration.addProperty( "[@type]","MAIL");
        mr.configure(defaultConfiguration);
        mr.init();
        return mr;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationDeclaration

Copyright © 2018 www.massapicom. 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.