Examples of JCMSVelocityContext


Examples of com.iqbon.jcms.util.JCMSVelocityContext

      throws ResourceNotFoundException, ParseErrorException {
    if (StringUtils.isEmpty(content)) {
      throw new ParseErrorException("输入内容为空");
    }
    StringWriter writer = new StringWriter();
    JCMSVelocityContext context = JCMSVelocityContext.getInstance();
    context.put("tool", tool);
    try {
      Velocity.evaluate(context, writer, "VMMessage", content);
      writer.flush();
      String result = writer.toString();
      writer.close();
View Full Code Here

Examples of com.iqbon.jcms.util.JCMSVelocityContext

      ParseErrorException {
    if (StringUtils.isEmpty(content)) {
      throw new ParseErrorException("输入内容为空");
    }
    StringWriter writer = new StringWriter();
    JCMSVelocityContext context = JCMSVelocityContext.getInstance();
    //插入对象
    context.put("doc", doc);
    context.put("pushRecord", pushRecord);
    context.put("tool", tool);
    if (pushRecord != null && StringUtils.isNotBlank(pushRecord.getTopicid())) {
      Topic topic = topicDao.queryTopicById(pushRecord.getTopicid());
      context.put("topic", topic);
    }

    try {
      Velocity.evaluate(context, writer, "VMMessage", content);
      writer.flush();
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.