Class LegacyAttachmentServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.ui.rest.service.content.LegacyAttachmentServiceImpl
-
- All Implemented Interfaces:
AttachmentService
@Deprecated @Component("localAttachmentService") public class LegacyAttachmentServiceImpl extends Object implements AttachmentService
Deprecated.since 7.0.1 , useContentLabelService
-
-
Constructor Summary
Constructors Constructor Description LegacyAttachmentServiceImpl(AttachmentManager attachmentManager, PermissionManager permissionManager, LabelsService labelsService)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Iterable<Label>addLabels(long attachmentId, Iterable<Label> labels)Deprecated.Adds the given labels to the specified contentIterable<Label>getLabels(long attachmentId, Collection<Label.Prefix> prefixes)Deprecated.Get the labels attached to a given attachment.voidremoveLabel(long attachmentId, long labelId)Deprecated.Remove a label with labelId from the specified content
-
-
-
Constructor Detail
-
LegacyAttachmentServiceImpl
@Autowired public LegacyAttachmentServiceImpl(AttachmentManager attachmentManager, PermissionManager permissionManager, LabelsService labelsService)
Deprecated.
-
-
Method Detail
-
getLabels
public Iterable<Label> getLabels(long attachmentId, Collection<Label.Prefix> prefixes) throws NotFoundException
Deprecated.Description copied from interface:AttachmentServiceGet the labels attached to a given attachment.- Specified by:
getLabelsin interfaceAttachmentService- Parameters:
attachmentId- id of the attachment to fetch labels for.- Throws:
NotFoundException- if the attachment does not exist, or is not viewable by the user
-
addLabels
public Iterable<Label> addLabels(long attachmentId, Iterable<Label> labels) throws IllegalArgumentException
Deprecated.Description copied from interface:AttachmentServiceAdds the given labels to the specified content- Specified by:
addLabelsin interfaceAttachmentService- Parameters:
attachmentId- the id of the content to add labels tolabels- the label(s) that will be added- Returns:
- all the labels that are associated with the specified content
- Throws:
IllegalArgumentException- if at least one label is invalid. Provides an error message
-
removeLabel
public void removeLabel(long attachmentId, long labelId) throws IllegalArgumentExceptionDeprecated.Description copied from interface:AttachmentServiceRemove a label with labelId from the specified content- Specified by:
removeLabelin interfaceAttachmentService- Parameters:
attachmentId- the id of the content to remove the label fromlabelId- the id of the label to remove- Throws:
IllegalArgumentException- failed to remove the label
-
-