Class RepositoryResource
java.lang.Object
com.atlassian.bamboo.plugins.testutils.rest.resource.repository.RepositoryResource
@Path("repository")
@Consumes("application/json")
@Produces("application/json")
@Singleton
public class RepositoryResource
extends Object
-
Constructor Summary
ConstructorDescriptionRepositoryResource
(BambooUserManager bambooUserManager, RepositoryTestService repositoryTestService, RepositoryDefinitionManager repositoryDefinitionManager, VcsPullRequestService pullRequestService, VcsRepositoryManager vcsRepositoryManager, PlanManager planManager, ResultsSummaryManager resultsSummaryManager, BuildResultWarningSummaryManager buildResultWarningSummaryManager, BranchDetectionService branchDetectionService, BambooSpecsManager bambooSpecsManager, ProjectManager projectManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, RestAuthenticationContext restAuthenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
createLinkedRepository
(@NotNull RestRepositoryConfig repositoryConfig) javax.ws.rs.core.Response
javax.ws.rs.core.Response
deleteBuildWarnings
(long repositoryId, String resultKeyString) javax.ws.rs.core.Response
deleteLinkedRepository
(long repositoryId) javax.ws.rs.core.Response
deleteLinkedRepository
(String repositoryName) javax.ws.rs.core.Response
javax.ws.rs.core.Response
getProjectRepositories
(String projectKey) boolean
isPullRequestClosed
(String repositoryName, @Nullable String pullRequestKey) boolean
isRssEnabled
(String repositoryName) javax.ws.rs.core.Response
sendBuildWarnings
(long repositoryId, String resultKeyString, RestBuildWarnings request) boolean
sendCommitComment
(String repositoryName, Map<String, String> body) Used for testing of commit comment functionality.javax.ws.rs.core.Response
triggerBranchDetection
(long repositoryId, boolean ignoreChainsConfig)
-
Constructor Details
-
RepositoryResource
@Inject public RepositoryResource(BambooUserManager bambooUserManager, RepositoryTestService repositoryTestService, RepositoryDefinitionManager repositoryDefinitionManager, VcsPullRequestService pullRequestService, VcsRepositoryManager vcsRepositoryManager, PlanManager planManager, ResultsSummaryManager resultsSummaryManager, BuildResultWarningSummaryManager buildResultWarningSummaryManager, BranchDetectionService branchDetectionService, BambooSpecsManager bambooSpecsManager, ProjectManager projectManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, RestAuthenticationContext restAuthenticationContext)
-
-
Method Details
-
createLinkedRepository
@Path("linked") @POST public RestRepositoryDefinition createLinkedRepository(@NotNull @NotNull RestRepositoryConfig repositoryConfig) throws WebValidationException - Throws:
WebValidationException
-
deleteLinkedRepository
@Path("linked/{repositoryId}") @DELETE public javax.ws.rs.core.Response deleteLinkedRepository(@PathParam("repositoryId") long repositoryId) -
deleteLinkedRepository
@Path("linked/name/{repositoryName}") @DELETE public javax.ws.rs.core.Response deleteLinkedRepository(@PathParam("repositoryName") String repositoryName) -
enableRss
@Path("linked/rssEnable/{repositoryName}") @POST public javax.ws.rs.core.Response enableRss(@PathParam("repositoryName") String repositoryName) -
enableRss
-
isRssEnabled
@Path("linked/rssEnable/{repositoryName}") @GET public boolean isRssEnabled(@PathParam("repositoryName") String repositoryName) -
deleteAllLinkedRepositories
@Path("linked") @DELETE public javax.ws.rs.core.Response deleteAllLinkedRepositories() -
isPullRequestClosed
@GET @Path("{repositoryName}/pull-request/{pullRequestKey}/closed") public boolean isPullRequestClosed(@PathParam("repositoryName") String repositoryName, @Nullable @PathParam("pullRequestKey") @Nullable String pullRequestKey) throws WebValidationException - Throws:
WebValidationException
-
sendCommitComment
@POST @Path("{repositoryName}/commitComment") public boolean sendCommitComment(@PathParam("repositoryName") String repositoryName, Map<String, String> body) throws WebValidationException, RepositoryExceptionUsed for testing of commit comment functionality. Generates RssSuccessEvent or RssErrorEvent depending on given body content. It leaves comment which will be propagated to GH or BbC depending on type of repository. It's not yet used anywhere and was created to simplify manual testing of commit comment functionality.curl -H 'Content-Type: application/json' -X POST -u admin:admin http://localhost:9087/bamboo/rest/backdoor/1.0/repository/github/commitComment -d '{"commitId":"dc88147961e5f0c2302511d5313ce2f9429843cd","planKey":"TEST-CTEST","isSuccess":true,"deploymentId":2162689}'
-
sendBuildWarnings
@PUT @Path("{repositoryId}/buildWarnings/{planResultKey}") public javax.ws.rs.core.Response sendBuildWarnings(@PathParam("repositoryId") long repositoryId, @PathParam("planResultKey") String resultKeyString, RestBuildWarnings request) throws WebValidationException, RepositoryException -
deleteBuildWarnings
@DELETE @Path("{repositoryId}/buildWarnings/{planResultKey}") public javax.ws.rs.core.Response deleteBuildWarnings(@PathParam("repositoryId") long repositoryId, @PathParam("planResultKey") String resultKeyString) throws WebValidationException, RepositoryException -
triggerBranchDetection
@POST @Path("{repositoryId}/detectBranches") public javax.ws.rs.core.Response triggerBranchDetection(@PathParam("repositoryId") long repositoryId, @QueryParam("ignoreChainsConfig") boolean ignoreChainsConfig) throws WebValidationException - Throws:
WebValidationException
-
clearSpecsStates
@POST @Path("clearSpecsStates") public javax.ws.rs.core.Response clearSpecsStates() -
getProjectRepositories
@GET @Path("project/{projectKey}/") public List<RestRepository> getProjectRepositories(@PathParam("projectKey") String projectKey) -
getLinkedRepositories
-