/** * Trigger a build without parameters */ public void build() throws IOException { client.post(url + "build"); }
/** * {@inheritDoc} */ @Override public void post(String path) throws IOException { post(path, null, null, null, false); }
/** * {@inheritDoc} */ @Override public <R extends BaseModel, D> R post(String path, D data, Class<R> cls, boolean crumbFlag) throws IOException { return post(path, data, cls, null, crumbFlag); }
/** * {@inheritDoc} */ @Override public <R extends BaseModel, D> R post(String path, D data, Class<R> cls) throws IOException { return post(path, data, cls, null, true); }
/** * {@inheritDoc} */ @Override public void post(String path, boolean crumbFlag) throws IOException { post(path, null, null,null, crumbFlag); }
/** * Perform POST request that takes no parameters and returns no response * * @param path * path to request * @throws IOException * , HttpResponseException */ public void post(String path) throws IOException, HttpResponseException { post(path, null, null); }
private void stopPost() throws HttpResponseException, IOException{ client.post(url + "stop"); } }
/** * Trigger a parameterized build * * @param params the job parameters * @throws IOException */ public void build(Map<String, String> params) throws IOException { String qs = join(Collections2.transform(params.entrySet(), new MapEntryToQueryStringPair()), "&"); client.post(url + "buildWithParameters?" + qs, null, null); }
private QueueReference stop(JobWithDetails job, Integer buildNumber) throws IOException { ExtractHeader location = (ExtractHeader) job.getClient().post(job.getUrl() + buildNumber + "/stop", null, ExtractHeader.class); return new QueueReference(location.getLocation()); }
private QueueReference terminate(JobWithDetails job, Integer buildNumber) throws IOException { ExtractHeader location = (ExtractHeader) job.getClient().post(job.getUrl() + buildNumber + "/term", null, ExtractHeader.class); return new QueueReference(location.getLocation()); }