Package org.argeo.ajaxplorer.jdrivers

Examples of org.argeo.ajaxplorer.jdrivers.AjxpDriverException


  protected SVNURL createRepository(File repoDir) {
    try {
      SVNAdminClient adminClient = manager.getAdminClient();
      return adminClient.doCreateRepository(repoDir, null, true, false);
    } catch (SVNException e) {
      throw new AjxpDriverException("Cannot create repository at "
          + repoDir, e);
    }
  }
View Full Code Here


            + " to revision " + repoRev);
        manager.getUpdateClient().doUpdate(getBaseDir(),
            SVNRevision.HEAD, true);
      }
    } catch (SVNException e) {
      throw new AjxpDriverException("Cannot update working copy "
          + getBaseDir(),e);
    }
  }
View Full Code Here

        wait(WRITE_ACTION_TIMEOUT);
      } catch (InterruptedException e) {
        // silent
      }
      if (isInWriteAction) {
        throw new AjxpDriverException(
            "Still in write action after timeout "
                + WRITE_ACTION_TIMEOUT + " ms.");
      }
    }
View Full Code Here

  public void setBaseUrl(String baseUrl) {
    try {
      this.baseUrl = SVNURL.parseURIDecoded(baseUrl);
    } catch (SVNException e) {
      throw new AjxpDriverException("Cannot parse SVN URL " + baseUrl, e);
    }
  }
View Full Code Here

          newDir.isDirectory(), true, true);

      driver.commitAll("Commit new dir " + newDir.getName());
      driver.completeWriteAction(newDir.getParentFile());
    } catch (SVNException e) {
      throw new AjxpDriverException("Cannot commit new dir" + newDir, e);
    } finally {
      driver.rollbackWriteAction(newDir.getParentFile());
    }
  }
View Full Code Here

        SVNRepository repository = driver.getRepository();
        out = response.getOutputStream();
        repository.getFile(path, rev, null, out);
      } catch (Exception e) {
        throw new AjxpDriverException("Cannot download revision " + rev
            + " of path " + path, e);
      } finally {
        IOUtils.closeQuietly(out);
      }
    }
View Full Code Here

          res.add(new SvnAjxpFile(info, path));
        }
      }
      return res;
    } catch (SVNException e) {
      throw new AjxpDriverException("Cannot list svn dir " + path, e);
    }
  }
View Full Code Here

public abstract class AbstractFileDownloadAction extends FileAction {
  public AjxpAnswer execute(FileDriver driver, HttpServletRequest request) {
    String fileStr = request.getParameter(getFileParameter());
    if (fileStr == null) {
      throw new AjxpDriverException(
          "A  file to download needs to be provided.");
    }
    File file = new File(driver.getBasePath() + fileStr);
    return new AxpBasicDownloadAnswer(file);
  }
View Full Code Here

        copyFile(in, out);
        out.flush();

      } catch (Exception e) {
        e.printStackTrace();
        throw new AjxpDriverException("Cannot download file " + file, e);
      } finally {
        IOUtils.closeQuietly(in);
        IOUtils.closeQuietly(out);
      }
View Full Code Here

      if (log.isTraceEnabled())
        log.trace(buf.toString());

      return buf.toString();
    } catch (Exception e) {
      throw new AjxpDriverException("Could not serialize file " + file, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.argeo.ajaxplorer.jdrivers.AjxpDriverException

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.