Examples of VelocityTemplateEngine


Examples of com.griddynamics.genesis.notification.template.VelocityTemplateEngine

    }

    public TemplateEngine getTemplateEngine() {
        String templateFolder = getConfig().get(NotificationPluginConfig.templateFolder);
        TemplateEngine templateEngine;
        templateEngine = new VelocityTemplateEngine(templateFolder);
        return templateEngine;
    }
View Full Code Here

Examples of no.kommune.bergen.soa.common.util.VelocityTemplateEngine

  private TemplateEngine getTemplateEngine() {
    System.setProperty( "CONSTRETTO_TAGS", "DEV" );
    ApplicationContext context = new ClassPathXmlApplicationContext( "applicationContext.xml" );
    VelocityEngine velocityEngine = (VelocityEngine)context.getBean( "velocityEngineFactoryBean" );
    VelocityTemplateEngine velocityTemplateEngine = new VelocityTemplateEngine();
    velocityTemplateEngine.setVelocityEngine( velocityEngine );
    return velocityTemplateEngine;
  }
View Full Code Here

Examples of no.kommune.bergen.soa.common.util.VelocityTemplateEngine

    AltinnAuthorization altinnAuthorization = new AltinnAuthorization(authorizationSettings);
    return new AltinnFacade(templateEngine, correspondenceClient, altinnAuthorization, velocityModelFactory);
  }

  private VelocityTemplateEngine createTemplateEngine() {
    VelocityTemplateEngine velocityTemplateEngine = new VelocityTemplateEngine();
    velocityTemplateEngine.setVelocityEngine(velocityEngine);
    return velocityTemplateEngine;
  }
View Full Code Here

Examples of org.apache.struts2.components.template.VelocityTemplateEngine

   
    public void setUp() throws Exception {
        mgr = new TemplateEngineManager();
        mockContainer = new Mock(Container.class);
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("jsp")), new JspTemplateEngine());
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("vm")), new VelocityTemplateEngine());
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("ftl")), new FreemarkerTemplateEngine());
        mockContainer.matchAndReturn("getInstanceNames", C.args(C.eq(TemplateEngine.class)), new HashSet() {{
            add("jsp");
            add("vm");
            add("ftl");
View Full Code Here

Examples of org.apache.struts2.components.template.VelocityTemplateEngine

   
    public void setUp() throws Exception {
        mgr = new TemplateEngineManager();
        mockContainer = new Mock(Container.class);
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("jsp")), new JspTemplateEngine());
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("vm")), new VelocityTemplateEngine());
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("ftl")), new FreemarkerTemplateEngine());
        mockContainer.matchAndReturn("getInstanceNames", C.args(C.eq(TemplateEngine.class)), new HashSet() {{
            add("jsp");
            add("vm");
            add("ftl");
View Full Code Here

Examples of org.apache.struts2.components.template.VelocityTemplateEngine

   
    public void setUp() throws Exception {
        mgr = new TemplateEngineManager();
        mockContainer = new Mock(Container.class);
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("jsp")), new JspTemplateEngine());
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("vm")), new VelocityTemplateEngine());
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(TemplateEngine.class), C.eq("ftl")), new FreemarkerTemplateEngine());
        mockContainer.matchAndReturn("getInstanceNames", C.args(C.eq(TemplateEngine.class)), new HashSet() {{
            add("jsp");
            add("vm");
            add("ftl");
View Full Code Here

Examples of org.springmodules.template.engine.velocity.VelocityTemplateEngine

    private SimpleSmtpServer server;

    protected void setUp() throws Exception {
        ResourceLoader loader = new ClassPathResourceLoader();
        VelocityTemplateEngine engine = new VelocityTemplateEngine(loader);
        engine.afterPropertiesSet();
        BasicTemplateResolver resolver = new BasicTemplateResolver(engine, loader);

        dispatcher = new JavaMailEmailDispatcher();
        dispatcher.setResourceLoader(loader);
        dispatcher.setTemplateResolver(resolver);
View Full Code Here

Examples of org.xulfaces.annotation.processor.VelocityTemplateEngine

        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
   
    VelocityTemplateEngine engine = new VelocityTemplateEngine();
    try {
      String filename = path + "/xulfaces-config.xml";
      log.debug("Output file is " + filename + ".");
      BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(filename));
      log.debug("Output file created.");
      engine.configure();
      engine.prepareRender();
      engine.setContextValue("facesConfig", this.facesConfig);
      engine.renderTemplate(bufferedWriter, "faces-config.vm");
      bufferedWriter.flush();
      bufferedWriter.close();     
    } catch (Exception e1) {
      throw new RuntimeException(e1);
    }
View Full Code Here

Examples of org.xulfaces.annotation.processor.VelocityTemplateEngine

        component.getAttributes().add(attribute)
      }
    }
     
    StringWriter stringWriter = new StringWriter();
    VelocityTemplateEngine engine = new VelocityTemplateEngine();
    try {
      engine.configure();   
      engine.prepareRender();                   
      engine.setContextValue("component",component);
      engine.renderTemplate(stringWriter,"component.vm");
      this.facesConfig.components.put(currentClass.getName(),stringWriter.toString());
    } catch (Exception e1) {
      throw new RuntimeException(e1);
    }         
  }
View Full Code Here

Examples of org.xulfaces.annotation.processor.VelocityTemplateEngine

  }

  private String processRendererAnnotation(RENDERER rendererAnnotation, Class currentClass) {

    StringWriter stringWriter = new StringWriter();
    VelocityTemplateEngine engine = new VelocityTemplateEngine();
    try {
      engine.configure();
      engine.prepareRender();
      engine.setContextValue("family", rendererAnnotation.family());
      engine.setContextValue("type", rendererAnnotation.type());
      engine.setContextValue("classname", currentClass.getName());
      engine.renderTemplate(stringWriter, "renderer.vm");
      String kit = rendererAnnotation.kit();
      RenderKit renderKit = this.facesConfig.getKits().get(kit);
      if (renderKit == null) {
        renderKit = new RenderKit();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.