Package org.onebusaway.users.client.model

Examples of org.onebusaway.users.client.model.BookmarkBean


        List<BookmarkBean> bookmarks = currentUser.getBookmarks();
        if (index < 0 || index >= bookmarks.size())
          return INPUT;

        BookmarkBean bookmark = bookmarks.get(index);
        _stopIds = bookmark.getStopIds();
        _routeFilter = bookmark.getRouteFilter().getRouteIds();
       
        logUserInteraction("stopIds",_stopIds,"routeIds",_routeFilter);

        return "arrivals-and-departures";
      }
View Full Code Here


    List<String> stopIds = _lastSelectedStopService.getLastSelectedStopsForUser(user.getId());
    bean.setLastSelectedStopIds(stopIds);

    for (Bookmark bookmark : properties.getBookmarks()) {
      BookmarkBean bookmarkBean = new BookmarkBean();
      bookmarkBean.setId(bookmark.getId());
      bookmarkBean.setName(bookmark.getName());
      bookmarkBean.setStopIds(bookmark.getStopIds());
      bookmarkBean.setRouteFilter(getRouteFilterAsBean(bookmark.getRouteFilter()));
      bean.addBookmark(bookmarkBean);
    }

    bean.setMinApiRequestInterval(properties.getMinApiRequestInterval());
   
View Full Code Here

    if (properties.getLastSelectedStopId() != null)
      bean.setLastSelectedStopIds(Arrays.asList(properties.getLastSelectedStopId()));

    int bookmarkIndex = 0;
    for (String stopId : properties.getBookmarkedStopIds()) {
      BookmarkBean bookmark = new BookmarkBean();
      bookmark.setId(bookmarkIndex++);
      bookmark.setStopIds(Arrays.asList(stopId));
      bean.addBookmark(bookmark);
    }

    return bean;
  }
View Full Code Here

      @Action(value = "/where/standard/bookmark"),
      @Action(value = "/where/iphone/bookmark"),
      @Action(value = "/where/text/bookmark")})
  public String execute() {

    BookmarkBean bookmark = getBookmark();
    if (bookmark == null)
      return INPUT;

    /**
     * We need to replace the bookmark ids in the "id" parameter with the stop
     * ids
     */
    _ids = bookmark.getStopIds();
    _model.setStopIds(bookmark.getStopIds());

    RouteFilterBean filter = bookmark.getRouteFilter();
    if (filter != null) {
      super.setRoute(new ArrayList<String>(filter.getRouteIds()));
    }

    setTitle(bookmark.getName());

    return super.execute();
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.users.client.model.BookmarkBean

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.