|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentService
Basic service for managing Confluence content.
Method Summary | |
---|---|
java.lang.Iterable<Label> |
addLabels(long contentId,
java.lang.Iterable<Label> labels)
Adds the given labels to the specified content |
com.atlassian.fugue.Option<Content> |
find(ContentLocator locator,
Expansion... expansions)
Retrieve a piece of content by some more complex criteria (defined by the ContentLocator). |
com.atlassian.fugue.Option<Content> |
findById(long id,
Expansion... expansions)
Retrieve a piece of content by its ID. |
com.atlassian.fugue.Option<Content> |
findCurrentVersion(long id,
Expansion... expansions)
Retrieve the next version of a piece of content, if it exists |
com.atlassian.fugue.Option<Content> |
findNextVersion(long id,
Expansion... expansions)
Retrieve the next version of a piece of content, if it exists |
com.atlassian.fugue.Option<Content> |
findPreviousVersion(long id,
Expansion... expansions)
Retrieve the next version of a piece of content, if it exists |
PartialList<Content> |
findSubContent(long id,
ContentType subContentType,
int offset,
int count,
Expansion... expansions)
Retrieve content that is "contained within" some other piece of content (i.e. |
PartialList<ContentTree> |
findSubContentTree(long parentId,
ContentType subContentType,
Expansion... expansions)
Retrieve content that is "contained within" some other piece of content (i.e. |
ContentBody |
getContentBody(long contentId,
ContentRepresentation contentRepresentation)
Get the body of a piece of content in a given representation |
java.lang.Iterable<Label> |
getLabels(long contentId,
java.util.Collection<Label.Prefix> prefixes)
Get the labels attached to a given piece of content in the given namespaces |
java.lang.String |
getThemeKey(long contentId)
Temporary method to check whether the page/blog post represented by contentId uses a theme that the new stack can render. |
boolean |
hasCustomLayout(java.lang.String spaceKey)
Temporary method to check whether a space has custom layouts applied to it |
void |
removeLabel(long contentId,
long labelId)
Remove a label with labelId from the specified content |
ContentBody |
updateContentBody(long contentId,
ContentRepresentation contentRepresentation,
ContentBody body)
Update the body of a given piece of content (i.e. |
java.lang.Iterable<Label> |
validateLabels(java.lang.Iterable<Label> labels)
Validates the list of labels |
Method Detail |
---|
com.atlassian.fugue.Option<Content> findById(long id, Expansion... expansions)
id
- the id of the content to retrieve.
com.atlassian.fugue.Option<Content> findNextVersion(long id, Expansion... expansions)
id
- the id of the content in question
com.atlassian.fugue.Option<Content> findPreviousVersion(long id, Expansion... expansions)
id
- the id of the content in question
com.atlassian.fugue.Option<Content> findCurrentVersion(long id, Expansion... expansions)
id
- the id of the content in question
com.atlassian.fugue.Option<Content> find(ContentLocator locator, Expansion... expansions)
locator
- the locator containing the criteria for the content you are looking for
PartialList<Content> findSubContent(long id, ContentType subContentType, int offset, int count, Expansion... expansions)
PartialList<ContentTree> findSubContentTree(long parentId, ContentType subContentType, Expansion... expansions)
ContentBody getContentBody(long contentId, ContentRepresentation contentRepresentation) throws NotFoundException, InvalidRepresentationException
contentId
- The ID of the content to look upcontentRepresentation
- the format in which to render the content body
NotFoundException
- if the content does not exist, or is not viewable by the user
InvalidRepresentationException
- if the content can not be provided in the requested representationContentBody updateContentBody(long contentId, ContentRepresentation contentRepresentation, ContentBody body) throws NotFoundException, InvalidRepresentationException, NotPermittedException
contentId
- the ID of the content to editcontentRepresentation
- the way the content is represented in the bodybody
- the new body for the given content
NotFoundException
- if the content does not exist, or is not viewable by the user
NotPermittedException
- if the current user does not have permission to update the content
InvalidRepresentationException
- if the content can not be provided in the requested representationjava.lang.Iterable<Label> getLabels(long contentId, java.util.Collection<Label.Prefix> prefixes) throws NotFoundException
contentId
- the id of the content to retrieve
NotFoundException
- if the content does not exist, or is not viewable by the userjava.lang.Iterable<Label> addLabels(long contentId, java.lang.Iterable<Label> labels) throws java.lang.IllegalArgumentException
contentId
- the id of the content to add labels tolabels
- the label(s) that will be added
java.lang.IllegalArgumentException
- if at least one label is invalid. Provides an error messagevoid removeLabel(long contentId, long labelId) throws java.lang.IllegalArgumentException
contentId
- the id of the content to remove the label fromlabelId
- the id of the label to remove
java.lang.IllegalArgumentException
- failed to remove the labeljava.lang.Iterable<Label> validateLabels(java.lang.Iterable<Label> labels) throws java.lang.IllegalArgumentException
labels
- the list of labels to validate
java.lang.IllegalArgumentException
- if at least one label is invalid. Provides an error messagejava.lang.String getThemeKey(long contentId)
boolean hasCustomLayout(java.lang.String spaceKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |