Package com.tubeonfire.search

Examples of com.tubeonfire.search.TubeSearchModel


      try {
        page = Integer.parseInt((String) req.getParameter("page"));
      } catch (Exception e) {
        page = 1;
      }     
      TubeSearchModel model = new TubeSearchModel();
      model.setPage(page);
      model.prepareTubeByAuthor(author);
      req.setAttribute("model", model);
      req.setAttribute("author", author);
      req.setAttribute("url", req.getRequestURL().toString());
      req.getRequestDispatcher("/author.jsp").forward(req, resp);     
    } catch (Exception e) {
View Full Code Here


      .getName());

  public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    try {     
      TubeSearchModel model = new TubeSearchModel();
      model.setLimit(500);
      model.prepareList();
      req.setAttribute("model", model);
      req.setAttribute("url", req.getRequestURL().toString());
      req.getRequestDispatcher("/rss.jsp").forward(req, resp);
    } catch (Exception e) {
      log.warning(e.toString());
View Full Code Here

      } catch (Exception e) {
        page = 1;
      }
      Channel obj = ChannelModel.getById(id);
      if (obj != null) {
        TubeSearchModel model = new TubeSearchModel();
        model.setPage(page);
        model.prepareTubeByChannel(obj.getId());
        req.setAttribute("model", model);
        req.setAttribute("obj", obj);
        req.setAttribute("url", req.getRequestURL().toString());
        req.getRequestDispatcher("/channel.jsp").forward(req, resp);
      } else {
View Full Code Here

      .getName());

  public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    try {
      TubeSearchModel model = new TubeSearchModel();
      model.setLimit(500);
      model.prepareList();
      req.setAttribute("model", model);
      req.setAttribute("url", req.getRequestURL().toString());
      req.getRequestDispatcher("/site-map.jsp").forward(req, resp);
    } catch (Exception e) {
      log.warning(e.toString());
View Full Code Here

        page = Integer.parseInt((String) req.getParameter("page"));
      } catch (Exception e) {
        page = 1;
      }
      tag = URLDecoder.decode(tag, "UTF-8");
      TubeSearchModel model = new TubeSearchModel();
      model.setPage(page);
      model.prepareByTag(tag);
      req.setAttribute("model", model);
      req.setAttribute("tag", tag);
      req.setAttribute("url", req.getRequestURL().toString());
      req.getRequestDispatcher("/tag.jsp").forward(req, resp);
    } catch (Exception e) {
View Full Code Here

      .getLogger(ListMostViewServlet.class.getName());

  public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    try {
      TubeSearchModel model = new TubeSearchModel();
      model.setPage(1);
      model.setLimit(30);
      model.prepareMostView();
      req.setAttribute("model", model);
      req.setAttribute("url", req.getRequestURL().toString());
      req.getRequestDispatcher("/most_view.jsp").forward(req, resp);
    } catch (Exception e) {
      log.warning(e.toString());
View Full Code Here

      } catch (Exception e) {
        page = 1;
      }
      Playlist obj = PlaylistModel.byId(id, true);
      if (obj != null) {
        TubeSearchModel model = new TubeSearchModel();
        model.setPage(page);
        model.prepareTubeByPlaylist(obj.getId());
        req.setAttribute("model", model);
        req.setAttribute("obj", obj);
        req.setAttribute("url", req.getRequestURL().toString());
        req.getRequestDispatcher("/playlist.jsp").forward(req, resp);
      } else {
View Full Code Here

      try {
        page = Integer.parseInt((String) req.getParameter("page"));
      } catch (Exception e) {
        page = 1;
      }
      TubeSearchModel model = new TubeSearchModel();
      model.setPage(page);
      model.prepareTubes();
      req.setAttribute("model", model);
      req.setAttribute("url", req.getRequestURL().toString());
      req.getRequestDispatcher("/tubes.jsp").forward(req, resp);
    } catch (Exception e) {
      log.warning(e.toString());
View Full Code Here

      } catch (Exception e) {
        cached = false;
      }
      if (cached) {
        if (result.size() >= 11) {
          TubeSearchModel model = new TubeSearchModel();
          model.setLimit(10);
          model.setPage(1);
          model.prepareRecentView();
          if (model.getListResult().size() > 0) {
            result = model.getListResult();
          }
          cache.put(prefix, result);
        }
      }
    }
    if (!cached) {
      TubeSearchModel model = new TubeSearchModel();
      model.setLimit(10);
      model.setPage(1);
      model.prepareRecentView();
      if (model.getListResult().size() > 0) {
        result = model.getListResult();
      }
      cache.put(prefix, result);
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of com.tubeonfire.search.TubeSearchModel

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.