Package com.iqbon.jcms.util

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


      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

Related Classes of com.iqbon.jcms.util.JCMSVelocityContext

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.