ContentService@Deprecated @Component(value="localContentService") public class LegacyContentServiceImpl extends Object implements ContentService
| Constructor and Description | 
|---|
| LegacyContentServiceImpl(PageManager pageManager,
                        CommentManager commentManager,
                        ContentEntityManager contentEntityManager,
                        PermissionManager permissionManager,
                        LegacyContentBuilder contentBuilder,
                        LegacyContentBodyBuilder contentBodyBuilder,
                        FormatConverter formatConverter,
                        ThemeManager themeManager,
                        CustomLayoutManager customLayoutManager,
                        LabelsService labelsService)Deprecated.  | 
| Modifier and Type | Method and Description | 
|---|---|
| Iterable<Label> | addLabels(long contentId,
         Iterable<Label> labels)Deprecated.  Adds the given labels to the specified content | 
| com.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> | findById(long id,
        Expansion... expansions)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 exists | 
| com.atlassian.fugue.Option<Content> | findNextVersion(long id,
               Expansion... expansions)Deprecated.  Retrieve the next version of a piece of content, if it exists | 
| com.atlassian.fugue.Option<Content> | findPreviousVersion(long id,
                   Expansion... expansions)Deprecated.  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)Deprecated.  Retrieve content that is "contained within" some other piece of content (i.e. | 
| PartialList<ContentTree> | findSubContentTree(long parentId,
                  ContentType subContentType,
                  Expansion... expansions)Deprecated.  Retrieve content that is "contained within" some other piece of content (i.e. | 
| ContentBody | getContentBody(long contentId,
              ContentRepresentation contentRepresentation)Deprecated.  Get the body of a piece of content in a given representation | 
| Iterable<Label> | getLabels(long contentId,
         Collection<Label.Prefix> prefixes)Deprecated.  Get the labels attached to a given piece of content in the given namespaces | 
| String | getThemeKey(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 it | 
| void | removeLabel(long contentId,
           long labelId)Deprecated.  Remove a label with labelId from the specified content | 
| ContentBody | updateContentBody(long contentId,
                 ContentRepresentation contentRepresentation,
                 ContentBody body)Deprecated.  Update the body of a given piece of content (i.e. | 
| Iterable<Label> | validateLabels(Iterable<Label> labels)Deprecated.  Validates the list of labels | 
@Autowired public LegacyContentServiceImpl(PageManager pageManager, CommentManager commentManager, @Qualifier(value="contentEntityManager") ContentEntityManager contentEntityManager, PermissionManager permissionManager, LegacyContentBuilder contentBuilder, LegacyContentBodyBuilder contentBodyBuilder, FormatConverter formatConverter, ThemeManager themeManager, CustomLayoutManager customLayoutManager, LabelsService labelsService)
public com.atlassian.fugue.Option<Content> findById(long id, Expansion... expansions)
ContentServicefindById in interface ContentServiceid - the id of the content to retrieve.public com.atlassian.fugue.Option<Content> findNextVersion(long id, Expansion... expansions)
ContentServicefindNextVersion in interface ContentServiceid - the id of the content in questionpublic com.atlassian.fugue.Option<Content> findPreviousVersion(long id, Expansion... expansions)
ContentServicefindPreviousVersion in interface ContentServiceid - the id of the content in questionpublic com.atlassian.fugue.Option<Content> findCurrentVersion(long id, Expansion... expansions)
ContentServicefindCurrentVersion in interface ContentServiceid - the id of the content in questionpublic com.atlassian.fugue.Option<Content> find(ContentLocator locator, Expansion... expansions)
ContentServicefind in interface ContentServicelocator - the locator containing the criteria for the content you are looking forpublic PartialList<Content> findSubContent(long id, ContentType subContentType, int offset, int count, Expansion... expansions)
ContentServicefindSubContent in interface ContentServicepublic PartialList<ContentTree> findSubContentTree(long parentId, ContentType subContentType, Expansion... expansions)
ContentServicefindSubContentTree in interface ContentServicepublic ContentBody getContentBody(long contentId, ContentRepresentation contentRepresentation) throws NotFoundException, InvalidRepresentationException
ContentServicegetContentBody in interface ContentServicecontentId - The ID of the content to look upcontentRepresentation - the format in which to render the content bodyNotFoundException - if the content does not exist, or is not viewable by the userInvalidRepresentationException - if the content can not be provided in the requested representationpublic ContentBody updateContentBody(long contentId, ContentRepresentation contentRepresentation, ContentBody body) throws NotFoundException, InvalidRepresentationException, NotPermittedException
ContentServiceupdateContentBody in interface ContentServicecontentId - the ID of the content to editcontentRepresentation - the way the content is represented in the bodybody - the new body for the given contentNotFoundException - 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 contentpublic Iterable<Label> getLabels(long contentId, Collection<Label.Prefix> prefixes) throws NotFoundException
ContentServicegetLabels in interface ContentServicecontentId - the id of the content to retrieveNotFoundException - if the content does not exist, or is not viewable by the userpublic Iterable<Label> addLabels(long contentId, Iterable<Label> labels) throws IllegalArgumentException
ContentServiceaddLabels in interface ContentServicecontentId - the id of the content to add labels tolabels - the label(s) that will be addedIllegalArgumentException - if at least one label is invalid. Provides an error messagepublic void removeLabel(long contentId,
                        long labelId)
                 throws IllegalArgumentException
ContentServiceremoveLabel in interface ContentServicecontentId - the id of the content to remove the label fromlabelId - the id of the label to removeIllegalArgumentException - failed to remove the labelpublic Iterable<Label> validateLabels(Iterable<Label> labels) throws IllegalArgumentException
ContentServicevalidateLabels in interface ContentServicelabels - the list of labels to validateIllegalArgumentException - if at least one label is invalid. Provides an error messagepublic String getThemeKey(long contentId)
ContentServicegetThemeKey in interface ContentServicepublic boolean hasCustomLayout(String spaceKey)
ContentServicehasCustomLayout in interface ContentServiceCopyright © 2003–2020 Atlassian. All rights reserved.