Examples of Pj


Examples of org.svnadmin.entity.Pj

      // TODO 主要是兼容3.0版本
      pstmt.setString(index++, "%" + Constants.GROUP_MANAGER);

      rs = pstmt.executeQuery();
      while (rs.next()) {
        Pj pj = readPj(rs);
        String manager = rs.getString("manager");// 是否是管理员组的用户
        pj.setManager(StringUtils.isNotBlank(manager));
        list.add(pj);
      }
      return list;
    } catch (SQLException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.svnadmin.entity.Pj

   * @return 项目
   * @throws SQLException
   *             jdbc异常
   */
  public Pj readPj(ResultSet rs) throws SQLException {
    Pj result = new Pj();
    result.setPj(rs.getString("pj"));
    result.setPath(rs.getString("path"));
    result.setUrl(rs.getString("url"));
    result.setDes(rs.getString("des"));
    result.setType(rs.getString("type"));
    return result;
  }
View Full Code Here

Examples of org.svnadmin.entity.Pj

   * @param pjId 项目ID
   * @return svn仓库
   * @throws SVNException svn异常,例如没有权限等
   */
  public SVNRepository getRepository(String pjId) throws SVNException{
    Pj pj = pjDao.get(pjId);
    if(pj == null){
      LOG.warn("Not found project: "+pjId);
      return null;
    }
    return this.getRepository(pj);
View Full Code Here

Examples of org.svnadmin.entity.Pj

   * @param pj 项目id
   * @return 项目的相对根路径
   * @since 3.0.3
   */
  public String getRelateRootPath(String pj){
    Pj p = this.get(pj);
    if(p == null || StringUtils.isBlank(p.getPath())){
      return pj;
    }
    return getRelateRootPath(pj);
  }
View Full Code Here

Examples of org.svnadmin.entity.Pj

  }

  @Override
  protected void unknow(HttpServletRequest request,
      HttpServletResponse response) {
    Pj pj = pjService.get(request.getParameter("pj"));
    String root = repositoryService.getRepositoryRoot(pj);
    String svnUrl = RepositoryService.parseURL(pj.getUrl());
    String path = "/";
    if(root != null){
      try {
        root = URLDecoder.decode(root,"UTF-8");//@see issue 34
      } catch (UnsupportedEncodingException e) {
View Full Code Here

Examples of org.svnadmin.entity.Pj

  }

  @Override
  protected void save(HttpServletRequest request, HttpServletResponse response) {
    this.validateManager(request, response);//检查权限
    Pj entity = new Pj();
    entity.setPj(request.getParameter("pj"));
    entity.setPath(request.getParameter("path"));
    entity.setUrl(request.getParameter("url"));
    entity.setDes(request.getParameter("des"));
    entity.setType(request.getParameter("type"));
    request.setAttribute("entity", entity);
    pjService.save(entity);

  }
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.