Package org.apache.roller.planet.ui.rendering

Examples of org.apache.roller.planet.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


            return;
        }


        // lookup Renderer we are going to use
        Renderer renderer = null;
        try {
            log.debug("Looking up renderer");
           
            String templateFile = null;
            if("rss".equals(feedRequest.getFormat())) {
                templateFile = "group-rss.vm";
            } else if("atom".equals(feedRequest.getFormat())) {
                templateFile = "group-atom.vm";
            }
           
            Template template = new StaticTemplate(templateFile, null, "velocity");
            renderer = RendererManager.getRenderer(template);
        } catch(Exception e) {
            // nobody wants to render my content :(

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

        // render content.  use default size of about 24K for a standard page
        try {
            log.debug("Doing rendering");
            renderer.render(model, response.getWriter());
        } catch(Exception e) {
            // bummer, error during rendering
            log.error("Error during rendering for group-atom.vm", e);

            if(!response.isCommitted()) response.reset();
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("opml.vm", null, "velocity");
            renderer = RendererManager.getRenderer(template);
        } catch(Exception e) {
            // nobody wants to render my content :(

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

        // render content.  use default size of about 24K for a standard page
        try {
            log.debug("Doing rendering");
            renderer.render(model, response.getWriter());
        } catch(Exception e) {
            // bummer, error during rendering
            log.error("Error during rendering for opml.vm", e);

            if(!response.isCommitted()) response.reset();
View Full Code Here

            return;
        }


        // lookup Renderer we are going to use
        Renderer renderer = null;
        try {
            log.debug("Looking up renderer");
           
            // what template are we going to render?
            Template template = new StaticTemplate("home.vm", null, "velocity");
           
            // get the Renderer
            renderer = RendererManager.getRenderer(template);
           
        } catch(Exception e) {
            // nobody wants to render my content :(

            if(!response.isCommitted()) response.reset();
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
       
       
        // render content
        try {
            log.debug("Doing rendering");
            renderer.render(model, response.getWriter());
        } catch(Exception e) {
            // bummer, error during rendering
            log.error("Error during rendering", e);

            if(!response.isCommitted()) response.reset();
View Full Code Here

            return;
        }


        // lookup Renderer we are going to use
        Renderer renderer = null;
        try {
            log.debug("Looking up renderer");
           
            // what template are we going to render?
            Template template = null;
            if(group == null) {
                // planet homepage
                template = new StaticTemplate("planet.vm", null, "velocity");
            } else {
                // group homepage
                template = new StaticTemplate("group.vm", null, "velocity");
            }
           
            // get the Renderer
            renderer = RendererManager.getRenderer(template);
           
        } catch(Exception e) {
            // nobody wants to render my content :(

            if(!response.isCommitted()) response.reset();
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }
       
       
        // render content
        try {
            log.debug("Doing rendering");
            renderer.render(model, response.getWriter());
        } catch(Exception e) {
            // bummer, error during rendering
            log.error("Error during rendering", e);

            if(!response.isCommitted()) response.reset();
View Full Code Here

     * can be found then we throw an exception.
     */
    public static Renderer getRenderer(Template template)
            throws RenderingException {
       
        Renderer renderer = null;
       
        // iterate over our renderer factories and see if one of them
        // wants to handle this content
        Iterator factories = rendererFactories.iterator();
        while(factories.hasNext()) {
View Full Code Here

TOP

Related Classes of org.apache.roller.planet.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.