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.
|
protected CustomFieldManager |
getFieldManager() |
Set<Label> |
getLabels(Long issueId)
Returns all the 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.
|
public DefaultLabelManager(LabelStore labelStore, IssueManager issueManager, IssueUpdater issueUpdater, LabelSuggester labelSuggester)
protected CustomFieldManager getFieldManager()
public Set<Label> getLabels(Long issueId)
LabelManagergetLabels in interface LabelManagerissueId - The issue id that the label is linked againstpublic Set<Label> setLabels(ApplicationUser remoteUser, Long issueId, Set<String> labels, boolean sendNotification, boolean causesChangeNotification)
LabelManagersetLabels in interface LabelManagerremoteUser - 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)
LabelManagergetLabels in interface LabelManagerissueId - 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)
LabelManagersetLabels in interface LabelManagerremoteUser - 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)
LabelManageraddLabel in interface LabelManagerremoteUser - 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)
LabelManageraddLabel in interface LabelManagerremoteUser - 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)
LabelManagerremoveLabelsForCustomField in interface LabelManagercustomFieldId - the custom field for which to delete labelspublic Set<String> getSuggestedLabels(ApplicationUser user, Long issueId, String token)
LabelManagergetSuggestedLabels in interface LabelManageruser - The user retrieving suggestions for the labels system fieldissueId - The issue for which suggestions should be generated or nulltoken - The search token entered by the userpublic Set<String> getSuggestedLabels(ApplicationUser user, Long issueId, Long customFieldId, String token)
LabelManagergetSuggestedLabels in interface LabelManageruser - The user retrieving suggestions for the labels custom fieldissueId - The issue for which suggestions should be generated or nullcustomFieldId - The label custom field to generate suggestions fortoken - The search token entered by the userCopyright © 2002-2019 Atlassian. All Rights Reserved.