com.atlassian.confluence.legacyapi.service.content
Interface AttachmentService

All Known Implementing Classes:
AttachmentServiceImpl

public interface AttachmentService


Method Summary
 java.lang.Iterable<Label> addLabels(long attachmentId, java.lang.Iterable<Label> labels)
          Adds the given labels to the specified content
 java.lang.Iterable<Label> getLabels(long attachmentId, java.util.Collection<Label.Prefix> prefixes)
          Get the labels attached to a given attachment.
 void removeLabel(long attachmentId, long labelId)
          Remove a label with labelId from the specified content
 

Method Detail

getLabels

java.lang.Iterable<Label> getLabels(long attachmentId,
                                    java.util.Collection<Label.Prefix> prefixes)
                                    throws NotFoundException
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

java.lang.Iterable<Label> addLabels(long attachmentId,
                                    java.lang.Iterable<Label> labels)
                                    throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException - if at least one label is invalid. Provides an error message

removeLabel

void removeLabel(long attachmentId,
                 long labelId)
                 throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException - failed to remove the label


Copyright © 2003-2014 Atlassian. All Rights Reserved.