public void contextDestroyed(ServletContextEvent servletContextEvent) { try { helper.destroy(); } catch (Exception e) { throw createServletException(e); } }
@Override public List<CommitInfo> history(String branch, String objectId, String path, int limit) { try { return doHistory(git, branch, objectId, path, limit); } catch (Exception e) { throw new RuntimeIOException(e); } }
public FileContents read(final String branch, final String pathOrEmpty) throws IOException, GitAPIException { return gitOperation(getStashPersonIdent(), new Callable<FileContents>() { @Override public String toString() { return "doRead(" + branch + ", " + pathOrEmpty + ")"; } @Override public FileContents call() throws Exception { return doRead(git, getRootGitDirectory(), branch, pathOrEmpty); } }); }
public CommitInfo call() throws Exception { checkoutBranch(git, branch); File rootDir = getRootGitDirectory(); return doCreateDirectory(git, rootDir, branch, path, personIdent, commitMessage); } });
public CommitInfo call() throws Exception { checkoutBranch(git, branch); File rootDir = getRootGitDirectory(); return doWrite(git, rootDir, branch, path, data, personIdent, commitMessage); } });
@Override public T call() throws Exception { return doReadFile(git, getRootGitDirectory(), branch, pathOrEmpty, callback); } });
@Override public T call() throws Exception { return doWriteFile(git, getRootGitDirectory(), branch, pathOrEmpty, callback); } });
@Override public FileInfo call() throws Exception { File rootDir = getRootGitDirectory(); return doExists(git, rootDir, branch, pathOrEmpty, false); } });
@Override public String call() throws Exception { File rootDir = getRootGitDirectory(); return doReadJsonChildContent(git, rootDir, branch, path, fileNameWildcard, search); } });
public RevCommit call() throws Exception { File rootDir = getRootGitDirectory(); return doRename(git, rootDir, branch, oldPath, newPath, commitMessage, personIdent); } });
public RevCommit call() throws Exception { Git aGit = git; File rootDir = getRootGitDirectory(); return doRemove(aGit, rootDir, branch, path, commitMessage, personIdent); } });
@Override public FileContents call() throws Exception { return doRead(git, getRootGitDirectory(), branch, pathOrEmpty); } });
@Override public List<String> call() throws Exception { File rootDir = getRootGitDirectory(); return doCompletePath(git, rootDir, branch, completionText, directoriesOnly); } });
@Override public Void call() throws Exception { Git aGit = git; File rootDir = getRootGitDirectory(); return doRevert(aGit, rootDir, branch, objectId, blobPath, commitMessage, personIdent); } });
@Override public List<String> call() throws Exception { return doListBranches(git); } });
public Object call() throws Exception { doCreateBranch(git, fromBranch, newBranch); return null; } });
@Override public List<CommitTreeInfo> getCommitTree(final String commitId) { return gitOperation(getStashPersonIdent(), new Callable<List<CommitTreeInfo>>() { @Override public String toString() { return "getTree(" + commitId + ")"; } public List<CommitTreeInfo> call() throws Exception { return doGetCommitTree(git, commitId); } }); }
public <T> T writeFile(final String branch, final String pathOrEmpty, final WriteCallback<T> callback) throws IOException, GitAPIException { return gitOperation(getStashPersonIdent(), new Callable<T>() { @Override public String toString() { return "doWriteFile(" + branch + ", " + pathOrEmpty + ", " + callback + ")"; } @Override public T call() throws Exception { return doWriteFile(git, getRootGitDirectory(), branch, pathOrEmpty, callback); } }); }
public <T> T readFile(final String branch, final String pathOrEmpty, final Function<File, T> callback) throws IOException, GitAPIException { return gitOperation(getStashPersonIdent(), new Callable<T>() { @Override public String toString() { return "doReadFile(" + branch + ", " + pathOrEmpty + ", " + callback + ")"; } @Override public T call() throws Exception { return doReadFile(git, getRootGitDirectory(), branch, pathOrEmpty, callback); } }); }
@Override public CommitInfo getCommitInfo(final String commitId) { return gitOperation(getStashPersonIdent(), new Callable<CommitInfo>() { @Override public String toString() { return "getCommitInfo(" + commitId + ")"; } public CommitInfo call() throws Exception { return doGetCommitInfo(git, commitId); } }); }