public interface LabelManager
| Modifier and Type | Field and Description |
|---|---|
static String |
BUILDRESULT_LABEL_NAMESPACE
Not really accurately named.
|
static int |
DEFAULT_MAX_RESULTS |
static String |
FAVOURITE_LABEL_NAME |
static String |
FAVOURITE_UNMARK_LABEL_NAME |
static int |
LABEL_ADDED_TO_BUILD_RESULT |
static int |
LABEL_CREATED |
static int |
LABEL_DELETED |
static int |
LABEL_REMOVED_FROM_BUILD_RESULT |
static int |
NO_CHANGE |
| Modifier and Type | Method and Description |
|---|---|
int |
addFavourite(Plan plan,
com.atlassian.user.User user)
Adds a build to a user as favourite.
|
int |
addLabel(String labelName,
PlanKey planKey,
com.atlassian.user.User user)
Creates a normal label for a plan
|
int |
addLabel(String labelName,
PlanResultKey planResultKey,
com.atlassian.user.User user)
Add a label against a build result.
|
boolean |
addLabels(List<String> labelNames,
PlanKey planKey,
com.atlassian.user.User user)
Creates multiple normal labels for a plan
|
List<ResultsSummary> |
findBuildResultsSummaryByLabel(String labelName)
Finds all
ResultsSummary labelled with given labelname |
List<LabelCount> |
findLabels(String namespace,
int maxResults,
Plan plan,
Project project)
Finds all labels in a given build, with namespace and maxResults.
|
Set<Label> |
getAllPlanLabels()
All labels used on a plan level
|
List<String> |
getFavouritesForPlan(ImmutablePlan plan)
Retrieves a list of usernames which have the given plan set as a favourite.
|
List<String> |
getFavouritesForPlan(Plan plan)
Deprecated.
since 5.4 use
getFavouritesForPlan(com.atlassian.bamboo.plan.cache.ImmutablePlan) instead |
Collection<Label> |
getLabelsByName(List<String> labelNames)
Gets list of labels based on label names
|
Set<Label> |
getPlanLabels(ImmutablePlan plan)
Get labels defined for a plan
|
boolean |
hasBuildResultsLabel(ResultsSummary buildResultsSummary,
String label)
Checks whether the build results summary has a particular label
|
boolean |
hasPlanLabel(Plan plan,
String label)
Checks whether the Plan has a particular label
|
boolean |
isFavourite(ImmutablePlan plan,
com.atlassian.user.User user)
Determines if the build is a user's favourite
Note that its more efficient to use
PlanManager.filterFavouritedPlans(java.util.Collection, com.atlassian.user.User)
if you are performing this operation over a collection of Plans |
boolean |
isManuallyUnmarkedFavourite(Plan plan,
com.atlassian.user.User user)
Flag which determines if the user has manually unmarked this build as favourite.
|
int |
removeFavourite(Plan plan,
com.atlassian.user.User user)
Removes a build from a user's favourite.
|
int |
removeLabel(String labelName,
PlanKey planKey,
com.atlassian.user.User user)
Remove the standard label for a plan (not all the labels for that plan)
|
int |
removeLabel(String labelName,
PlanResultKey planResultKey,
com.atlassian.user.User user)
Removes a label against a build result.
|
void |
saveLabelling(Labelling labelling)
Saves a specific labelling - does not do any validation or checking.
|
static final int NO_CHANGE
static final int LABEL_CREATED
static final int LABEL_ADDED_TO_BUILD_RESULT
static final int LABEL_DELETED
static final int LABEL_REMOVED_FROM_BUILD_RESULT
static final String BUILDRESULT_LABEL_NAMESPACE
static final String FAVOURITE_LABEL_NAME
static final String FAVOURITE_UNMARK_LABEL_NAME
static final int DEFAULT_MAX_RESULTS
int addLabel(@Nullable
String labelName,
@Nullable
PlanResultKey planResultKey,
@Nullable
com.atlassian.user.User user)
labelName - planResultKey - user - int identifying result of add processint removeLabel(String labelName, PlanResultKey planResultKey, com.atlassian.user.User user)
labelName - planResultKey - user - int identifying result of delete process@NotNull List<ResultsSummary> findBuildResultsSummaryByLabel(String labelName)
ResultsSummary labelled with given labelnamelabelName - List of ResultsSummary@NotNull List<LabelCount> findLabels(@NotNull String namespace, int maxResults, @Nullable Plan plan, @Nullable Project project)
namespace - maxResults - plan - project - @return List of LabelCount objects, mapping (Label to count of occurrences.int addFavourite(Plan plan, com.atlassian.user.User user)
plan - user - int identifying result of add processint removeFavourite(@NotNull
Plan plan,
@Nullable
com.atlassian.user.User user)
plan - user - int identifying result of removal processboolean isFavourite(ImmutablePlan plan, com.atlassian.user.User user)
PlanManager.filterFavouritedPlans(java.util.Collection, com.atlassian.user.User)
if you are performing this operation over a collection of Plansplan - user - boolean yes or noboolean isManuallyUnmarkedFavourite(@NotNull
Plan plan,
@Nullable
com.atlassian.user.User user)
plan - user - boolean flagList<String> getFavouritesForPlan(ImmutablePlan plan)
plan - @Deprecated List<String> getFavouritesForPlan(Plan plan)
getFavouritesForPlan(com.atlassian.bamboo.plan.cache.ImmutablePlan) insteadboolean hasBuildResultsLabel(ResultsSummary buildResultsSummary, String label)
buildResultsSummary - label - . could be emptyResultsSummaryboolean hasPlanLabel(Plan plan, String label)
plan - label - . could be emptyPlanCollection<Label> getLabelsByName(List<String> labelNames)
labelNames - void saveLabelling(Labelling labelling)
labelling - to saveint addLabel(@Nullable
String labelName,
@Nullable
PlanKey planKey,
@Nullable
com.atlassian.user.User user)
labelName - planKey - user - boolean addLabels(List<String> labelNames, @Nullable PlanKey planKey, @Nullable com.atlassian.user.User user)
labelNames - planKey - user - int removeLabel(@Nullable
String labelName,
@Nullable
PlanKey planKey,
@Nullable
com.atlassian.user.User user)
labelName - planKey - user - @NotNull Set<Label> getAllPlanLabels()
Label related to any planSet<Label> getPlanLabels(@NotNull ImmutablePlan plan)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.