public class MobileWatchListHandler extends WatchListHandler {
public static final String KEY_WATCHLIST_DATA = "watchListData";
@Override
public View handleRequest(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model) {
User user = Common.getUser(request);
WatchListDao watchListDao = new WatchListDao();
// 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
}