Examples of Watchlist


Examples of com.serotonin.m2m2.watchlist.WatchList

        // Check for a watchlist id parameter. If given, update the user.
        try {
            int watchListId = Integer.parseInt(request.getParameter("watchListId"));

            WatchList watchList = watchListDao.getWatchList(watchListId);
            WatchListCommon.ensureWatchListPermission(user, watchList);
            watchListDao.saveSelectedWatchList(user.getId(), watchList.getId());
        }
        catch (NumberFormatException e) {
            // no op
        }
View Full Code Here

Examples of name.abuchen.portfolio.model.Watchlist

            {
                String name = askWatchlistName(Messages.WatchlistNewLabel);
                if (name == null)
                    return;

                Watchlist watchlist = new Watchlist();
                watchlist.setName(name);
                editor.getClient().getWatchlists().add(watchlist);
                editor.markDirty();

                createWatchlistEntry(section, watchlist);
                sidebar.layout();
View Full Code Here

Examples of net.sourceforge.seriesdownloader.model.WatchList

      ObjectInputStream in = new ObjectInputStream(new FileInputStream(SHOW_FILENAME));
      watchList = (WatchList) in.readObject();
      in.close();
    } catch (Exception e) {
      Main.addStatus("Unable to find shows.", false);
      watchList = new WatchList();
    }
  }
View Full Code Here

Examples of org.jamwiki.model.Watchlist

   */
  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

Examples of org.jamwiki.model.Watchlist

    if (userDetails.hasRole(RoleImpl.ROLE_ANONYMOUS)) {
      throw new WikiException(new WikiMessage("watchlist.error.loginrequired"));
    }
    String topicName = WikiUtil.getTopicFromRequest(request);
    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

Examples of org.jamwiki.model.Watchlist

   *           Thrown if any error occurs during processing.
   */
  public static Watchlist currentWatchlist(HttpServletRequest request, String virtualWiki) throws WikiException {
    // try to get watchlist stored in session
    if (request.getSession(false) != null) {
      Watchlist watchlist = (Watchlist) request.getSession(false).getAttribute(WikiUtil.PARAMETER_WATCHLIST);
      if (watchlist != null) {
        return watchlist;
      }
    }
    // no watchlist in session, retrieve from database
    WikiUserDetails userDetails = ServletUtil.currentUserDetails();
    Watchlist watchlist = new Watchlist();
    if (userDetails.hasRole(RoleImpl.ROLE_ANONYMOUS)) {
      return watchlist;
    }
    WikiUser user = ServletUtil.currentWikiUser();
    try {
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.