Class LegacyContentServiceImpl
java.lang.Object
com.atlassian.confluence.ui.rest.service.content.LegacyContentServiceImpl
- All Implemented Interfaces:
ContentService
@Deprecated
@Component("localContentService")
public class LegacyContentServiceImpl
extends Object
implements ContentService
Deprecated.
-
Constructor Summary
ConstructorsConstructorDescriptionLegacyContentServiceImpl
(PageManager pageManager, CommentManager commentManager, ContentEntityManager contentEntityManager, PermissionManager permissionManager, LegacyContentBuilder contentBuilder, LegacyContentBodyBuilder contentBodyBuilder, FormatConverter formatConverter, ThemeManager themeManager, CustomLayoutManager customLayoutManager, LabelsService labelsService) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Adds the given labels to the specified contentcom.atlassian.fugue.Option<Content>
find
(ContentLocator locator, Expansion... expansions) Deprecated.Retrieve a piece of content by some more complex criteria (defined by the ContentLocator).com.atlassian.fugue.Option<Content>
Deprecated.Retrieve a piece of content by its ID.com.atlassian.fugue.Option<Content>
findCurrentVersion
(long id, Expansion... expansions) Deprecated.Retrieve the next version of a piece of content, if it existscom.atlassian.fugue.Option<Content>
findNextVersion
(long id, Expansion... expansions) Deprecated.Retrieve the next version of a piece of content, if it existscom.atlassian.fugue.Option<Content>
findPreviousVersion
(long id, Expansion... expansions) Deprecated.Retrieve the next version of a piece of content, if it existsfindSubContent
(long id, ContentType subContentType, int offset, int count, Expansion... expansions) Deprecated.Retrieve content that is "contained within" some other piece of content (i.e.findSubContentTree
(long parentId, ContentType subContentType, Expansion... expansions) Deprecated.Retrieve content that is "contained within" some other piece of content (i.e.getContentBody
(long contentId, ContentRepresentation contentRepresentation) Deprecated.Get the body of a piece of content in a given representationgetLabels
(long contentId, Collection<Label.Prefix> prefixes) Deprecated.Get the labels attached to a given piece of content in the given namespacesgetThemeKey
(long contentId) Deprecated.Temporary method to check whether the page/blog post represented by contentId uses a theme that the new stack can render.boolean
hasCustomLayout
(String spaceKey) Deprecated.Temporary method to check whether a space has custom layouts applied to itvoid
removeLabel
(long contentId, long labelId) Deprecated.Remove a label with labelId from the specified contentupdateContentBody
(long contentId, ContentRepresentation contentRepresentation, ContentBody body) Deprecated.Update the body of a given piece of content (i.e.validateLabels
(Iterable<Label> labels) Deprecated.Validates the list of labels
-
Constructor Details
-
LegacyContentServiceImpl
@Autowired public LegacyContentServiceImpl(PageManager pageManager, CommentManager commentManager, @Qualifier("contentEntityManager") ContentEntityManager contentEntityManager, PermissionManager permissionManager, LegacyContentBuilder contentBuilder, LegacyContentBodyBuilder contentBodyBuilder, FormatConverter formatConverter, ThemeManager themeManager, CustomLayoutManager customLayoutManager, LabelsService labelsService) Deprecated.
-
-
Method Details
-
findById
Deprecated.Description copied from interface:ContentService
Retrieve a piece of content by its ID.- Specified by:
findById
in interfaceContentService
- Parameters:
id
- the id of the content to retrieve.- Returns:
- the content, if any exists by this ID and optional type restriction, or none otherwise.
-
findNextVersion
Deprecated.Description copied from interface:ContentService
Retrieve the next version of a piece of content, if it exists- Specified by:
findNextVersion
in interfaceContentService
- Parameters:
id
- the id of the content in question- Returns:
- the next version of the content, if it exists
-
findPreviousVersion
Deprecated.Description copied from interface:ContentService
Retrieve the next version of a piece of content, if it exists- Specified by:
findPreviousVersion
in interfaceContentService
- Parameters:
id
- the id of the content in question- Returns:
- the previous version of the content, if it exists
-
findCurrentVersion
Deprecated.Description copied from interface:ContentService
Retrieve the next version of a piece of content, if it exists- Specified by:
findCurrentVersion
in interfaceContentService
- Parameters:
id
- the id of the content in question- Returns:
- the current version of the content, if it exists
-
find
Deprecated.Description copied from interface:ContentService
Retrieve a piece of content by some more complex criteria (defined by the ContentLocator).- Specified by:
find
in interfaceContentService
- Parameters:
locator
- the locator containing the criteria for the content you are looking for- Returns:
- the content, if one exists matching the criteria, or none otherwise.
-
findSubContent
public PartialList<Content> findSubContent(long id, ContentType subContentType, int offset, int count, Expansion... expansions) Deprecated.Description copied from interface:ContentService
Retrieve content that is "contained within" some other piece of content (i.e. comments attached to a page).- Specified by:
findSubContent
in interfaceContentService
-
findSubContentTree
public PartialList<ContentTree> findSubContentTree(long parentId, ContentType subContentType, Expansion... expansions) Deprecated.Description copied from interface:ContentService
Retrieve content that is "contained within" some other piece of content (i.e. comments attached to a page), returned as a tree of parent/child content to a given depth. Any expansions are applied to every node of the tree. This method should have some kind of depth sanity, but I can't think how...- Specified by:
findSubContentTree
in interfaceContentService
-
getContentBody
public ContentBody getContentBody(long contentId, ContentRepresentation contentRepresentation) throws NotFoundException, InvalidRepresentationException Deprecated.Description copied from interface:ContentService
Get the body of a piece of content in a given representation- Specified by:
getContentBody
in interfaceContentService
- Parameters:
contentId
- The ID of the content to look upcontentRepresentation
- the format in which to render the content body- Returns:
- the requested content body
- Throws:
NotFoundException
- if the content does not exist, or is not viewable by the userInvalidRepresentationException
- if the content can not be provided in the requested representation
-
updateContentBody
public ContentBody updateContentBody(long contentId, ContentRepresentation contentRepresentation, ContentBody body) throws NotFoundException, InvalidRepresentationException, NotPermittedException Deprecated.Description copied from interface:ContentService
Update the body of a given piece of content (i.e. perform an edit)- Specified by:
updateContentBody
in interfaceContentService
- Parameters:
contentId
- the ID of the content to editcontentRepresentation
- the way the content is represented in the bodybody
- the new body for the given content- Throws:
NotFoundException
- if the content does not exist, or is not viewable by the userInvalidRepresentationException
- if the content can not be provided in the requested representationNotPermittedException
- if the current user does not have permission to update the content
-
getLabels
public Iterable<Label> getLabels(long contentId, Collection<Label.Prefix> prefixes) throws NotFoundException Deprecated.Description copied from interface:ContentService
Get the labels attached to a given piece of content in the given namespaces- Specified by:
getLabels
in interfaceContentService
- Parameters:
contentId
- the id of the content to retrieve- Throws:
NotFoundException
- if the content does not exist, or is not viewable by the user
-
addLabels
public Iterable<Label> addLabels(long contentId, Iterable<Label> labels) throws IllegalArgumentException Deprecated.Description copied from interface:ContentService
Adds the given labels to the specified content- Specified by:
addLabels
in interfaceContentService
- Parameters:
contentId
- 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:
IllegalArgumentException
- if at least one label is invalid. Provides an error message
-
removeLabel
Deprecated.Description copied from interface:ContentService
Remove a label with labelId from the specified content- Specified by:
removeLabel
in interfaceContentService
- Parameters:
contentId
- the id of the content to remove the label fromlabelId
- the id of the label to remove- Throws:
IllegalArgumentException
- failed to remove the label
-
validateLabels
Deprecated.Description copied from interface:ContentService
Validates the list of labels- Specified by:
validateLabels
in interfaceContentService
- Parameters:
labels
- the list of labels to validate- Returns:
- the list of labels iff all labels are valid
- Throws:
IllegalArgumentException
- if at least one label is invalid. Provides an error message
-
getThemeKey
Deprecated.Description copied from interface:ContentService
Temporary method to check whether the page/blog post represented by contentId uses a theme that the new stack can render.- Specified by:
getThemeKey
in interfaceContentService
- Returns:
- String of the form "pluginKey:moduleKey" if the content represents a page/blog post, null otherwise
-
hasCustomLayout
Deprecated.Description copied from interface:ContentService
Temporary method to check whether a space has custom layouts applied to it- Specified by:
hasCustomLayout
in interfaceContentService
-
ContentService