Class PlanResource
- java.lang.Object
-
- com.atlassian.bamboo.plugins.rest.build.PlanResource
-
@Singleton @Component public class PlanResource extends Object
Plan service is supposed to be used to retrieve full list of plans and plan details
-
-
Field Summary
Fields Modifier and Type Field Description static String
PASSWORD_MASK
-
Constructor Summary
Constructors Constructor Description PlanResource(BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, BranchCreationFacade branchCreationFacade, CachedPlanManager cachedPlanManager, PlanManager planManager, LabelManager labelManager, PlanRestService planRestService, VariableDefinitionManager variableDefinitionManager, JiraIssueManager jiraIssueManager, JiraApplinksService jiraApplinksService, com.atlassian.event.api.EventPublisher eventPublisher, ArtifactDefinitionManager artifactDefinitionManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TestsManager testsManager, TestQuarantineManager testQuarantineManager, VcsRepositoryManager vcsRepositoryManager, DeletionService deletionService, RssDetectionService rssDetectionService, ChainBranchManager chainBranchManager, BuildDefinitionManager buildDefinitionManager, SpecsConsumerFactory specsConsumerFactory, SpecsExporter specsExporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPlanLabel(String projectKey, String buildKey, RestPlanLabel label, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
javax.ws.rs.core.Response
addPlanVariable(String projectKey, String buildKey, RestVariable variable, javax.ws.rs.core.UriInfo uriInfo)
RestPlanBranch
createNewBranch(String projectKey, String buildKey, String branchName, String vcsBranchName, Boolean enabled, Boolean cleanupEnabled, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
javax.ws.rs.core.Response
deletePlan(String projectKey, String buildKey)
javax.ws.rs.core.Response
deletePlanVariable(String projectKey, String buildKey, String variableName)
javax.ws.rs.core.Response
disablePlan(String projectKey, String buildKey)
javax.ws.rs.core.Response
editPlanVariable(String projectKey, String buildKey, String variableName, RestVariable variable)
javax.ws.rs.core.Response
enablePlan(String projectKey, String buildKey)
javax.ws.rs.core.Response
enableSpecsForBranches(String projectKey, String buildKey)
javax.ws.rs.core.Response
exportPlanSpec(String projectKey, String buildKey, String packageNameOpt, @Nullable String formatParam)
RestPlans
getAllPlanList(javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
RestJiraIssue
getIssueDetails(String projectKey, String buildKey, String issueKey, javax.ws.rs.core.UriInfo uriInfo)
RestPlan
getPlan(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
RestPlan
getPlanAlias(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
RestArtifactDefinitions
getPlanArtifactDefinition(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
javax.ws.rs.core.Response
getPlanBranch(String projectKey, String buildKey, String branchName, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
RestBranches
getPlanBranches(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
RestPlanLabels
getPlanLabels(String projectKey, String buildKey, javax.ws.rs.core.UriInfo uriInfo)
javax.ws.rs.core.Response
getPlanVariable(String projectKey, String buildKey, String variableName)
javax.ws.rs.core.Response
getPlanVariables(String projectKey, String buildKey)
RestVcsBranches
getVcsBranches(String projectKey, String buildKey, @Nullable String searchTerm, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders hh)
javax.ws.rs.core.Response
markPlanFavourite(String projectKey, String buildKey, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
javax.ws.rs.core.Response
quarantineTest(String projectKey, String buildKey, long testId, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
javax.ws.rs.core.Response
removePlanLabel(String projectKey, String buildKey, String labelName, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
javax.ws.rs.core.Response
unleashTest(String projectKey, String buildKey, long testId, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
javax.ws.rs.core.Response
unmarkPlanFavourite(String projectKey, String buildKey, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
-
-
Field Detail
-
PASSWORD_MASK
public static final String PASSWORD_MASK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PlanResource
@Autowired public PlanResource(BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, BranchCreationFacade branchCreationFacade, CachedPlanManager cachedPlanManager, PlanManager planManager, LabelManager labelManager, PlanRestService planRestService, VariableDefinitionManager variableDefinitionManager, JiraIssueManager jiraIssueManager, JiraApplinksService jiraApplinksService, com.atlassian.event.api.EventPublisher eventPublisher, ArtifactDefinitionManager artifactDefinitionManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TestsManager testsManager, TestQuarantineManager testQuarantineManager, VcsRepositoryManager vcsRepositoryManager, DeletionService deletionService, RssDetectionService rssDetectionService, ChainBranchManager chainBranchManager, BuildDefinitionManager buildDefinitionManager, SpecsConsumerFactory specsConsumerFactory, SpecsExporter specsExporter)
-
-
Method Detail
-
getAllPlanList
public RestPlans getAllPlanList(@Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
getPlan
public RestPlan getPlan(String projectKey, String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
getPlanAlias
public RestPlan getPlanAlias(String projectKey, String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
getPlanBranches
public RestBranches getPlanBranches(String projectKey, String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
createNewBranch
public RestPlanBranch createNewBranch(String projectKey, String buildKey, String branchName, String vcsBranchName, Boolean enabled, Boolean cleanupEnabled, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext) throws WebValidationException
- Throws:
WebValidationException
-
getPlanBranch
public javax.ws.rs.core.Response getPlanBranch(String projectKey, String buildKey, String branchName, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
getPlanLabels
public RestPlanLabels getPlanLabels(String projectKey, String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo)
-
addPlanLabel
public void addPlanLabel(String projectKey, String buildKey, RestPlanLabel label, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
removePlanLabel
public javax.ws.rs.core.Response removePlanLabel(String projectKey, String buildKey, String labelName, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext) throws Exception
- Throws:
Exception
-
getVcsBranches
public RestVcsBranches getVcsBranches(String projectKey, String buildKey, @Nullable @Nullable String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders hh)
-
getIssueDetails
public RestJiraIssue getIssueDetails(String projectKey, String buildKey, String issueKey, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
- Throws:
WebValidationException
-
markPlanFavourite
public javax.ws.rs.core.Response markPlanFavourite(String projectKey, String buildKey, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
unmarkPlanFavourite
public javax.ws.rs.core.Response unmarkPlanFavourite(String projectKey, String buildKey, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
getPlanVariables
public javax.ws.rs.core.Response getPlanVariables(String projectKey, String buildKey)
-
getPlanVariable
public javax.ws.rs.core.Response getPlanVariable(String projectKey, String buildKey, String variableName)
-
addPlanVariable
public javax.ws.rs.core.Response addPlanVariable(String projectKey, String buildKey, RestVariable variable, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
- Throws:
WebValidationException
-
editPlanVariable
public javax.ws.rs.core.Response editPlanVariable(String projectKey, String buildKey, String variableName, RestVariable variable) throws WebValidationException
- Throws:
WebValidationException
-
deletePlanVariable
public javax.ws.rs.core.Response deletePlanVariable(String projectKey, String buildKey, String variableName)
-
getPlanArtifactDefinition
public RestArtifactDefinitions getPlanArtifactDefinition(String projectKey, String buildKey, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
-
quarantineTest
public javax.ws.rs.core.Response quarantineTest(String projectKey, String buildKey, long testId, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext) throws WebValidationException
- Throws:
WebValidationException
-
unleashTest
public javax.ws.rs.core.Response unleashTest(String projectKey, String buildKey, long testId, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext) throws WebValidationException
- Throws:
WebValidationException
-
enableSpecsForBranches
public javax.ws.rs.core.Response enableSpecsForBranches(String projectKey, String buildKey)
-
exportPlanSpec
public javax.ws.rs.core.Response exportPlanSpec(String projectKey, String buildKey, String packageNameOpt, @Nullable @Nullable String formatParam) throws WebValidationException
- Throws:
WebValidationException
-
-