|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.plugins.rest.service.PlanRestServiceImpl
public class PlanRestServiceImpl
Constructor Summary | |
---|---|
PlanRestServiceImpl(BambooUserManager bambooUserManager,
CachedPlanManager cachedPlanManager,
FilteringPlanManager filteringPlanManager,
LabelManager labelManager,
PlanExecutionManager planExecutionManager,
PlanManager planManager,
ResultsSummaryManager resultsSummaryManager)
|
Method Summary | ||
---|---|---|
void |
assertPlanExistsAndVisible(PlanKey planKey)
Checks if Plan exists and is visible for calling user |
|
RestBranchLatestActive |
createLatestActiveBranchResult(ImmutablePlan branch)
|
|
RestPlanBranchList |
createPaginatedBranchResponse(List<? extends ImmutablePlan> branches,
com.atlassian.user.User user,
javax.ws.rs.core.UriInfo uriInfo,
boolean allBranches)
|
|
RestPlans |
createPaginatedPlanResponse(List<? extends ImmutablePlan> plans,
com.atlassian.user.User user,
javax.ws.rs.core.UriInfo uriInfo)
|
|
ImmutablePlan |
getBranchByName(ImmutablePlan plan,
String branchName)
Get branch of a given plan by name. |
|
List<ImmutableChainBranch> |
getBranchesForChain(ImmutablePlan plan)
|
|
List<ImmutableJob> |
getBranchesForJob(ImmutableJob job)
|
|
ImmutableChain |
getChainByKey(PlanKey planKey)
Returns a Plan if plan exists and is visible for calling user |
|
List<ImmutableJob> |
getJobsForPlan(PlanKey planKey,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Get a list of jobs of specified plan. |
|
ImmutablePlan |
getPlanByKey(PlanKey planKey)
Returns a Plan if plan exists and is visible for calling user |
|
ImmutablePlan |
getPlanByKeyUnchecked(PlanKey planKey)
Returns a Plan if plan exists. |
|
|
getPlans(Class<T> planType,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Get a list of plans of specified type. |
|
List<? extends ImmutablePlan> |
getPlans(javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Get a list of plans. |
|
List<? extends ImmutablePlan> |
getPlansByProject(Project project,
javax.ws.rs.core.UriInfo uriInfo)
Get a list of plans that belong to a project. |
|
List<? extends ImmutablePlan> |
getPlansByProject(Project project,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Get a list of plans that belong to a project. |
|
List<? extends ImmutablePlan> |
getRunnablePlans(Project project,
javax.ws.rs.core.UriInfo uriInfo)
Get a list of plans that can be run currently logged in user. |
|
boolean |
isPlanCreationAllowed()
Check whether or not a plan can be created or not (based on licensing etc) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlanRestServiceImpl(BambooUserManager bambooUserManager, CachedPlanManager cachedPlanManager, FilteringPlanManager filteringPlanManager, LabelManager labelManager, PlanExecutionManager planExecutionManager, PlanManager planManager, ResultsSummaryManager resultsSummaryManager)
Method Detail |
---|
public List<ImmutableChainBranch> getBranchesForChain(ImmutablePlan plan)
getBranchesForChain
in interface PlanRestService
public List<ImmutableJob> getBranchesForJob(ImmutableJob job)
getBranchesForJob
in interface PlanRestService
public RestPlans createPaginatedPlanResponse(List<? extends ImmutablePlan> plans, @Nullable com.atlassian.user.User user, javax.ws.rs.core.UriInfo uriInfo)
createPaginatedPlanResponse
in interface PlanRestService
public RestPlanBranchList createPaginatedBranchResponse(List<? extends ImmutablePlan> branches, @Nullable com.atlassian.user.User user, javax.ws.rs.core.UriInfo uriInfo, boolean allBranches)
createPaginatedBranchResponse
in interface PlanRestService
allBranches
- return all branches, even if expand has 'favourites' parameter. This is because 'favourites'
is about plans not branches and all branches of a favourite plan are to be shown
@Nullable public RestBranchLatestActive createLatestActiveBranchResult(ImmutablePlan branch)
createLatestActiveBranchResult
in interface PlanRestService
public ImmutablePlan getBranchByName(@NotNull ImmutablePlan plan, @NotNull String branchName)
PlanRestService
getBranchByName
in interface PlanRestService
plan
- planbranchName
- name of the branch to be fetched
ImmutableChainBranch
, ImmutableJob
or null if not foundpublic List<? extends ImmutablePlan> getPlans(@NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
PlanRestService
getPlans
in interface PlanRestService
public <T extends ImmutablePlan> List<T> getPlans(Class<T> planType, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
PlanRestService
getPlans
in interface PlanRestService
planType
- type of plans
public List<ImmutableJob> getJobsForPlan(@NotNull PlanKey planKey, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
PlanRestService
getJobsForPlan
in interface PlanRestService
planKey
- planKey
public List<? extends ImmutablePlan> getPlansByProject(@NotNull Project project, @NotNull javax.ws.rs.core.UriInfo uriInfo)
PlanRestService
getPlansByProject
in interface PlanRestService
public List<? extends ImmutablePlan> getPlansByProject(@NotNull Project project, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
PlanRestService
getPlansByProject
in interface PlanRestService
public List<? extends ImmutablePlan> getRunnablePlans(@NotNull Project project, @NotNull javax.ws.rs.core.UriInfo uriInfo)
PlanRestService
getRunnablePlans
in interface PlanRestService
public void assertPlanExistsAndVisible(@NotNull PlanKey planKey)
PlanRestService
Plan
exists and is visible for calling user
assertPlanExistsAndVisible
in interface PlanRestService
@NotNull public ImmutableChain getChainByKey(@NotNull PlanKey planKey)
Plan
if plan exists and is visible for calling user
getChainByKey
in interface PlanRestService
planKey
-
NotFoundException,
- AccessDeniedException@NotNull public ImmutablePlan getPlanByKey(@NotNull PlanKey planKey)
PlanRestService
Plan
if plan exists and is visible for calling user
getPlanByKey
in interface PlanRestService
planKey
- key of a plan to search for
ImmutablePlan
public ImmutablePlan getPlanByKeyUnchecked(@NotNull PlanKey planKey)
PlanRestService
Plan
if plan exists. No permission check is performed.
getPlanByKeyUnchecked
in interface PlanRestService
planKey
- key of a plan to search for
ImmutablePlan
or null if not foundpublic boolean isPlanCreationAllowed()
PlanRestService
isPlanCreationAllowed
in interface PlanRestService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |