Package org.jamwiki.model

Examples of org.jamwiki.model.Watchlist.containsTopic()


  private boolean isWatchedTopic() throws JspException {
    HttpServletRequest request = (HttpServletRequest)this.pageContext.getRequest();
    String virtualWiki = WikiUtil.getVirtualWikiFromRequest(request);
    try {
      Watchlist watchlist = ServletUtil.currentWatchlist(request, virtualWiki);
      return (watchlist.containsTopic(this.topic));
    } catch (WikiException e) {
      logger.severe("Failure processing watchlist item " + this.topic, e);
      throw new JspException(e);
    }
  }
View Full Code Here


    String virtualWiki = pageInfo.getVirtualWikiName();
    Watchlist watchlist = ServletUtil.currentWatchlist(request, virtualWiki);
    WikiUser user = ServletUtil.currentWikiUser();
    WikiBase.getDataHandler().writeWatchlistEntry(watchlist, virtualWiki, topicName, user.getUserId());
    String article = WikiUtil.extractTopicLink(topicName);
    if (watchlist.containsTopic(topicName)) {
      // added to watchlist
      next.addObject("message", new WikiMessage("watchlist.caption.added", article));
    } else {
      // removed from watchlist
      next.addObject("message", new WikiMessage("watchlist.caption.removed", article));
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.