Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.labels
Class LabelManagerImpl

    java.lang.Object
      com.atlassian.bamboo.labels.LabelManagerImpl

All Implemented Interfaces:
  LabelManager

    public class LabelManagerImpl

extends Object
implements LabelManager

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()`

Method Summary
`int` | `addFavourite(Build build, User user)` Adds a build to a user as favourite.
`int` | `addLabel(String labelName, BuildResults buildResults, User user)` Add a label against a build result.
`protected int` | `addLabel(String labelName, String namespace, Project project, Build build, BuildResults buildResults, String userName)`
`List` | `findBuildResultsSummaryByLabel(String labelName)` Finds all `BuildResultsSummary` labelled with given labelname
`List` | `findLabels()` Finds all labels with namespace = 'label', and maxResults set to 200
`List` | `findLabels(String namespace, int maxResults)` Finds all labels given namespace, and maxResults
`List` | `findLabels(String namespace, int maxResults, Build build)` Finds all labels in a given build, with namespace and maxResults.
`List` | `findLabels(String namespace, int maxResults, Project project)` Finds all labels in a given project, with namespace and maxResults.
`boolean` | `isFavourite(Build build, User user)` Determins if the build is a user's favourite
`boolean` | `isManuallyUnmarkedFavourite(Build build, User user)` Flag which determines if the user has manually unmarked this build as favourite.
`int` | `removeFavourite(Build build, User user)` Removes a build from a user's favourite.
`int` | `removeLabel(String labelName, BuildResults buildResults, User user)` Removes a label against a build result.
`protected int` | `removeLabel(String labelName, String namespace, Project project, Build build, BuildResults buildResults, String userName)`
`void` | `setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)`
`void` | `setLabelDao(LabelDao labelDao)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LabelManagerImpl

    public LabelManagerImpl()

Method Detail

### addLabel

    public int addLabel(String labelName,
                        BuildResults buildResults,
                        User user)

  Description copied from interface: `LabelManager`
  Add a label against a build result.

  Specified by:
    `addLabel` in interface `LabelManager`
  Returns:
    an `int` identifying result of add process

### removeLabel

    public int removeLabel(String labelName,
                           BuildResults buildResults,
                           User user)

  Description copied from interface: `LabelManager`
  Removes a label against a build result. Will delete the Label entity if there are no more build results tied to it.

  Specified by:
    `removeLabel` in interface `LabelManager`
  Returns:
    an `int` identifying result of delete process

### findBuildResultsSummaryByLabel

    public List findBuildResultsSummaryByLabel(String labelName)

  Description copied from interface: `LabelManager`
  Finds all `BuildResultsSummary` labelled with given labelname

  Specified by:
    `findBuildResultsSummaryByLabel` in interface `LabelManager`
  Returns:
    `List` of `BuildResultsSummary`

### isFavourite

    public boolean isFavourite(Build build,
                               User user)

  Description copied from interface: `LabelManager`
  Determins if the build is a user's favourite

  Specified by:
    `isFavourite` in interface `LabelManager`
  Returns:
    `boolean` yes or no

### isManuallyUnmarkedFavourite

    public boolean isManuallyUnmarkedFavourite(Build build,
                                               User user)

  Description copied from interface: `LabelManager`
  Flag which determines if the user has manually unmarked this build as favourite.

  Specified by:
    `isManuallyUnmarkedFavourite` in interface `LabelManager`
  Returns:
    `boolean` flag

### addFavourite

    public int addFavourite(Build build,
                            User user)

  Description copied from interface: `LabelManager`
  Adds a build to a user as favourite. Adds a label to the build, with namespace = user name, and label name = ":favourite".

  Specified by:
    `addFavourite` in interface `LabelManager`
  Returns:
    an `int` identifying result of add process

### removeFavourite

    public int removeFavourite(Build build,
                               User user)

  Description copied from interface: `LabelManager`
  Removes a build from a user's favourite. Removes labelling object, where namespace = user name, and label name=":favourite".

  Specified by:
    `removeFavourite` in interface `LabelManager`
  Returns:
    an `int` identifying result of removal process

### findLabels

    public List findLabels()

  Description copied from interface: `LabelManager`
  Finds all labels with namespace = 'label', and maxResults set to 200

  Specified by:
    `findLabels` in interface `LabelManager`
  Returns:
    `List` of `LabelCount` objects, mapping a `Label` to count of occurances.

### findLabels

    public List findLabels(String namespace,
                           int maxResults)

  Description copied from interface: `LabelManager`
  Finds all labels given namespace, and maxResults

  Specified by:
    `findLabels` in interface `LabelManager`
  Returns:
    `List` of `LabelCount` objects, mapping a `Label` to count of occurances.

### findLabels

    public List findLabels(String namespace,
                           int maxResults,
                           Build build)

  Description copied from interface: `LabelManager`
  Finds all labels in a given build, with namespace and maxResults.

  Specified by:
    `findLabels` in interface `LabelManager`
  Returns:
    `List` of `LabelCount` objects, mapping (`Label` to count of occurances.

### findLabels

    public List findLabels(String namespace,
                           int maxResults,
                           Project project)

  Description copied from interface: `LabelManager`
  Finds all labels in a given project, with namespace and maxResults.

  Specified by:
    `findLabels` in interface `LabelManager`
  Returns:
    `List` of `LabelCount` objects, mapping (`Label` to count of occurances.

### addLabel

    protected int addLabel(String labelName,
                           String namespace,
                           Project project,
                           Build build,
                           BuildResults buildResults,
                           String userName)

### removeLabel

    protected int removeLabel(String labelName,
                              String namespace,
                              Project project,
                              Build build,
                              BuildResults buildResults,
                              String userName)

### setLabelDao

    public void setLabelDao(LabelDao labelDao)

### setBuildResultsIndexer

    public void setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.