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
Interface LabelManager

All Known Implementing Classes:
  LabelManagerImpl

    public interface LabelManager

Field Summary
`static String` | `BUILDRESULT_LABEL_NAMESPACE`
`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`

Method Summary
`int` | `addFavourite(Build build, User user)` Adds a build to a user as favourite.
`int` | `addLabel(String labelName, BuildResults build, User user)` Add a label against a build result.
`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 build, User user)` Removes a label against a build result.

Field Detail

### NO_CHANGE

    static final int NO_CHANGE

See Also:
  Constant Field Values

### LABEL_CREATED

    static final int LABEL_CREATED

See Also:
  Constant Field Values

### LABEL_ADDED_TO_BUILD_RESULT

    static final int LABEL_ADDED_TO_BUILD_RESULT

See Also:
  Constant Field Values

### LABEL_DELETED

    static final int LABEL_DELETED

See Also:
  Constant Field Values

### LABEL_REMOVED_FROM_BUILD_RESULT

    static final int LABEL_REMOVED_FROM_BUILD_RESULT

See Also:
  Constant Field Values

### BUILDRESULT_LABEL_NAMESPACE

    static final String BUILDRESULT_LABEL_NAMESPACE

See Also:
  Constant Field Values

### FAVOURITE_LABEL_NAME

    static final String FAVOURITE_LABEL_NAME

See Also:
  Constant Field Values

### FAVOURITE_UNMARK_LABEL_NAME

    static final String FAVOURITE_UNMARK_LABEL_NAME

See Also:
  Constant Field Values

### DEFAULT_MAX_RESULTS

    static final int DEFAULT_MAX_RESULTS

See Also:
  Constant Field Values

Method Detail

### addLabel

    int addLabel(String labelName,
                 BuildResults build,
                 User user)

  Add a label against a build result.

  Parameters:
    `labelName` -
    `build` -
    `user` -
  Returns:
    an `int` identifying result of add process

### removeLabel

    int removeLabel(String labelName,
                    BuildResults build,
                    User user)

  Removes a label against a build result. Will delete the Label entity if there are no more build results tied to it.

  Parameters:
    `labelName` -
    `build` -
    `user` -
  Returns:
    an `int` identifying result of delete process

### findBuildResultsSummaryByLabel

    List findBuildResultsSummaryByLabel(String labelName)

  Finds all `BuildResultsSummary` labelled with given labelname

  Parameters:
    `labelName` -
  Returns:
    `List` of `BuildResultsSummary`

### findLabels

    List findLabels()

  Finds all labels with namespace = 'label', and maxResults set to 200

  Returns:
    `List` of `LabelCount` objects, mapping a `Label` to count of occurances.

### findLabels

    List findLabels(String namespace,
                    int maxResults)

  Finds all labels given namespace, and maxResults

  Parameters:
    `namespace` -
    `maxResults` -
  Returns:
    `List` of `LabelCount` objects, mapping a `Label` to count of occurances.

### findLabels

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

  Finds all labels in a given build, with namespace and maxResults.

  Parameters:
    `namespace` -
    `maxResults` -
    `build` -
  Returns:
    `List` of `LabelCount` objects, mapping (`Label` to count of occurances.

### findLabels

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

  Finds all labels in a given project, with namespace and maxResults.

  Parameters:
    `namespace` -
    `maxResults` -
    `project` -
  Returns:
    `List` of `LabelCount` objects, mapping (`Label` to count of occurances.

### addFavourite

    int addFavourite(Build build,
                     User user)

  Adds a build to a user as favourite. Adds a label to the build, with namespace = user name, and label name = ":favourite".

  Parameters:
    `build` -
    `user` -
  Returns:
    an `int` identifying result of add process

### removeFavourite

    int removeFavourite(Build build,
                        User user)

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

  Parameters:
    `build` -
    `user` -
  Returns:
    an `int` identifying result of removal process

### isFavourite

    boolean isFavourite(Build build,
                        User user)

  Determins if the build is a user's favourite

  Parameters:
    `build` -
    `user` -
  Returns:
    `boolean` yes or no

### isManuallyUnmarkedFavourite

    boolean isManuallyUnmarkedFavourite(Build build,
                                        User user)

  Flag which determines if the user has manually unmarked this build as favourite.

  Parameters:
    `build` -
    `user` -
  Returns:
    `boolean` flag

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.