public void writeRawGitFile(String sha1, InputStream is) throws IOException { InputStreamSource iss = new InputStreamSource(is); StreamSource source = new StreamSource(iss); QueryFutureCallback future = new QueryFutureCallback(); _deployProxy.sendFile(sha1, source, future); }
/** * deletes a tag from the repository * * @param tag the tag to remove * @param attributes commit attributes including user and message */ @Override public boolean removeTag(CommitBuilder commit) { commit.validate(); String tag = commit.getId(); return _deployProxy.removeTag(tag, commit.getAttributes()); }
/** * Copies a tag * * @param tag the new tag to create * @param sourceTag the source tag from which to copy * @param attributes commit attributes including user and message */ public Boolean copyTag(CommitBuilder target, CommitBuilder source) { target.validate(); source.validate(); String targetId = target.getId(); String sourceId = source.getId(); return _deployProxy.copyTag(targetId, sourceId, target.getAttributes()); }
private boolean putTag(String tag, String contentHash, Map<String, String> attributes) { if (tag == null) throw new NullPointerException(); if (contentHash == null) throw new NullPointerException(); HashMap<String, String> attributeCopy; if (attributes != null) attributeCopy = new HashMap<String, String>(attributes); else attributeCopy = new HashMap<String, String>(); return _deployProxy.putTag(tag, contentHash, attributeCopy); }
public String[] getCommitList(String[] commitList) { try { return _deployProxy.getCommitList(commitList); } catch (ServiceUnavailableException e) { throw new ServiceUnavailableException( L.l( "Deploy service is not available.\n Ensure <resin:AdminServices> or a <resin:DeployService> is enabled in resin.xml.\n {0}", e.getMessage()), e); } }
public boolean getFile(String tagName, String fileName, OutputStream os) throws IOException { StreamSource fileSource = _deployProxy.getFile(tagName, fileName); if (fileSource != null) { ReadStream is = null; GitObjectStream gitIs = new GitObjectStream(fileSource.getInputStream()); try { is = Vfs.openRead(gitIs); is.writeToStream(os); } finally { gitIs.close(); IoUtil.close(is); } return true; } else { return false; } }
/** * Stops a controller based on a deployment tag: wars/foo.com/my-war * * @param tag the encoded controller name */ public DeployControllerState stop(String tag) { return _deployProxy.stop(tag); }
/** * Starts a controller based on a deployment tag: wars/foo.com/my-war * * @param tag the encoded controller name */ public DeployControllerState restartCluster(String tag) { return _deployProxy.restartCluster(tag); }
public DeployTagResult[] queryTags(String pattern) { return _deployProxy.queryTags(pattern); }
public String[] listFiles(String tagName, String fileName) throws IOException { return _deployProxy.listFiles(tagName, fileName); }
/** Returns the state for a tag. */ public Throwable getTagException(String tag) { DeployTagStateQuery query = _deployProxy.getTagState(tag); // (TagStateQuery) query(query); if (query != null) return query.getThrowable(); else return null; }
/** Returns the state for a tag. */ public String getTagState(String tag) { DeployTagStateQuery query = _deployProxy.getTagState(tag); if (query != null) return query.getState(); else return null; }