|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PlanDao
DAO Manager for Plan
Method Summary | ||
---|---|---|
java.util.Set<ImmutableChain> |
filterFavouritedPlans(java.util.Collection<? extends ImmutableChain> plans,
com.atlassian.user.User user)
Return a collection of TopLevelPlan s that are a subset of the given Plan s collection that are favourited by the User |
|
|
findAllPlans(java.lang.Class<T> planType)
Return a Plan collection for specified plan type. |
|
|
findAllPlansByProject(Project project,
java.lang.Class<T> planType)
Return a Plan collection for specified Project , including plans marked for deletion. |
|
|
findPlansByProject(Project project,
java.lang.Class<T> planType)
Return a Plan collection for specified Project |
|
|
getAllPlansMarkedForDeletion(java.lang.Class<T> planType)
Returns a list of Plan s that are com.atlassian.bamboo.plan.Plan#markForDeletion() for the given type |
|
int |
getBranchCount(Plan plan)
Returns the number of branches that exist for the given plan |
|
java.util.List<Pair<java.lang.Long,java.lang.Integer>> |
getBranchesCount()
Returns the number of branches that exist for master plans in Bamboo. |
|
java.util.List<ChainBranch> |
getBranchesForChain(ImmutableChain chain)
Returns all branches which have the given chain as their master |
|
java.util.Collection<Job> |
getBranchesForJob(Job job)
|
|
java.util.List<ChainBranchIdentifier> |
getBranchIdentifiersForChain(PlanIdentifier chain)
Returns minimal data about all branches which have the given chain as their master |
|
|
getPlanByKey(java.lang.String planKey,
java.lang.Class<T> aClass)
Return a Plan that matches the given key |
|
|
getPlanByName(java.lang.String projectKey,
java.lang.String planName,
java.lang.Class<T> planType)
Deprecated. since 4.0 implementation no longer guarantees exception on using the method with incorrect planType parameter but only when the result is not unique. Use: PlanDao#isPlanNameConflicting(String, String) |
|
|
getPlanByPartialKeyAndName(PlanKey partialPlanKey,
java.lang.String planName,
java.lang.Class<T> planType)
Returns a Plan that matches the start of the given PlanKey and name |
|
java.lang.Class<? extends Plan> |
getPlanClass(PlanKey planKey)
|
|
|
getPlanCount(java.lang.Class<T> planType)
How many plans filtered by Class currently exist |
|
PlanIdentifier |
getPlanIdentifierForPermissionCheckingByKey(java.lang.String planKey)
Return a Plan skeleton providing ONLY id and key, that matches the given key
This method should be used only for permission checking using Acegi
If Job key is provided as a parameter, parent Chain will be returned anyway, as Acegi assertions are defined only for TopLevelPlan s |
|
|
getPlanIdentifiersForProject(ProjectIdentifier projectIdentifier,
java.lang.Class<T> planType,
boolean includeMarkedForDeletion)
Returns minimal data about all plans in the given project |
|
|
getPlanKeys(java.lang.Class<T> planType)
Returns all plan keys of a particular type |
|
boolean |
isChainNameConflicting(java.lang.String projectKey,
long planIdToIgnore,
java.lang.String planName)
Verifies whether a Chain name is unique with the given project
|
|
void |
markPlansForDeletion(PlanKey planKey)
Efficiently marks a plan to be deleted |
|
void |
syncDeletionStatusOfJobs()
Performs a cleanup task to mark Job objects that have a Plan or ChainStage that
is marked to be deleted, but it itself was not marked as deleted. |
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao |
---|
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll |
Method Detail |
---|
@Nullable <T extends Plan> T getPlanByKey(@NotNull java.lang.String planKey, java.lang.Class<T> aClass)
Plan
that matches the given key
planKey
-
@Nullable PlanIdentifier getPlanIdentifierForPermissionCheckingByKey(@NotNull java.lang.String planKey)
Plan
skeleton providing ONLY id and key, that matches the given key
This method should be used only for permission checking using Acegi
If Job
key is provided as a parameter, parent Chain will be returned anyway, as Acegi assertions are defined only for TopLevelPlan
s
planKey
-
@Nullable java.lang.Class<? extends Plan> getPlanClass(@NotNull PlanKey planKey)
@Nullable @Deprecated <T extends Plan> T getPlanByName(@NotNull java.lang.String projectKey, @NotNull java.lang.String planName, java.lang.Class<T> planType)
PlanDao#isPlanNameConflicting(String, String)
Plan
from a project with the given plan name and Class
It is not possible to use this method if the planType parameter is a marker interface type such as Plan
, Buildable
or TopLevelPlan
since it is possible to have a Chain
and a Job
that share the same name.
projectKey
- of the project to look for the plan inplanName
- - name of the plan inside the project: this is just the plan component of the name (i.e does not include the project component)planType
- - the type of the plan to retrieve
IncorrectPlanTypeException
- if the result is not uniqueboolean isChainNameConflicting(@NotNull java.lang.String projectKey, long planIdToIgnore, @NotNull java.lang.String planName)
Chain
name is unique with the given project
projectKey
- of the project to look for the plan inplanIdToIgnore
- the id of the plan that has to be ignored during lookup (when you're saving a Plan, you should supply the plan id here)planName
- - name of the plan inside the project: this is just the plan component of the name (i.e does
not include the project component)
@Nullable <T extends Plan> T getPlanByPartialKeyAndName(@NotNull PlanKey partialPlanKey, @NotNull java.lang.String planName, java.lang.Class<T> planType)
Plan
that matches the start of the given PlanKey
and name
partialPlanKey
- planName
- planType
-
<T extends Plan> int getPlanCount(java.lang.Class<T> planType)
Class
currently exist
planType
-
<T extends Plan> java.util.List<T> findPlansByProject(@NotNull Project project, java.lang.Class<T> planType)
Plan
collection for specified Project
project
- planType
-
<T extends Plan> java.util.List<T> findAllPlansByProject(@NotNull Project project, java.lang.Class<T> planType)
Plan
collection for specified Project
, including plans marked for deletion.
project
- planType
-
@NotNull <T extends Plan> java.util.List<T> findAllPlans(java.lang.Class<T> planType)
Plan
collection for specified plan type. Does not include plans marked for deletion.
T
- planType
- type of plan to be selected from DB
Plan
collection for specified plan typejava.util.Set<ImmutableChain> filterFavouritedPlans(@NotNull java.util.Collection<? extends ImmutableChain> plans, @NotNull com.atlassian.user.User user)
TopLevelPlan
s that are a subset of the given Plan
s collection that are favourited by the User
plans
- user
-
@NotNull <T extends Plan> java.util.Collection<T> getAllPlansMarkedForDeletion(java.lang.Class<T> planType)
Plan
s that are com.atlassian.bamboo.plan.Plan#markForDeletion()
for the given type
@NotNull <T extends Plan> java.util.List<PlanKey> getPlanKeys(java.lang.Class<T> planType)
T
- planType
-
@NotNull java.util.List<ChainBranch> getBranchesForChain(ImmutableChain chain)
chain
- master plan
java.util.Collection<Job> getBranchesForJob(Job job)
@NotNull java.util.List<ChainBranchIdentifier> getBranchIdentifiersForChain(@NotNull PlanIdentifier chain)
chain
- master
@NotNull <T extends Plan> java.util.List<PlanIdentifier> getPlanIdentifiersForProject(@NotNull ProjectIdentifier projectIdentifier, @NotNull java.lang.Class<T> planType, boolean includeMarkedForDeletion)
projectIdentifier
- - to get plans forplanType
- to filter plans byincludeMarkedForDeletion
- - true if you want to include any results currently marked for deletion
int getBranchCount(@NotNull Plan plan)
plan
- to count branches of
java.util.List<Pair<java.lang.Long,java.lang.Integer>> getBranchesCount()
void markPlansForDeletion(PlanKey planKey)
planKey
- void syncDeletionStatusOfJobs()
Job
objects that have a Plan
or ChainStage
that
is marked to be deleted, but it itself was not marked as deleted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |