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

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


            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);
View Full Code Here


                    bindingContextConfig
                );
            }
        }

        return new ExpressionLanguagesConfig(defaultLanguage, elConfigs);
    }
View Full Code Here

            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);
View Full Code Here

                    bindingContextConfig
                );
            }
        }

        return new ExpressionLanguagesConfig(defaultLanguage, elConfigs);
    }
View Full Code Here

    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;
       
        if(els != null) {
            for(int i = 0; i < els.length; i++) {
                String name = els[i].getName();
                String className = els[i].getFactoryClass();

                ExpressionEngineFactory factory = null;
                try {
                    Class type = Class.forName(className);
                    factory = (ExpressionEngineFactory)type.newInstance();
                } catch(ClassNotFoundException cnf) {
                    if(LOGGER.isWarnEnabled())
                        LOGGER.warn("Could not create an ExpressionEngineFactory for type \"" + className +
                            "\" because the implementation class could not be found.");

                    continue;
                } catch(Exception ex) {
                    assert ex instanceof IllegalAccessException || ex instanceof InstantiationException;

                    if(LOGGER.isWarnEnabled())
                        LOGGER.warn("Could not create an ExpressionEngineFactory for type \"" + className +
                            "\" because an error occurred creating the factory.  Cause: " + ex, ex);
                    continue;
                }

                if(factoryMap.containsKey(name))
                    if(LOGGER.isWarnEnabled())
                        LOGGER.warn("Overwriting a previously defined ExpressionEngineFactory named \"" + name +
                            "\" with a new ExpressionEngineFactory of type \"" + className + "\"");
                    else
                        LOGGER.info("Adding an ExpressionEngineFactory named \"" + name + "\" with implementation \"" + className + "\"");

                factoryMap.put(name, factory);
            }
        }

        ExpressionEngineFactory defaultEngineFactory = null;
        String defaultLanguage = elConfig.getDefaultLanguage();
        if(defaultLanguage != null) {
            defaultEngineFactory = (ExpressionEngineFactory)factoryMap.get(defaultLanguage);
            if(defaultEngineFactory != null) {
                if(LOGGER.isInfoEnabled())
                    LOGGER.info("Using a default expression evaluator of type \"" + factoryMap.get(defaultLanguage).getClass().getName() + "\"");
View Full Code Here

            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);
View Full Code Here

                    bindingContextConfig
                );
            }
        }

        return new ExpressionLanguagesConfig(defaultLanguage, elConfigs);
    }
View Full Code Here

    private static 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;
       
        if(els != null) {
            for(int i = 0; i < els.length; i++) {
                String name = els[i].getName();
                String className = els[i].getFactoryClass();

                ExpressionEngineFactory factory = null;
                try {
                    Class type = Class.forName(className);
                    factory = (ExpressionEngineFactory)type.newInstance();
                }
                catch(ClassNotFoundException cnf) {
                    LOGGER.warn("Could not create an ExpressionEngineFactory for type \"" + className +
                        "\" because the implementation class could not be found.");
                    continue;
                }
                catch(Exception ex) {
                    assert ex instanceof IllegalAccessException || ex instanceof InstantiationException;
                    LOGGER.warn("Could not create an ExpressionEngineFactory for type \"" + className +
                        "\" because an error occurred creating the factory.  Cause: " + ex, ex);
                    continue;
                }

                if(factoryMap.containsKey(name))
                    if(LOGGER.isWarnEnabled())
                        LOGGER.warn("Overwriting a previously defined ExpressionEngineFactory named \"" + name +
                            "\" with a new ExpressionEngineFactory of type \"" + className + "\"");
                    else
                        LOGGER.info("Adding an ExpressionEngineFactory named \"" + name + "\" with implementation \"" + className + "\"");

                factoryMap.put(name, factory);
            }
        }

        ExpressionEngineFactory defaultEngineFactory = null;
        String defaultLanguage = elConfig.getDefaultLanguage();

        if(defaultLanguage != null) {
            defaultEngineFactory = (ExpressionEngineFactory)factoryMap.get(defaultLanguage);
            if(defaultEngineFactory != null) {
                LOGGER.info("Using a default expression evaluator of type \"" + factoryMap.get(defaultLanguage).getClass().getName() + "\"");
View Full Code Here

TOP

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

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.