Package org.apache.velocity.tools.config

Examples of org.apache.velocity.tools.config.FactoryConfiguration


        }

        // this will throw an exception if require is true and there
        // is no tool config at the path.  if require is false, this
        // will return null when there's no tool config at the path
        FactoryConfiguration config = getConfiguration(path, require);
        if (config == null)
        {
            return false;
        }
View Full Code Here


        if (getLog().isTraceEnabled())
        {
            getLog().trace("Searching for configuration at: "+path);
        }

        FactoryConfiguration config = null;
        try
        {
            config = ServletUtils.getConfiguration(path,
                                                   this.servletContext,
                                                   this.deprecationSupportMode);
View Full Code Here

    public void autoConfigure(boolean includeDefaults)
    {
        super.autoConfigure(includeDefaults);

        // check for a configuration in application attributes
        FactoryConfiguration injected = ServletUtils.getConfiguration(servletContext);
        if (injected != null)
        {
            configure(injected);
        }
    }
View Full Code Here

    public static FactoryConfiguration getConfiguration(ServletContext application)
    {
        Object obj = application.getAttribute(CONFIGURATION_KEY);
        if (obj instanceof FactoryConfiguration)
        {
            FactoryConfiguration injected = (FactoryConfiguration)obj;
            // make note of where we found this
            String source = injected.getSource();
            String addnote = " from ServletContext.getAttribute("+CONFIGURATION_KEY+")";
            if (!source.endsWith(addnote))
            {
                injected.setSource(source+addnote);
            }
            return injected;
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.velocity.tools.config.FactoryConfiguration

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.