com.atlassian.confluence.ui.rest.service.content
Class TemplateServiceImpl
java.lang.Object
com.atlassian.confluence.ui.rest.service.content.TemplateServiceImpl
- All Implemented Interfaces:
- TemplateService
public class TemplateServiceImpl
- extends java.lang.Object
- implements TemplateService
Method Summary |
java.lang.Iterable<Label> |
addLabels(long pageTemplateId,
java.lang.Iterable<Label> labels)
Adds the given labels to the specified content |
java.lang.Iterable<Label> |
getLabels(long pageTemplateId,
java.util.Collection<Label.Prefix> prefixes)
Get the labels attached to a given page template |
void |
removeLabel(long pageTemplateId,
long labelId)
Remove a label with labelId from the specified content |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplateServiceImpl
public TemplateServiceImpl(PageTemplateManager pageTemplateManager,
PermissionManager permissionManager,
LabelsService labelsService)
getLabels
public java.lang.Iterable<Label> getLabels(long pageTemplateId,
java.util.Collection<Label.Prefix> prefixes)
throws NotFoundException
- Description copied from interface:
TemplateService
- Get the labels attached to a given page template
- Specified by:
getLabels
in interface TemplateService
- Parameters:
pageTemplateId
- id of the page template to fetch labels for.
- Throws:
NotFoundException
- if the page template does not exist, or is not viewable by the user
addLabels
public java.lang.Iterable<Label> addLabels(long pageTemplateId,
java.lang.Iterable<Label> labels)
throws java.lang.IllegalArgumentException
- Description copied from interface:
TemplateService
- Adds the given labels to the specified content
- Specified by:
addLabels
in interface TemplateService
- Parameters:
pageTemplateId
- 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:
java.lang.IllegalArgumentException
- if at least one label is invalid. Provides an error message
removeLabel
public void removeLabel(long pageTemplateId,
long labelId)
throws java.lang.IllegalArgumentException
- Description copied from interface:
TemplateService
- Remove a label with labelId from the specified content
- Specified by:
removeLabel
in interface TemplateService
- Parameters:
pageTemplateId
- the id of the content to remove the label fromlabelId
- the id of the label to remove
- Throws:
java.lang.IllegalArgumentException
- failed to remove the label
Copyright © 2003-2014 Atlassian. All Rights Reserved.