public class ContentLabelsResource extends Object
ContentLabelService
.Constructor and Description |
---|
ContentLabelsResource(ContentLabelService contentLabelService) |
Modifier and Type | Method and Description |
---|---|
PageResponse<Label> |
addLabels(ContentId contentId,
String labels)
Adds a list of labels to the specified content.
|
javax.ws.rs.core.Response |
deleteLabel(ContentId contentId,
String label)
Deletes a labels to the specified content.
|
javax.ws.rs.core.Response |
deleteLabelWithQueryParam(ContentId contentId,
String label)
Deletes a labels to the specified content.
|
PageResponse<Label> |
labels(ContentId contentId,
List<String> prefixes,
int start,
int limit,
javax.ws.rs.core.UriInfo uriInfo)
Returns the list of labels on a piece of Content.
|
public ContentLabelsResource(ContentLabelService contentLabelService)
@PublicApi public PageResponse<Label> labels(ContentId contentId, List<String> prefixes, int start, int limit, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException
Returns the list of labels on a piece of Content.
Example request URI(s):
http://example.com/rest/api/content/1234/label
http://example.com/rest/api/content/1234/label?prefix=global&start=0&limit=200
contentId
- a string containing the id of the labels content containerprefixes
- the prefixes to filter the labels with Label.Prefix
start
- the start point of the collection to returnlimit
- the limit of the number of labels to return, this may be restricted by fixed system limitsuriInfo
- (injected) information about the request URIServiceException
@PublicApi public PageResponse<Label> addLabels(ContentId contentId, String labels) throws ServiceException
Adds a list of labels to the specified content.
The body is the json representation of the list.
contentId
- A string containing the id of the labels content containerlabels
- a single label object or a list of labels to addServiceException
@PublicApi public javax.ws.rs.core.Response deleteLabel(ContentId contentId, String label) throws ServiceException
Deletes a labels to the specified content. When calling this method through REST the label parameter doesn't accept "/" characters in label names, because of security constraints. For this case please use the query parameter version of this method (/content/{id}/label?name={label}
contentId
- A string containing the id of the labels content containerlabel
- the name of the label to be removed from the contentServiceException
@PublicApi public javax.ws.rs.core.Response deleteLabelWithQueryParam(ContentId contentId, String label) throws ServiceException
Deletes a labels to the specified content.
contentId
- A string containing the id of the labels content containerlabel
- the name of the label to be removed from the contentServiceException
Copyright © 2003–2015 Atlassian. All rights reserved.