com.atlassian.jira.issue.label
Class OfBizLabelStore

java.lang.Object
  extended by com.atlassian.jira.issue.label.OfBizLabelStore
All Implemented Interfaces:
LabelStore

public class OfBizLabelStore
extends java.lang.Object
implements LabelStore

OfBiz implementation of the LabelStore

Since:
v4.2

Nested Class Summary
static class OfBizLabelStore.Columns
           
 
Field Summary
static java.lang.String TABLE
           
 
Constructor Summary
OfBizLabelStore(OfBizDelegator ofBizDelegator)
           
 
Method Summary
 Label addLabel(java.lang.Long issueId, java.lang.Long customFieldId, java.lang.String label)
          Adds a new label to the issue for the custom field specified.
 java.util.Set<Label> getLabels(java.lang.Long issueId, java.lang.Long customFieldId)
          Returns all the labels for the given issue and custom field.
 void removeLabel(java.lang.Long labelId, java.lang.Long issueId, java.lang.Long customFieldId)
          Removes the label identified by id
 java.util.Set<java.lang.Long> removeLabelsForCustomField(java.lang.Long customFieldId)
          Deletes all labels for a given custom field.
 java.util.Set<Label> setLabels(java.lang.Long issueId, java.lang.Long customFieldId, java.util.Set<java.lang.String> labels)
          Sets the labels for a particular issue and field combo to the set specified as a parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE

public static final java.lang.String TABLE
See Also:
Constant Field Values
Constructor Detail

OfBizLabelStore

public OfBizLabelStore(OfBizDelegator ofBizDelegator)
Method Detail

getLabels

public java.util.Set<Label> getLabels(java.lang.Long issueId,
                                      java.lang.Long customFieldId)
Description copied from interface: LabelStore
Returns all the labels for the given issue and custom field. The custom field may also be null, in which case the labels for the system field will be returned.

Specified by:
getLabels in interface LabelStore
Parameters:
issueId - The issue id that the label is linked against
customFieldId - Custom field id for the labels CF or null if it's the system field.
Returns:
A set of alphabetically ordered labels for the issue and custom field.

setLabels

public java.util.Set<Label> setLabels(java.lang.Long issueId,
                                      java.lang.Long customFieldId,
                                      java.util.Set<java.lang.String> labels)
Description copied from interface: LabelStore
Sets the labels for a particular issue and field combo to the set specified as a parameter. The set may be an empty set in order to clear all labels for an issue.

Specified by:
setLabels in interface LabelStore
Parameters:
issueId - The issue id that the label is linked against
customFieldId - Custom field id for the labels CF or null if it's the system field.
labels - the new labels for this issue and custom field combo
Returns:
a set of stored label objects in alphabetical order

addLabel

public Label addLabel(java.lang.Long issueId,
                      java.lang.Long customFieldId,
                      java.lang.String label)
Description copied from interface: LabelStore
Adds a new label to the issue for the custom field specified. If the customFieldId is null, the label will be added for the system field. Adding an existing label again, will simply return the existing label.

Specified by:
addLabel in interface LabelStore
Parameters:
issueId - The issue id that the label is linked against
customFieldId - Custom field id for the labels CF or null if it's the system field.
label - The new label to add
Returns:
The Label object that was added

removeLabel

public void removeLabel(java.lang.Long labelId,
                        java.lang.Long issueId,
                        java.lang.Long customFieldId)
Description copied from interface: LabelStore
Removes the label identified by id

Specified by:
removeLabel in interface LabelStore
Parameters:
labelId - The id of the label to delete
issueId - The issue id that the label is linked against
customFieldId - Custom field id for the labels CF or null if it's the system field.

removeLabelsForCustomField

public java.util.Set<java.lang.Long> removeLabelsForCustomField(java.lang.Long customFieldId)
Description copied from interface: LabelStore
Deletes all labels for a given custom field. This is useful when deleting a custom field.

Specified by:
removeLabelsForCustomField in interface LabelStore
Parameters:
customFieldId - The custom field id for which to delete labels
Returns:
A set of issueids affected by this operation


Copyright © 2002-2011 Atlassian. All Rights Reserved.