Package com.google.gerrit.server.project

Examples of com.google.gerrit.server.project.ListProjects


  }

  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse res)
      throws IOException {
    ListProjects impl = factory.get();
    if (!Strings.isNullOrEmpty(req.getPathInfo())) {
      impl.setMatchPrefix(URLDecoder.decode(req.getPathInfo(), "UTF-8"));
    }
    if (acceptsJson(req)) {
      impl.setFormat(OutputFormat.JSON_COMPACT);
    }
    if (paramParser.parse(impl, req, res)) {
      ByteArrayOutputStream buf = new ByteArrayOutputStream();
      if (impl.getFormat().isJson()) {
        res.setContentType(JSON_TYPE);
        buf.write(JSON_MAGIC);
      } else {
        res.setContentType("text/plain");
      }
      impl.display(buf);
      res.setCharacterEncoding("UTF-8");
      send(req, res, buf.toByteArray());
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gerrit.server.project.ListProjects

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.