Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.HierarchicalConfiguration.configurationsAt()


                RouteDefinition processorDef = from(getEndpoint(processorName)).routeId(processorName).inOnly()
                // store the logger in properties
                .setProperty(MatcherSplitter.LOGGER_PROPERTY, constant(logger));  

                final List<HierarchicalConfiguration> mailetConfs = processorConf.configurationsAt("mailet");
                // Loop through the mailet configuration, load
                // all of the matcher and mailets, and add
                // them to the processor.
                for (int j = 0; j < mailetConfs.size(); j++) {
                    HierarchicalConfiguration c = mailetConfs.get(j);
View Full Code Here


    @SuppressWarnings("unchecked")
    @Override
    protected void doConfigure(HierarchicalConfiguration config) throws ConfigurationException {
        super.doConfigure(config);
        HierarchicalConfiguration handlerConfiguration = config.configurationAt("handler");
        List<HierarchicalConfiguration> accounts = handlerConfiguration.configurationsAt("administrator_accounts.account");
        for (int i = 0; i < accounts.size(); i++) {
            adminAccounts.put(accounts.get(i).getString("[@login]"), accounts.get(i).getString("[@password]"));
        }
    }
View Full Code Here

                // store the logger in properties
                .setProperty(MatcherSplitter.LOGGER_PROPERTY, constant(logger));  

                // load composite matchers if there are any
                Map<String,MatcherManagement> compositeMatchers = new HashMap<String, MatcherManagement>();
                loadCompositeMatchers(processorName, compositeMatchers, processorConf.configurationsAt("matcher"));
               
               
                final List<HierarchicalConfiguration> mailetConfs = processorConf.configurationsAt("mailet");
               
                // Loop through the mailet configuration, load
View Full Code Here

                // load composite matchers if there are any
                Map<String,MatcherManagement> compositeMatchers = new HashMap<String, MatcherManagement>();
                loadCompositeMatchers(processorName, compositeMatchers, processorConf.configurationsAt("matcher"));
               
               
                final List<HierarchicalConfiguration> mailetConfs = processorConf.configurationsAt("mailet");
               
                // Loop through the mailet configuration, load
                // all of the matcher and mailets, and add
                // them to the processor.
                for (int j = 0; j < mailetConfs.size(); j++) {
View Full Code Here

            } else if (matcherName != null) {
                matcher = matcherLoader.getMatcher(matcherName);
                if (matcher instanceof CompositeMatcher) {
                    CompositeMatcher compMatcher = (CompositeMatcher) matcher;
                   
                    List<MatcherManagement> childMatcher = loadCompositeMatchers(processorName, compMap,c.configurationsAt("matcher"));
                    for (int i = 0 ; i < childMatcher.size(); i++) {
                        compMatcher.add(childMatcher.get(i));
                    }
                }
            } else if (invertedMatcherName != null) {
View Full Code Here

            } else if (invertedMatcherName != null) {
                Matcher m = matcherLoader.getMatcher(invertedMatcherName);
                if (m instanceof CompositeMatcher) {
                    CompositeMatcher compMatcher = (CompositeMatcher) m;
                   
                    List<MatcherManagement> childMatcher = loadCompositeMatchers(processorName, compMap,c.configurationsAt("matcher"));
                    for (int i = 0 ; i < childMatcher.size(); i++) {
                        compMatcher.add(childMatcher.get(i));
                    }
                }
                matcher = new MatcherInverter(m);
View Full Code Here

        if (this.users == null) {
            this.users = new HashMap<String, String>();

            try {
                final HierarchicalConfiguration authenticationConfiguration = configuration.configurationAt("security.authentication.configuration.users");
                final List<HierarchicalConfiguration> userListFromConfiguration = authenticationConfiguration.configurationsAt("user");

                for (HierarchicalConfiguration userFromConfiguration : userListFromConfiguration) {
                    this.users.put(userFromConfiguration.getString("username"), userFromConfiguration.getString("password"));
                }
            } catch (Exception e) {
View Full Code Here

        // Create an Account for every configured account
        for (ConfigurationNode accountsChild : accounts.getRoot().getChildren()) {

            String accountsChildName = accountsChild.getName();

            List<HierarchicalConfiguration> accountsChildConfig = accounts.configurationsAt(accountsChildName);
            HierarchicalConfiguration conf = accountsChildConfig.get(i);

            if ("alllocal".equals(accountsChildName)) {
                // <allLocal> is dynamic, save the parameters for accounts to
                // be created when the task is triggered
View Full Code Here

            HierarchicalConfiguration pConf = (HierarchicalConfiguration) pConfs.next();
            playlist.setName(pConf.getString("name", "Default"));
            playlist.setGroupBy(pConf.getString("groupBy"));
            playlist.setLibraryView(pConf.getBoolean("isLibraryView", false));
           
            Iterator cConfs = pConf.configurationsAt("columns.column").iterator();
            while (cConfs.hasNext()) {
                PlaylistColumn column = new PlaylistColumn();

                HierarchicalConfiguration cConf = (HierarchicalConfiguration) cConfs.next();
                column.setName(cConf.getString("name"));
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.