public abstract class ApiClient extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ApiClient.HttpClientFactory |
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.httpclient.Credentials |
credentials |
protected ApiClient.HttpClientFactory |
factory |
protected String |
key |
static byte |
MAX_KEY_SIZE_BB_API |
protected String |
name |
protected String |
owner |
protected String |
repositoryName |
Constructor and Description |
---|
ApiClient(String username,
String password,
String owner,
String repositoryName,
String key,
String name,
T httpFactory) |
Modifier and Type | Method and Description |
---|---|
String |
buildStatusKey(String bsKey) |
protected String |
computeAPIKey(String keyExPart)
Retrun
|
protected void |
delete(String path) |
abstract void |
deletePullRequestApproval(String pullRequestId) |
protected String |
get(String path) |
String |
getName() |
abstract List<AbstractPullrequest.Comment> |
getPullRequestComments(String commentOwnerName,
String commentRepositoryName,
String pullRequestId) |
abstract <T extends AbstractPullrequest> |
getPullRequests() |
abstract boolean |
hasBuildStatus(String owner,
String repositoryName,
String revision,
String keyEx) |
protected <R> R |
parse(String response,
Class<R> cls) |
protected <R> R |
parse(String response,
org.codehaus.jackson.type.JavaType type) |
protected <R> R |
parse(String response,
org.codehaus.jackson.type.TypeReference<R> ref) |
protected String |
post(String path) |
protected String |
post(String path,
org.apache.commons.httpclient.NameValuePair[] data) |
protected String |
post(String path,
Object data) |
abstract AbstractPullrequest.Participant |
postPullRequestApproval(String pullRequestId) |
abstract AbstractPullrequest.Comment |
postPullRequestComment(String pullRequestId,
String content) |
protected void |
put(String path,
org.apache.commons.httpclient.NameValuePair[] data) |
static String |
serializeObject(Object obj) |
abstract void |
setBuildStatus(String owner,
String repositoryName,
String revision,
BuildState state,
String buildUrl,
String comment,
String keyEx) |
public static final byte MAX_KEY_SIZE_BB_API
protected String owner
protected String repositoryName
protected org.apache.commons.httpclient.Credentials credentials
protected String key
protected String name
protected ApiClient.HttpClientFactory factory
protected String computeAPIKey(String keyExPart)
keyExPart
- public static String serializeObject(Object obj) throws IOException
IOException
protected void delete(String path)
protected void put(String path, org.apache.commons.httpclient.NameValuePair[] data)
protected <R> R parse(String response, Class<R> cls) throws IOException
IOException
protected <R> R parse(String response, org.codehaus.jackson.type.JavaType type) throws IOException
IOException
protected <R> R parse(String response, org.codehaus.jackson.type.TypeReference<R> ref) throws IOException
IOException
public abstract <T extends AbstractPullrequest> List<T> getPullRequests()
public abstract List<AbstractPullrequest.Comment> getPullRequestComments(String commentOwnerName, String commentRepositoryName, String pullRequestId)
public abstract boolean hasBuildStatus(String owner, String repositoryName, String revision, String keyEx)
public abstract void setBuildStatus(String owner, String repositoryName, String revision, BuildState state, String buildUrl, String comment, String keyEx)
public abstract void deletePullRequestApproval(String pullRequestId)
public abstract AbstractPullrequest.Participant postPullRequestApproval(String pullRequestId)
public abstract AbstractPullrequest.Comment postPullRequestComment(String pullRequestId, String content)
public String getName()
Copyright © 2016–2019. All rights reserved.