@Override public ObjectNode getMetaDataFromPath(String revision, String path) throws IOException, SVNException { int revisionNumber = -1; try { revisionNumber = Integer.parseInt(revision); } catch (NumberFormatException e) { play.Logger.info("Illegal SVN revision: " + revision); } return getMetaDataFromPath(revisionNumber, path); }
@Override public void sendError(int statusCode, String msg) throws IOException { // FIXME response should be returned at this time. setStatus(statusCode); resetBuffer(); if (msg != null) { play.Logger.error(msg); getWriter().write(msg); response.setHeader(Http.HeaderNames.CONTENT_TYPE, "text/plain"); } else { response.getHeaders().remove(Http.HeaderNames.CONTENT_TYPE); } }
public boolean move( String srcProjectOwner, String srcProjectName, String desrProjectOwner, String destProjectName) { File src = new File(getRootDirectory(), srcProjectOwner + "/" + srcProjectName); File dest = new File(getRootDirectory(), desrProjectOwner + "/" + destProjectName); src.setWritable(true); try { if (src.exists()) { FileUtils.moveDirectory(src, dest); } return true; } catch (IOException e) { play.Logger.error("Move Failed", e); return false; } }