001    package com.khubla.pragmatach.plugin.velocity;
002    
003    import com.khubla.pragmatach.framework.api.PragmatachException;
004    import com.khubla.pragmatach.framework.api.Response;
005    import com.khubla.pragmatach.framework.controller.impl.FormPostBeanBoundController;
006    
007    /**
008     * @author tome
009     */
010    public class VelocityController extends FormPostBeanBoundController {
011       /**
012        * ctor
013        */
014       public VelocityController() {
015       }
016    
017       /**
018        * render
019        */
020       public Response render() throws PragmatachException {
021          try {
022             final String template = getTemplate();
023             return new VelocityResponse(getCacheHeaders(), getTemplateName(), template, getTemplateContext());
024          } catch (final Exception e) {
025             throw new PragmatachException("Exception in render", e);
026          }
027       }
028    }