Package org.apache.roller.weblogger.ui.rendering

Examples of org.apache.roller.weblogger.ui.rendering.Renderer


    private static Log log = LogFactory.getLog(VelocityRendererFactory.class);
   
   
    public Renderer getRenderer(Template template) {
       
        Renderer renderer = null;
       
        // nothing we can do with null values
        if(template.getTemplateLanguage() == null || template.getId() == null) {
            return null;
        }
View Full Code Here


                // Load weblog custom models
                //ModelLoader.loadCustomModels(weblog, model, initData);
               
               
                // lookup Renderer we are going to use
                Renderer renderer = null;
                Template template = new StaticTemplate("templates/feeds/weblog-"+type+"-"+format+".vm", "velocity");
                renderer = RendererManager.getRenderer(template);
               
               
                // render content.  use default size of about 24K for a standard page
                CachedContent rendererOutput = new CachedContent(24567);
                renderer.render(model, rendererOutput.getCachedWriter());
               
               
                // flush rendered output and close
                rendererOutput.flush();
                rendererOutput.close();
View Full Code Here

*/
public class GroovletRendererFactory implements RendererFactory {
    private static Log log = LogFactory.getLog(GroovletRendererFactory.class);
   
    public Renderer getRenderer(Template template) {       
        Renderer renderer = null;
        if(template.getTemplateLanguage() == null || template.getId() == null) {
            return null;
        }       
        if("groovlet".equals(template.getTemplateLanguage()) && template instanceof WeblogTemplate) {            
            try {
View Full Code Here

public class GSPRendererFactory implements RendererFactory {
    private static Log log = LogFactory.getLog(GroovletRendererFactory.class);
    private TemplateEngine templateEngine = new SimpleTemplateEngine();
   
    public Renderer getRenderer(Template template) {
        Renderer renderer = null;
        if(template.getTemplateLanguage() == null || template.getId() == null) {
            return null;
        }
        if("gsp".equals(template.getTemplateLanguage()) && template instanceof WeblogTemplate) {
            try {
View Full Code Here

            return;
        }


        // lookup Renderer we are going to use
        Renderer renderer = null;
        try {
            log.debug("Looking up renderer");
            Template template = new StaticTemplate("templates/planet/planetrss.vm", "velocity");
            renderer = RendererManager.getRenderer(template);
        } catch (Exception e) {
            // nobody wants to render my content :(
            log.error("Couldn't find renderer for planet rss", e);

            if (!response.isCommitted()) {
                response.reset();
            }
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }

        // render content.  use default size of about 24K for a standard page
        CachedContent rendererOutput = new CachedContent(24567);
        try {
            log.debug("Doing rendering");
            renderer.render(model, rendererOutput.getCachedWriter());

            // flush rendered output and close
            rendererOutput.flush();
            rendererOutput.close();
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.ui.rendering.Renderer

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.