Package org.apache.beehive.netui.util.config.bean

Examples of org.apache.beehive.netui.util.config.bean.CatalogConfig


        ServletContext ctxt = getServletContext();

        /* Initialize the Command chain and add the ErrorCRI */

        Chain xhrServletCommand = null;
        CatalogConfig catalogConfig = ConfigUtil.getConfig().getCatalogConfig();
        if(catalogConfig != null) {
            /*
            todo: neaten up this initialization process.  because of the separation between
                  parsing and configuration, this is a second step.
                  Need to put this somewhere in the framework, preferably in a single
View Full Code Here


    public CatalogConfig parse(Element catalogElement) {
        return parseCatalog(catalogElement);
    }

    public CatalogConfig parse(final String resourcePath, final InputStream inputStream) {
        CatalogConfig catalogConfig = null;
        InputStream xmlInputStream = null;
        InputStream xsdInputStream = null;
        try {
            xmlInputStream = inputStream;
            xsdInputStream = getClass().getClassLoader().getResourceAsStream(CONFIG_SCHEMA);
View Full Code Here

        return catalogConfig;
    }

    private static CatalogConfig parseCatalog(Element catalogElement) {
        CatalogConfig catalogConfig = null;
        if(catalogElement != null && catalogElement.hasChildNodes()) {
            catalogConfig = new CatalogConfig();
            NodeList nodeList = catalogElement.getChildNodes();
            if(nodeList != null) {
                for(int i = 0; i < nodeList.getLength(); i++) {
                    Node node = nodeList.item(i);
                    if(!(node.getNodeType() == Node.ELEMENT_NODE))
                        continue;

                    if(node.getNodeName().equals("chain")) {
                        Element element = (Element)node;
                        String name = element.getAttribute("name");
                        ChainConfig chainConfig = new ChainConfig();
                        chainConfig.setName(name);

                        NodeList commandList = element.getElementsByTagName("command");
                        if(commandList != null) {
                            for(int j = 0; j < commandList.getLength(); j++) {
                                Element commandElement = (Element)commandList.item(j);
                                CommandConfig commandConfig = parseCommand(commandElement);
                                chainConfig.addCommand(commandConfig);
                            }
                        }
                        catalogConfig.addCommand(chainConfig);
                    }
                    else if(node.getNodeName().equals("command")) {
                        Element element = (Element)node;
                        CommandConfig commandConfig = parseCommand(element);
                        catalogConfig.addCommand(commandConfig);
                    }
                }
            }
        }
View Full Code Here

            UrlConfig urlConfig = parseUrlConfig(document);
            IteratorFactoryConfig[] iteratorFactories = parseIteratorFactoryConfig(document);
            PrefixHandlerConfig[] prefixHandlers = parsePrefixHandlerConfig(document);

            Element catalogElement = DomUtils.getChildElementByName(document.getDocumentElement(), "catalog");
            CatalogConfig catalogConfig = parseCatalogs(catalogElement);

            netuiConfig = new NetUIConfig(
                pfActionInterceptorsConfig,
                pfHandlersConfig,
                pfConfig,
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.util.config.bean.CatalogConfig

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.