Package org.springframework.templating

Examples of org.springframework.templating.LocalStringTemplate


  }

  public void sendInvite(Account from, List<Invitee> to, String invitationBody) {
    StringTemplate textTemplate = textTemplateFactory.getStringTemplate();
    textTemplate.put("account", from);
    StringTemplate bodyTemplate = new LocalStringTemplate(invitationBody);
    for (Invitee invitee : to) {
      bodyTemplate.put("invitee", invitee);
      textTemplate.put("body",  bodyTemplate.render());
      String token = tokenGenerator.generateKey();
      textTemplate.put("acceptUrl", acceptUriTemplate.expand(token));
      send(from, invitee, textTemplate.render(), token);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.templating.LocalStringTemplate

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.