com.atlassian.bamboo.plugins.rest.resource
Class PlanResource

java.lang.Object
  extended by com.atlassian.bamboo.plugins.rest.resource.PlanResource

@Singleton
public class PlanResource
extends java.lang.Object

Plan service is supposed to be used to retrieve full list of plans and plan details


Constructor Summary
PlanResource(BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, BranchDetectionService branchDetectionService, CachedPlanManager cachedPlanManager, LabelManager labelManager, PlanService planService, VariableDefinitionManager variableDefinitionManager, JiraIssueManager jiraIssueManager, JiraApplinksService jiraApplinksService)
           
 
Method Summary
 void addPlanLabel(java.lang.String projectKey, java.lang.String buildKey, RestPlanLabel label, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
          Adds new label to plan specified by projectKey-buildKey.
 RestPlans getAllPlanList(javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
          Method used to list all plans on Bamboo service that user is allowed to see (READ permission).
 RestJiraIssue getIssueDetails(java.lang.String projectKey, java.lang.String buildKey, java.lang.String issueKey, javax.ws.rs.core.UriInfo uriInfo)
           
 RestPlan getPlan(java.lang.String projectKey, java.lang.String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 RestPlan getPlanAlias(java.lang.String projectKey, java.lang.String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
           
 RestPlanBranch getPlanBranch(java.lang.String projectKey, java.lang.String buildKey, java.lang.String branchName, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
          Provide details for specified Branch of a specified Plan.
 RestBranches getPlanBranches(java.lang.String projectKey, java.lang.String buildKey, javax.ws.rs.core.UriInfo uriInfo, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
          Provide list of branches for specified plan.
 RestPlanLabels getPlanLabels(java.lang.String projectKey, java.lang.String buildKey, javax.ws.rs.core.UriInfo uriInfo)
          Provide list of labels for plan specified by projectKey-buildKey.
 RestVcsBranches getVcsBranches(java.lang.String projectKey, java.lang.String buildKey, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders hh)
          Provide list of vcs branch names for branches that exist on the default repository of this plan
 void removePlanLabel(java.lang.String projectKey, java.lang.String buildKey, java.lang.String labelName, com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
          Removes label from plan specified by projectKey-buildKey-buildNumber.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanResource

public PlanResource(BambooPermissionManager bambooPermissionManager,
                    BambooUserManager bambooUserManager,
                    BranchDetectionService branchDetectionService,
                    CachedPlanManager cachedPlanManager,
                    LabelManager labelManager,
                    PlanService planService,
                    VariableDefinitionManager variableDefinitionManager,
                    JiraIssueManager jiraIssueManager,
                    JiraApplinksService jiraApplinksService)
Method Detail

getAllPlanList

public RestPlans getAllPlanList(@Context
                                javax.ws.rs.core.UriInfo uriInfo,
                                @Context
                                com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Method used to list all plans on Bamboo service that user is allowed to see (READ permission). Should be invoked as /rest/api/latest/plan

Possible expand parameters plans - list of plans plans.plan - list of plans with plan details plans.plan.actions

Returns:
list of plans on Bamboo server

getPlan

public RestPlan getPlan(java.lang.String projectKey,
                        java.lang.String buildKey,
                        @Context
                        javax.ws.rs.core.UriInfo uriInfo,
                        @Context
                        com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)

getPlanAlias

public RestPlan getPlanAlias(java.lang.String projectKey,
                             java.lang.String buildKey,
                             @Context
                             javax.ws.rs.core.UriInfo uriInfo,
                             @Context
                             com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)

getPlanBranches

public RestBranches getPlanBranches(java.lang.String projectKey,
                                    java.lang.String buildKey,
                                    @Context
                                    javax.ws.rs.core.UriInfo uriInfo,
                                    @Context
                                    com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide list of branches for specified plan. Plan might be top level plan (projectKey-planKey) or job plan (projectKey-planKey-jobKey). You can use "enabledOnly" param to filter out disabled branches.

Parameters:
projectKey - project key
buildKey - plan key (might be simply planKey or composite planKey-jobKey)
uriInfo -
authenticationContext -
Returns:
RestBranches

getPlanBranch

public RestPlanBranch getPlanBranch(java.lang.String projectKey,
                                    java.lang.String buildKey,
                                    java.lang.String branchName,
                                    @Context
                                    javax.ws.rs.core.UriInfo uriInfo,
                                    @Context
                                    com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Provide details for specified Branch of a specified Plan. Plan might be top level plan (projectKey-planKey) or job plan (projectKey-planKey-jobKey).

Parameters:
projectKey - project key
buildKey - plan key (might be simply planKey or composite planKey-jobKey)
branchName - branch display name
uriInfo -
authenticationContext -
Returns:
RestBranches

getPlanLabels

public RestPlanLabels getPlanLabels(java.lang.String projectKey,
                                    java.lang.String buildKey,
                                    @Context
                                    javax.ws.rs.core.UriInfo uriInfo)
Provide list of labels for plan specified by projectKey-buildKey.

Parameters:
projectKey - project key
buildKey - plan key (might be simply planKey or composite planKey-jobKey)
uriInfo -
Returns:
RestPlanLabels

addPlanLabel

public void addPlanLabel(java.lang.String projectKey,
                         java.lang.String buildKey,
                         RestPlanLabel label,
                         @Context
                         com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Adds new label to plan specified by projectKey-buildKey.

Parameters:
projectKey - project key
buildKey - plan key (might be simply planKey or composite planKey-jobKey)
label - label content to add to build result
authenticationContext -

removePlanLabel

public void removePlanLabel(java.lang.String projectKey,
                            java.lang.String buildKey,
                            java.lang.String labelName,
                            @Context
                            com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
                     throws java.lang.Exception
Removes label from plan specified by projectKey-buildKey-buildNumber.

Parameters:
projectKey - project key
buildKey - plan key (might be simply planKey or composite planKey-jobKey)
labelName - label name to remove from plan
authenticationContext -
Throws:
java.lang.Exception

getVcsBranches

public RestVcsBranches getVcsBranches(java.lang.String projectKey,
                                      java.lang.String buildKey,
                                      @Context
                                      javax.ws.rs.core.UriInfo uriInfo,
                                      @Context
                                      javax.ws.rs.core.HttpHeaders hh)
Provide list of vcs branch names for branches that exist on the default repository of this plan

Parameters:
projectKey - project key
buildKey - plan key - only top level plans are supported
uriInfo -
Returns:
RestVcsBranchList

getIssueDetails

public RestJiraIssue getIssueDetails(java.lang.String projectKey,
                                     java.lang.String buildKey,
                                     java.lang.String issueKey,
                                     @Context
                                     javax.ws.rs.core.UriInfo uriInfo)


Copyright © 2012 Atlassian. All Rights Reserved.