Examples of VelocityTemplateProcessor


Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

  private String generateEmailBodyForDeleteNotification(String template, Map<String, Object> parameters) throws Exception
  {
    StringWriter tempString = new StringWriter();
    PrintWriter pw = new PrintWriter(tempString);
    new VelocityTemplateProcessor().renderTemplate(parameters, pw, template, true);
    String email = tempString.toString();
    return email;
  }
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

      parameters.put("principalLanguageCode", languageCode);
     
      StringWriter tempString = new StringWriter();
      PrintWriter pw = new PrintWriter(tempString);
      logger.info("this.WYSIWYGProperties:" + this.WYSIWYGProperties);
      VelocityTemplateProcessor vtp = new VelocityTemplateProcessor();
      vtp.renderTemplate(parameters, pw, this.WYSIWYGProperties, true);
      this.WYSIWYGProperties = tempString.toString();
       
        this.getResponse().setContentType("text/javascript");
      }
      catch (Throwable t1)
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

      try
      {
        Map context = getDefaultContext();
        StringWriter cacheString = new StringWriter();
        PrintWriter cachedStream = new PrintWriter(cacheString);
        new VelocityTemplateProcessor().renderTemplate(context, cachedStream, pageContent, false, baseComponent);
     
        pageString = cacheString.toString();
      }
      catch (Exception e)
      {
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

          context.put("templateLogic", templateController);
          context.put("model", component.getModel());
          StringWriter cacheString = new StringWriter();
        PrintWriter cachedStream = new PrintWriter(cacheString);
        //Timer t = new Timer();
        new VelocityTemplateProcessor().renderTemplate(context, cachedStream, componentString, false, component);
        //t.printElapsedTime("Rendering of " + component.getName() + " took ");
        componentString = cacheString.toString();

        if(logger.isDebugEnabled())
          logger.debug("componentString:" + componentString);
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

          context.put("templateLogic", templateController);
          context.put("model", component.getModel());
          StringWriter cacheString = new StringWriter();
        PrintWriter cachedStream = new PrintWriter(cacheString);
        //Timer t = new Timer();
        new VelocityTemplateProcessor().renderTemplate(context, cachedStream, componentString, false, component, " - PreTemplate");
        //t.printElapsedTime("Rendering of " + component.getName() + " took ");
        componentString = cacheString.toString();
       
        if(logger.isDebugEnabled())
          logger.debug("componentString:" + componentString);
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

  {
    parameters.put("templateLogic", getTemplateController(databaseWrapper, siteNodeId, languageId, contentId, request, infogluePrincipal));
   
    StringWriter tempString = new StringWriter();
    PrintWriter pw = new PrintWriter(tempString);
    new VelocityTemplateProcessor().renderTemplate(parameters, pw, template);
    return tempString.toString();
  }
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

      context.put("currentUrl", URLEncoder.encode(this.getTemplateController().getOriginalFullURL(), "UTF-8"));
      context.put("contextName", this.getRequest().getContextPath());
      this.getTemplateController().getDeliveryContext().setUseFullUrl(oldUseFullUrl);
      StringWriter cacheString = new StringWriter();
      PrintWriter cachedStream = new PrintWriter(cacheString);
      new VelocityTemplateProcessor().renderTemplate(context, cachedStream, decoratePageTemplate, false, baseComponent);
      decoratePageTemplate = cacheString.toString();
    }

    //TODO - TEST
    //decoratePageTemplate += propertiesDivs + tasksDivs;
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

      Map context = super.getDefaultContext();
      context.put("templateLogic", templateController);
      context.put("model", component.getModel());
      StringWriter cacheString = new StringWriter();
      PrintWriter cachedStream = new PrintWriter(cacheString);
      new VelocityTemplateProcessor().renderTemplate(context, cachedStream, componentString, false, component);
      componentString = cacheString.toString();
 
      int bodyIndex = componentString.indexOf("<body");
      if(bodyIndex == -1)
        bodyIndex = componentString.indexOf("<BODY");
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

          context.put("currentUrl", URLEncoder.encode(this.getTemplateController().getOriginalFullURL(), "UTF-8"));
          context.put("contextName", this.getRequest().getContextPath());
          this.getTemplateController().getDeliveryContext().setUseFullUrl(oldUseFullUrl);
          StringWriter cacheString = new StringWriter();
          PrintWriter cachedStream = new PrintWriter(cacheString);
          new VelocityTemplateProcessor().renderTemplate(context, cachedStream, decoratePageTemplate, false, baseComponent);
          decoratePageTemplate = cacheString.toString();
        }

        //TODO - TEST
        //decoratePageTemplate += propertiesDivs + tasksDivs; 
View Full Code Here

Examples of org.infoglue.deliver.util.VelocityTemplateProcessor

      Map context = super.getDefaultContext();
      context.put("templateLogic", templateController);
      context.put("model", component.getModel());
      StringWriter cacheString = new StringWriter();
      PrintWriter cachedStream = new PrintWriter(cacheString);
      new VelocityTemplateProcessor().renderTemplate(context, cachedStream, componentString, false, component);
      componentString = cacheString.toString();
 
      int bodyIndex = componentString.indexOf("<body");
      if(bodyIndex == -1)
        bodyIndex = componentString.indexOf("<BODY");
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.