示例#1
0
 private void loadDiff(
     HttpServletRequest request,
     ModelAndView next,
     WikiPageInfo pageInfo,
     String contents1,
     String contents2)
     throws Exception {
   List<WikiDiff> diffs = DiffUtil.diff(contents1, contents2);
   next.addObject("diffs", diffs);
 }
示例#2
0
 private void resolve(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo)
     throws Exception {
   String topicName = JAMWikiServlet.getTopicFromRequest(request);
   String virtualWiki = JAMWikiServlet.getVirtualWikiFromURI(request);
   TopicVersion version = WikiBase.getHandler().lookupLastTopicVersion(virtualWiki, topicName);
   String contents1 = version.getVersionContent();
   String contents2 = request.getParameter("contents");
   next.addObject("lastTopicVersionId", new Integer(version.getTopicVersionId()));
   next.addObject("contents", contents1);
   next.addObject("contentsResolve", contents2);
   Vector diffs = DiffUtil.diff(contents1, contents2);
   next.addObject("diffs", diffs);
   loadEdit(request, next, pageInfo, virtualWiki, topicName, false);
   pageInfo.setAction(WikiPageInfo.ACTION_EDIT_RESOLVE);
 }