|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.label.CachingLabelStore
public class CachingLabelStore
Caching implementation of the Label store, that caches labels in a weakhashmap based on the issue/field combination.
Constructor Summary | |
---|---|
CachingLabelStore(OfBizLabelStore delegateStore,
com.atlassian.event.api.EventPublisher eventPublisher)
|
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 |
onClearCache(ClearCacheEvent event)
|
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. |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingLabelStore(OfBizLabelStore delegateStore, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public void start() throws java.lang.Exception
Startable
start
in interface Startable
java.lang.Exception
- Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public java.util.Set<Label> getLabels(java.lang.Long issueId, java.lang.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 java.util.Set<Label> setLabels(java.lang.Long issueId, java.lang.Long customFieldId, java.util.Set<java.lang.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 combo
public Label addLabel(java.lang.Long issueId, java.lang.Long customFieldId, java.lang.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 add
public void removeLabel(java.lang.Long labelId, java.lang.Long issueId, java.lang.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 java.util.Set<java.lang.Long> removeLabelsForCustomField(java.lang.Long customFieldId)
LabelStore
removeLabelsForCustomField
in interface LabelStore
customFieldId
- The custom field id for which to delete labels
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |