public class CachingLabelStore extends Object implements LabelStore, Startable
Constructor and Description |
---|
CachingLabelStore(OfBizLabelStore delegateStore,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
Label |
addLabel(Long issueId,
Long customFieldId,
String label)
Adds a new label to the issue for the custom field specified.
|
Collection<Label> |
getLabels(long issueId)
Returns all labels for the given issue.
|
Set<Label> |
getLabels(Long issueId,
Long customFieldId)
Returns all the labels for the given issue and custom field.
|
Map<Long,Collection<Label>> |
getLabels(Set<Long> issueIds)
Returns all labels for the given issues batch.
|
void |
onClearCache(ClearCacheEvent event) |
void |
removeLabel(Long labelId,
Long issueId,
Long customFieldId)
Removes the label identified by id
|
Set<Long> |
removeLabelsForCustomField(Long customFieldId)
Deletes all labels for a given custom field.
|
Set<Label> |
setLabels(Long issueId,
Long customFieldId,
Set<String> labels)
Sets the labels for a particular issue and field combo to the set specified as a parameter.
|
void |
start()
This method will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
public CachingLabelStore(OfBizLabelStore delegateStore, com.atlassian.cache.CacheManager cacheManager)
@EventListener public void onClearCache(ClearCacheEvent event)
public Set<Label> getLabels(Long issueId, Long customFieldId)
LabelStore
getLabels
in interface LabelStore
issueId
- The issue id that the label is linked againstcustomFieldId
- Custom field id for the labels CF or null if it's the system field.public Set<Label> setLabels(Long issueId, Long customFieldId, Set<String> labels)
LabelStore
setLabels
in interface LabelStore
issueId
- The issue id that the label is linked againstcustomFieldId
- 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 combopublic Label addLabel(Long issueId, Long customFieldId, String label)
LabelStore
addLabel
in interface LabelStore
issueId
- The issue id that the label is linked againstcustomFieldId
- Custom field id for the labels CF or null if it's the system field.label
- The new label to addpublic void removeLabel(Long labelId, Long issueId, Long customFieldId)
LabelStore
removeLabel
in interface LabelStore
labelId
- The id of the label to deleteissueId
- The issue id that the label is linked againstcustomFieldId
- Custom field id for the labels CF or null if it's the system field.public Set<Long> removeLabelsForCustomField(Long customFieldId)
LabelStore
removeLabelsForCustomField
in interface LabelStore
customFieldId
- The custom field id for which to delete labelspublic Collection<Label> getLabels(long issueId)
LabelStore
getLabels
in interface LabelStore
issueId
- The issue id that the label is linked againstpublic Map<Long,Collection<Label>> getLabels(Set<Long> issueIds)
LabelStore
getLabels
in interface LabelStore
issueIds
- The issue ids that the labels are linked againstCopyright © 2002-2022 Atlassian. All Rights Reserved.