public class DefaultLabelManager extends Object implements LabelManager
Constructor and Description |
---|
DefaultLabelManager(LabelStore labelStore,
IssueManager issueManager,
IssueUpdater issueUpdater,
LabelSuggester labelSuggester) |
Modifier and Type | Method and Description |
---|---|
Label |
addLabel(ApplicationUser remoteUser,
Long issueId,
Long customFieldId,
String label,
boolean sendNotification)
Adds a label to the issue and customFieldId provided.
|
Label |
addLabel(ApplicationUser remoteUser,
Long issueId,
String label,
boolean sendNotification)
Adds a label to the issue provided.
|
Set<Label> |
getCustomFieldLabels(Long issueId)
Returns all custom field labels for the given issue.
|
Map<Long,Set<Label>> |
getCustomFieldLabels(Set<Long> issueIds)
Returns all custom field labels for the given issue batch.
|
protected CustomFieldManager |
getFieldManager() |
Set<Label> |
getLabels(Long issueId)
Returns system field labels for the given issue.
|
Set<Label> |
getLabels(Long issueId,
Long customFieldId)
Returns all the labels for the given issue and custom field.
|
Set<String> |
getSuggestedLabels(ApplicationUser user,
Long issueId,
Long customFieldId,
String token)
Returns a set of label suggestions sorted alphabetically for the label custom field provided.
|
Set<String> |
getSuggestedLabels(ApplicationUser user,
Long issueId,
String token)
Returns a set of label suggestions sorted alphabetically for the labels system field.
|
Set<Long> |
removeLabelsForCustomField(Long customFieldId)
This method deletes all label entries for the custom field provided.
|
Set<Label> |
setLabels(ApplicationUser remoteUser,
Long issueId,
Long customFieldId,
Set<String> labels,
boolean sendNotification,
boolean causesChangeNotification)
Sets the labels for a particular issue and field combo to the set specified as a parameter.
|
Set<Label> |
setLabels(ApplicationUser remoteUser,
Long issueId,
Set<String> labels,
boolean sendNotification,
boolean causesChangeNotification)
Sets the labels for a particular issue to the set specified as a parameter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIdentity
public DefaultLabelManager(LabelStore labelStore, IssueManager issueManager, IssueUpdater issueUpdater, LabelSuggester labelSuggester)
protected CustomFieldManager getFieldManager()
public Set<Label> getLabels(Long issueId)
LabelManager
getLabels
in interface LabelManager
issueId
- The issue id that the label is linked againstpublic Set<Label> setLabels(ApplicationUser remoteUser, Long issueId, Set<String> labels, boolean sendNotification, boolean causesChangeNotification)
LabelManager
setLabels
in interface LabelManager
remoteUser
- The user setting labelsissueId
- The issue id that the label is linked againstlabels
- the new labels for this issuesendNotification
- true if an e-mail should be sent to users notifying them of the issue updatecausesChangeNotification
- true if a change history should be created, false otherwisepublic Set<Label> getLabels(Long issueId, Long customFieldId)
LabelManager
getLabels
in interface LabelManager
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(ApplicationUser remoteUser, Long issueId, Long customFieldId, Set<String> labels, boolean sendNotification, boolean causesChangeNotification)
LabelManager
setLabels
in interface LabelManager
remoteUser
- The user setting labelsissueId
- 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 combosendNotification
- true if an e-mail should be sent to users notifying them of the issue updatecausesChangeNotification
- true if a change history should be created, false otherwisepublic Label addLabel(ApplicationUser remoteUser, Long issueId, String label, boolean sendNotification)
LabelManager
addLabel
in interface LabelManager
remoteUser
- The user setting labelsissueId
- The issue id that the label is linked againstlabel
- The new label to add to the issuesendNotification
- true if an e-mail should be sent to users notifying them of the issue updatepublic Label addLabel(ApplicationUser remoteUser, Long issueId, Long customFieldId, String label, boolean sendNotification)
LabelManager
addLabel
in interface LabelManager
remoteUser
- The user setting labelsissueId
- The issue id that the label is linked againstcustomFieldId
- The id of the custom field to add the label tolabel
- The new label to add to the issuesendNotification
- true if an e-mail should be sent to users notifying them of the issue updatepublic Set<Long> removeLabelsForCustomField(Long customFieldId)
LabelManager
removeLabelsForCustomField
in interface LabelManager
customFieldId
- the custom field for which to delete labelspublic Set<String> getSuggestedLabels(ApplicationUser user, Long issueId, String token)
LabelManager
getSuggestedLabels
in interface LabelManager
user
- The user retrieving suggestions for the labels system fieldissueId
- The issue for which suggestions should be generated or null
token
- The search token entered by the userpublic Set<String> getSuggestedLabels(ApplicationUser user, Long issueId, Long customFieldId, String token)
LabelManager
getSuggestedLabels
in interface LabelManager
user
- The user retrieving suggestions for the labels custom fieldissueId
- The issue for which suggestions should be generated or null
customFieldId
- The label custom field to generate suggestions fortoken
- The search token entered by the userpublic Set<Label> getCustomFieldLabels(Long issueId)
LabelManager
getCustomFieldLabels
in interface LabelManager
issueId
- The issue id that the label is linked againstpublic Map<Long,Set<Label>> getCustomFieldLabels(Set<Long> issueIds)
LabelManager
getCustomFieldLabels
in interface LabelManager
issueIds
- The issue ids that the labels are linked againstCopyright © 2002-2021 Atlassian. All Rights Reserved.