ContentLabelService
@Deprecated @Component(value="localAttachmentService") public class LegacyAttachmentServiceImpl extends Object implements AttachmentService
Constructor and Description |
---|
LegacyAttachmentServiceImpl(AttachmentManager attachmentManager,
PermissionManager permissionManager,
LabelsService labelsService)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Iterable<Label> |
addLabels(long attachmentId,
Iterable<Label> labels)
Deprecated.
Adds the given labels to the specified content
|
Iterable<Label> |
getLabels(long attachmentId,
Collection<Label.Prefix> prefixes)
Deprecated.
Get the labels attached to a given attachment.
|
void |
removeLabel(long attachmentId,
long labelId)
Deprecated.
Remove a label with labelId from the specified content
|
@Autowired public LegacyAttachmentServiceImpl(AttachmentManager attachmentManager, PermissionManager permissionManager, LabelsService labelsService)
public Iterable<Label> getLabels(long attachmentId, Collection<Label.Prefix> prefixes) throws NotFoundException
AttachmentService
getLabels
in interface AttachmentService
attachmentId
- id of the attachment to fetch labels for.NotFoundException
- if the attachment does not exist, or is not viewable by the userpublic Iterable<Label> addLabels(long attachmentId, Iterable<Label> labels) throws IllegalArgumentException
AttachmentService
addLabels
in interface AttachmentService
attachmentId
- the id of the content to add labels tolabels
- the label(s) that will be addedIllegalArgumentException
- if at least one label is invalid. Provides an error messagepublic void removeLabel(long attachmentId, long labelId) throws IllegalArgumentException
AttachmentService
removeLabel
in interface AttachmentService
attachmentId
- the id of the content to remove the label fromlabelId
- the id of the label to removeIllegalArgumentException
- failed to remove the labelCopyright © 2003–2020 Atlassian. All rights reserved.