Examples of NetuiConfig


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

        }
    };

    public NetUIConfig parse(final XmlInputStreamResolver xmlResolver) {

        NetUIConfig configBean = null;
        InputStream xmlInputStream = null;
        XmlInputStreamResolver theXmlResolver = xmlResolver;
        try {
            /* use the default XmlInputStream */
            if(theXmlResolver == null)
View Full Code Here

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

    }

    private NetUIConfig parse(final String resourcePath, final InputStream is) {
        assert is != null;

        NetUIConfig netuiConfig = null;
        InputStream xsdInputStream = null;
        try {
            /* parse the config document */
            xsdInputStream = SCHEMA_RESOLVER.getInputStream();
            final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
            final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
            final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";

            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setValidating(true);
            dbf.setNamespaceAware(true);
            dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
            dbf.setAttribute(JAXP_SCHEMA_SOURCE, xsdInputStream);

            DocumentBuilder db = dbf.newDocumentBuilder();
            db.setErrorHandler(new ErrorHandler() {
                public void warning(SAXParseException exception) {
                    if(LOGGER.isInfoEnabled())
                        LOGGER.info("Validation warning validating config file \"" + resourcePath +
                            "\" against XML Schema \"" + SCHEMA_RESOLVER.getResourcePath());
                }

                public void error(SAXParseException exception) {
                        throw new ConfigInitializationException("Validation errors occurred parsing the config file \"" +
                            resourcePath + "\".  Cause: " + exception, exception);
                }

                public void fatalError(SAXParseException exception) {
                    throw new ConfigInitializationException("Validation errors occurred parsing the config file \"" +
                        resourcePath + "\".  Cause: " + exception, exception);
                }
            });

            db.setEntityResolver(new EntityResolver() {
                public InputSource resolveEntity(String publicId, String systemId) {
                    if(systemId.endsWith("/beehive-netui-config.xsd")) {
                        InputStream inputStream = NetUIConfigParser.class.getClassLoader().getResourceAsStream(CONFIG_SCHEMA);
                        return new InputSource(inputStream);
                    }
                    else return null;
                }
            });

            Document document = db.parse(is);

            PageFlowActionInterceptorsConfig pfActionInterceptorsConfig = parsePfActionInterceptorsConfig(document);
            PageFlowHandlersConfig pfHandlersConfig = parsePfHandlersConfig(document);
            PageFlowConfig pfConfig = parsePfConfig(document);
            PageFlowFactoriesConfig pfFactoriesConfig = parsePfFactoriesConfig(document);
            SharedFlowRefConfig[] sharedFlowRefConfigs = parseSharedFlowRefConfigs(document);
            RequestInterceptorsConfig requestInterceptorsConfig = parseRequestInterceptorsConfig(document);

            JspTagConfig jspTagConfig = parseJspTagConfig(document);
            ExpressionLanguagesConfig elConfig = parseExpressionLanguageConfig(document);
            TypeConverterConfig[] typeConvertersConfig = parseTypeConvertersConfig(document);
            UrlConfig urlConfig = parseUrlConfig(document);
            IteratorFactoryConfig[] iteratorFactories = parseIteratorFactoryConfig(document);
            PrefixHandlerConfig[] prefixHandlers = parsePrefixHandlerConfig(document);

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

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

        }
    };

    public NetUIConfig parse(final XmlInputStreamResolver xmlResolver) {

        NetUIConfig configBean = null;
        InputStream xmlInputStream = null;
        XmlInputStreamResolver theXmlResolver = xmlResolver;
        try {
            /* use the default XmlInputStream */
            if(theXmlResolver == null)
View Full Code Here

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

    }

    private NetUIConfig parse(final String resourcePath, final InputStream is) {
        assert is != null;

        NetUIConfig netuiConfig = null;
        InputStream xsdInputStream = null;
        try {
            /* parse the config document */
            xsdInputStream = SCHEMA_RESOLVER.getInputStream();
            final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
            final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
            final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";

            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setValidating(true);
            dbf.setNamespaceAware(true);
            dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
            dbf.setAttribute(JAXP_SCHEMA_SOURCE, xsdInputStream);

            DocumentBuilder db = dbf.newDocumentBuilder();
            db.setErrorHandler(new ErrorHandler() {
                public void warning(SAXParseException exception) {
                    if(LOGGER.isInfoEnabled())
                        LOGGER.info("Validation warning validating config file \"" + resourcePath +
                            "\" against XML Schema \"" + SCHEMA_RESOLVER.getResourcePath());
                }

                public void error(SAXParseException exception) {
                        throw new ConfigInitializationException("Validation errors occurred parsing the config file \"" +
                            resourcePath + "\".  Cause: " + exception, exception);
                }

                public void fatalError(SAXParseException exception) {
                    throw new ConfigInitializationException("Validation errors occurred parsing the config file \"" +
                        resourcePath + "\".  Cause: " + exception, exception);
                }
            });

            db.setEntityResolver(new EntityResolver() {
                public InputSource resolveEntity(String publicId, String systemId) {
                    if(systemId.endsWith("/beehive-netui-config.xsd")) {
                        InputStream inputStream = NetUIConfigParser.class.getClassLoader().getResourceAsStream(CONFIG_SCHEMA);
                        return new InputSource(inputStream);
                    }
                    else return null;
                }
            });

            Document document = db.parse(is);

            PageFlowActionInterceptorsConfig pfActionInterceptorsConfig = parsePfActionInterceptorsConfig(document);
            PageFlowHandlersConfig pfHandlersConfig = parsePfHandlersConfig(document);
            PageFlowConfig pfConfig = parsePfConfig(document);
            PageFlowFactoriesConfig pfFactoriesConfig = parsePfFactoriesConfig(document);
            SharedFlowRefConfig[] sharedFlowRefConfigs = parseSharedFlowRefConfigs(document);
            RequestInterceptorsConfig requestInterceptorsConfig = parseRequestInterceptorsConfig(document);

            JspTagConfig jspTagConfig = parseJspTagConfig(document);
            ExpressionLanguagesConfig elConfig = parseExpressionLanguageConfig(document);
            TypeConverterConfig[] typeConvertersConfig = parseTypeConvertersConfig(document);
            UrlConfig urlConfig = parseUrlConfig(document);
            IteratorFactoryConfig[] iteratorFactories = parseIteratorFactoryConfig(document);
            PrefixHandlerConfig[] prefixHandlers = parsePrefixHandlerConfig(document);

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

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

    }

    private static final ExpressionEngineFactory initialize(Map factoryMap) {
        assert factoryMap != null;

        NetUIConfig config = ConfigUtil.getConfig();

        ExpressionLanguagesConfig elConfig = config.getExpressionLanguages();
        assert elConfig != null;

        ExpressionLanguageConfig[] els = elConfig.getExpressionLanguages();
        assert els != null;
       
View Full Code Here

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

        if(map != null)
            loadFactories(map);
    }

    private static final Map readFromConfig() {
        NetUIConfig config = ConfigUtil.getConfig();
        if(config == null)
            return null;

        IteratorFactoryConfig[] iteratorFactories = config.getIteratorFactories();

        if(iteratorFactories != null) {
            LinkedHashMap map = new LinkedHashMap();
            for(int i = 0; i < iteratorFactories.length; i++) {
                map.put(iteratorFactories[i].getName(), iteratorFactories[i].getFactoryClass());
View Full Code Here

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

        _servletContext = servletContext;

        //
        // Load/create Handlers.
        //
        NetUIConfig netuiConfig = ConfigUtil.getConfig();
        PageFlowHandlersConfig handlers = netuiConfig.getPageFlowHandlers();

        DefaultHandler defaultActionForwardHandler = new DefaultActionForwardHandler( servletContext );
        DefaultHandler defaultExceptionsHandler = new DefaultExceptionsHandler( servletContext );
        DefaultHandler defaultForwardRedirectHandler = new DefaultForwardRedirectHandler( servletContext );
        DefaultHandler defaultLoginHandler = new DefaultLoginHandler( servletContext );
View Full Code Here

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

        return map;
    }

    private static final Map/*<String, String>*/ readFromConfig() {
        NetUIConfig config = ConfigUtil.getConfig();
        if(config == null)
            return null;

        TypeConverterConfig[] typeConverters = config.getTypeConverters();

        if(typeConverters != null) {
            LinkedHashMap/*<String, String>*/ map = new LinkedHashMap/*<String, String>*/();
            for(int i = 0; i < typeConverters.length; i++) {
                map.put(typeConverters[i].getType(), typeConverters[i].getConverterClass());
View Full Code Here

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

        _servletContext = servletContext;

        //
        // Load/create Handlers.
        //
        NetUIConfig netuiConfig = ConfigUtil.getConfig();
        PageFlowHandlersConfig handlers = netuiConfig.getPageFlowHandlers();

        DefaultHandler defaultActionForwardHandler = new DefaultActionForwardHandler( servletContext );
        DefaultHandler defaultExceptionsHandler = new DefaultExceptionsHandler( servletContext );
        DefaultHandler defaultForwardRedirectHandler = new DefaultForwardRedirectHandler( servletContext );
        DefaultHandler defaultLoginHandler = new DefaultLoginHandler( servletContext );
View Full Code Here

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

        if(map != null)
            loadFactories(map);
    }

    private static final Map readFromConfig() {
        NetUIConfig config = ConfigUtil.getConfig();
        if(config == null)
            return null;

        IteratorFactoryConfig[] iteratorFactories = config.getIteratorFactories();

        if(iteratorFactories != null) {
            LinkedHashMap map = new LinkedHashMap();
            for(int i = 0; i < iteratorFactories.length; i++) {
                map.put(iteratorFactories[i].getName(), iteratorFactories[i].getFactoryClass());
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.