Interface AttachmentService

All Known Implementing Classes:
LegacyAttachmentServiceImpl

@Deprecated public interface AttachmentService
Deprecated.
since 7.0.1 , use ContentLabelService
  • Method Summary

    Modifier and Type
    Method
    Description
    addLabels(long attachmentId, Iterable<Label> labels)
    Deprecated.
    Adds the given labels to the specified content
    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
  • Method Details

    • getLabels

      Iterable<Label> getLabels(long attachmentId, Collection<Label.Prefix> prefixes) throws NotFoundException
      Deprecated.
      Get the labels attached to a given attachment.
      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

      Iterable<Label> addLabels(long attachmentId, Iterable<Label> labels) throws IllegalArgumentException
      Deprecated.
      Adds the given labels to the specified content
      Parameters:
      attachmentId - the id of the content to add labels to
      labels - 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

      void removeLabel(long attachmentId, long labelId) throws IllegalArgumentException
      Deprecated.
      Remove a label with labelId from the specified content
      Parameters:
      attachmentId - the id of the content to remove the label from
      labelId - the id of the label to remove
      Throws:
      IllegalArgumentException - failed to remove the label