|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.labels.LabelManagerImpl
public class LabelManagerImpl
This manager is not transactional but is thread safe
Field Summary |
---|
Fields inherited from interface com.atlassian.bamboo.labels.LabelManager |
---|
BUILDRESULT_LABEL_NAMESPACE, DEFAULT_MAX_RESULTS, FAVOURITE_LABEL_NAME, FAVOURITE_UNMARK_LABEL_NAME, LABEL_ADDED_TO_BUILD_RESULT, LABEL_CREATED, LABEL_DELETED, LABEL_REMOVED_FROM_BUILD_RESULT, NO_CHANGE |
Constructor Summary | |
---|---|
LabelManagerImpl(LabelDao labelDao,
BuildResultsIndexer buildResultsIndexer,
PlanManager planManager,
ResultsSummaryManager resultsSummaryManager,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Method Summary | |
---|---|
int |
addFavourite(Plan plan,
com.atlassian.user.User user)
Adds a build to a user as favourite. |
int |
addLabel(java.lang.String labelName,
PlanResultKey planResultKey,
com.atlassian.user.User user)
Add a label against a build result. |
protected int |
addLabel(java.lang.String labelName,
java.lang.String namespace,
Project project,
Plan plan,
PlanResultKey planResultKey,
java.lang.String userName)
|
java.util.List<ResultsSummary> |
findBuildResultsSummaryByLabel(java.lang.String labelName)
Finds all ResultsSummary labelled with given labelname |
java.util.List<LabelCount> |
findLabels(java.lang.String namespace,
int maxResults,
Plan plan,
Project project)
Finds all labels in a given build, with namespace and maxResults. |
java.util.List<Label> |
findLabelsByMatchingString(java.lang.String match,
java.lang.String escapeChar)
Find all labels that match the specified string. |
java.util.List<java.lang.String> |
getFavouritesForPlan(Plan plan)
Retrieves a list of usernames which have the given plan set as a favourite. |
java.util.Collection<Label> |
getLabelsByName(java.util.List<java.lang.String> labelNames)
Gets list of labels based on label names |
boolean |
hasBuildResultsLabel(ResultsSummary buildResultsSummary,
java.lang.String label)
Checks whether the build results summary has a particular label |
boolean |
isFavourite(Plan 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 Build s |
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(java.lang.String labelName,
PlanResultKey planResultKey,
com.atlassian.user.User user)
Removes a label against a build result. |
protected int |
removeLabel(java.lang.String labelName,
java.lang.String namespace,
Project project,
Plan plan,
PlanResultKey planResultKey,
java.lang.String userName)
|
void |
saveLabelling(Labelling labelling)
Saves a specific labelling - does not do any validation or checking. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelManagerImpl(LabelDao labelDao, BuildResultsIndexer buildResultsIndexer, PlanManager planManager, ResultsSummaryManager resultsSummaryManager, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public void saveLabelling(Labelling labelling)
LabelManager
saveLabelling
in interface LabelManager
labelling
- to savepublic int addLabel(@Nullable java.lang.String labelName, @Nullable PlanResultKey planResultKey, @Nullable com.atlassian.user.User user)
LabelManager
addLabel
in interface LabelManager
int
identifying result of add processpublic int addFavourite(Plan plan, com.atlassian.user.User user)
LabelManager
addFavourite
in interface LabelManager
int
identifying result of add processpublic int removeLabel(java.lang.String labelName, @Nullable PlanResultKey planResultKey, com.atlassian.user.User user)
LabelManager
removeLabel
in interface LabelManager
int
identifying result of delete processpublic int removeFavourite(@NotNull Plan plan, @Nullable com.atlassian.user.User user)
LabelManager
removeFavourite
in interface LabelManager
int
identifying result of removal processpublic boolean hasBuildResultsLabel(@NotNull ResultsSummary buildResultsSummary, @NotNull java.lang.String label)
LabelManager
hasBuildResultsLabel
in interface LabelManager
buildResultsSummary
- @NotNulllabel
- @NotNull . could be empty
ResultsSummary
public java.util.Collection<Label> getLabelsByName(java.util.List<java.lang.String> labelNames)
LabelManager
getLabelsByName
in interface LabelManager
@NotNull public java.util.List<ResultsSummary> findBuildResultsSummaryByLabel(@NotNull java.lang.String labelName)
LabelManager
ResultsSummary
labelled with given labelname
findBuildResultsSummaryByLabel
in interface LabelManager
List
of ResultsSummary
public boolean isFavourite(@NotNull Plan plan, @Nullable com.atlassian.user.User user)
LabelManager
PlanManager.filterFavouritedPlans(java.util.Collection, com.atlassian.user.User)
if you are performing this operation over a collection of Build
s
isFavourite
in interface LabelManager
boolean
yes or nopublic boolean isManuallyUnmarkedFavourite(@NotNull Plan plan, @Nullable com.atlassian.user.User user)
LabelManager
isManuallyUnmarkedFavourite
in interface LabelManager
boolean
flag@NotNull public java.util.List<java.lang.String> getFavouritesForPlan(@NotNull Plan plan)
LabelManager
getFavouritesForPlan
in interface LabelManager
@NotNull public java.util.List<LabelCount> findLabels(@NotNull java.lang.String namespace, int maxResults, @Nullable Plan plan, @Nullable Project project)
LabelManager
findLabels
in interface LabelManager
project
- @return List
of LabelCount
objects, mapping (Label
to count of occurrences.public java.util.List<Label> findLabelsByMatchingString(java.lang.String match, java.lang.String escapeChar)
LabelManager
findLabelsByMatchingString
in interface LabelManager
protected int addLabel(@NotNull java.lang.String labelName, java.lang.String namespace, Project project, Plan plan, @Nullable PlanResultKey planResultKey, java.lang.String userName)
protected int removeLabel(@NotNull java.lang.String labelName, @NotNull java.lang.String namespace, @NotNull Project project, @NotNull Plan plan, @Nullable PlanResultKey planResultKey, @Nullable java.lang.String userName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |