001    package com.khubla.pragmatach.framework.controller.impl.template;
002    
003    import java.util.Map;
004    
005    import com.khubla.pragmatach.framework.api.PragmatachException;
006    import com.khubla.pragmatach.framework.api.Response;
007    import com.khubla.pragmatach.framework.controller.impl.AbstractController;
008    
009    /**
010     * @author tome
011     */
012    public abstract class SimpleTemplateController extends AbstractController {
013       public Response template(String templateName, Map<String, String> parameters) throws PragmatachException {
014          try {
015             return new SimpleTemplateResponse(getCacheHeaders(), templateName, parameters);
016          } catch (final Exception e) {
017             throw new PragmatachException("Exception in template", e);
018          }
019       }
020    }