Package org.springframework.templating

Examples of org.springframework.templating.StringTemplate.render()


    StringTemplate textTemplate;
    mailMessage.setSubject("Reset your Greenhouse password");
    textTemplate = resetTemplateFactory.getStringTemplate();
    textTemplate.put("firstName", request.getAccount().getFirstName());   
    textTemplate.put("resetUrl", resetUriTemplate.expand(request.getToken()));
    mailMessage.setText(textTemplate.render());
    return mailMessage;
  }
}
View Full Code Here


    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

  // internal helpers
 
  private String renderStandardInvitationText(Account account) {
    StringTemplate template = inviteTemplateFactory.getStringTemplate();
    template.put("account", account);
    return template.render();
  }

}
View Full Code Here

    mailMessage.setSubject("Welcome to the Greenhouse!");
    StringTemplate textTemplate;
    textTemplate = welcomeTemplateFactory.getStringTemplate();
    textTemplate.put("firstName", account.getFirstName());
    textTemplate.put("profileUrl", account.getProfileUrl());
    mailMessage.setText(textTemplate.render());
    return mailMessage;
  }

}
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.