@Singleton public class StashResource extends Object
Constructor and Description |
---|
StashResource(com.atlassian.stash.rest.client.applinks.ApplinkStashClientFactory stashClientFactory,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager,
BitbucketSeverMirrorHelper bitbucketSeverMirrorHelper,
StashClientProvider stashClientProvider) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
canMerge(long repositoryId,
long pullRequestId) |
javax.ws.rs.core.Response |
getAvailableProjects(String serverKey,
long start,
long limit)
Returns list of available Bitbucket Server projects.
|
javax.ws.rs.core.Response |
getAvailableServers() |
javax.ws.rs.core.Response |
getBranch(String serverKey,
String projectKey,
String repositorySlug,
String branchId) |
javax.ws.rs.core.Response |
getBranches(String serverKey,
String projectKey,
String repositorySlug,
String query,
long start,
long limit) |
javax.ws.rs.core.Response |
getDefaultBranch(String serverKey,
String projectKey,
String repositorySlug) |
javax.ws.rs.core.Response |
getPullRequests(long repositoryId,
String branchName,
long start,
long limit,
long avatarSize)
Returns list of pull requests for given repository and optionally branch.
|
javax.ws.rs.core.Response |
getRepositories(String serverKey,
String projectName,
String query,
long start,
long limit) |
javax.ws.rs.core.Response |
getRepository(String serverKey,
String projectKey,
String repositorySlug) |
javax.ws.rs.core.Response |
getRepositoryMirrors(String serverKey,
String projectKey,
String repositorySlug) |
javax.ws.rs.core.Response |
getRepositoryPermission(String serverKey,
String projectKey,
String repositorySlug) |
javax.ws.rs.core.Response |
getRepositorySSHKeys(String serverKey,
String projectKey,
String repositorySlug,
long start,
long limit) |
javax.ws.rs.core.Response |
merge(long repositoryId,
long pullRequestId,
long version) |
@Inject public StashResource(com.atlassian.stash.rest.client.applinks.ApplinkStashClientFactory stashClientFactory, com.atlassian.sal.api.message.I18nResolver i18nResolver, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, BitbucketSeverMirrorHelper bitbucketSeverMirrorHelper, StashClientProvider stashClientProvider)
public javax.ws.rs.core.Response getAvailableServers()
public javax.ws.rs.core.Response getAvailableProjects(String serverKey, long start, long limit)
serverKey
- name of the application link to Bitbucket Serverstart
- index of the first result to retrieve (for paging)limit
- total number of results to retrieve after start (for paging)public javax.ws.rs.core.Response getRepositories(String serverKey, String projectName, String query, long start, long limit)
public javax.ws.rs.core.Response getRepository(String serverKey, String projectKey, String repositorySlug)
public javax.ws.rs.core.Response getRepositoryMirrors(String serverKey, String projectKey, String repositorySlug) throws WebValidationException
WebValidationException
public javax.ws.rs.core.Response getBranches(String serverKey, String projectKey, String repositorySlug, String query, long start, long limit)
public javax.ws.rs.core.Response getDefaultBranch(String serverKey, String projectKey, String repositorySlug)
public javax.ws.rs.core.Response getBranch(String serverKey, String projectKey, String repositorySlug, String branchId)
public javax.ws.rs.core.Response getRepositoryPermission(String serverKey, String projectKey, String repositorySlug) throws WebValidationException
WebValidationException
public javax.ws.rs.core.Response getRepositorySSHKeys(String serverKey, String projectKey, String repositorySlug, long start, long limit) throws CredentialsRequiredContextException, com.opensymphony.webwork.dispatcher.json.JSONException
CredentialsRequiredContextException
com.opensymphony.webwork.dispatcher.json.JSONException
public javax.ws.rs.core.Response getPullRequests(long repositoryId, String branchName, long start, long limit, long avatarSize)
repositoryId
- repository idbranchName
- branch namestart
- index of the first result to retrieve (for paging)limit
- total number of results to retrieve after start (for paging)avatarSize
- size of avatar images returnedpublic javax.ws.rs.core.Response merge(long repositoryId, long pullRequestId, long version)
public javax.ws.rs.core.Response canMerge(long repositoryId, long pullRequestId)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.