Interface BlogPostService

  • All Known Implementing Classes:
    DefaultBlogPostService

    public interface BlogPostService
    A service that provides methods to retrieve service commands to manipulate blog posts
    • Method Detail

      • newDeleteBlogPostCommand

        ServiceCommand newDeleteBlogPostCommand​(BlogPostLocator blogPostLocator)
        Retrieve a command to remove an existing blog post
      • getIdBlogPostLocator

        BlogPostLocator getIdBlogPostLocator​(long pageId)
        Creates a blogpost locator that can locate a blogpost based on its id.
      • newRevertBlogPostCommand

        ServiceCommand newRevertBlogPostCommand​(BlogPostLocator blogPostToRevert,
                                                int version,
                                                String revertComment,
                                                boolean revertTitle)
        Retrieve a command to revert a blogpost
      • newCreateBlogPostCommand

        ServiceCommand newCreateBlogPostCommand​(BlogPostProvider provider,
                                                ContentPermissionProvider permissionProvider,
                                                CreateContextProvider contextProvider,
                                                BlogPost draft,
                                                com.atlassian.user.User user,
                                                boolean notifySelf)
        Parameters:
        provider - an object that can provide a BlogPost to the command
        permissionProvider - an object that can provide the permissions for the blog post
        contextProvider - an object that can provide a context to be included when publishing the blog post creation event
        draft -
        user - the user creating this blog post or null if the anonymous user
        notifySelf - a flag indicating whether the user themselves should be notified about this creation.
        Returns:
        the CreateBlogPostCommand.
      • newCreateBlogPostCommand

        ServiceCommand newCreateBlogPostCommand​(BlogPostProvider provider,
                                                ContentPermissionProvider permissionProvider,
                                                CreateContextProvider contextProvider,
                                                ContentEntityObject draft,
                                                com.atlassian.user.User user,
                                                boolean notifySelf)
        Parameters:
        provider - an object that can provide a BlogPost to the command
        permissionProvider - an object that can provide the permissions for the blog post
        contextProvider - an object that can provide a context to be included when publishing the blog post creation event
        draft -
        user - the user creating this blog post or null if the anonymous user
        notifySelf - a flag indicating whether the user themselves should be notified about this creation.
        Returns:
        the CreateBlogPostCommand.
      • newCreateBlogPostCommand

        ServiceCommand newCreateBlogPostCommand​(BlogPostProvider provider,
                                                ContentPermissionProvider permissionProvider,
                                                CreateContextProvider contextProvider,
                                                Draft draft,
                                                com.atlassian.user.User user,
                                                boolean notifySelf)
        Parameters:
        provider - an object that can provide a BlogPost to the command
        permissionProvider - an object that can provide the permissions for the blog post
        contextProvider - an object that can provide a context to be included when publishing the blog post creation event
        draft -
        user - the user creating this blog post or null if the anonymous user
        notifySelf - a flag indicating whether the user themselves should be notified about this creation.
        Returns:
        the CreateBlogPostCommand.
      • newMoveBlogPostCommand

        ServiceCommand newMoveBlogPostCommand​(BlogPostLocator blogPostLocator,
                                              SpaceLocator targetSpaceLocator)
        Creates a new ServiceCommand for moving an existing BlogPost.
        Parameters:
        blogPostLocator - provides the BlogPost to the command
        targetSpaceLocator - provides the target space to the command
      • newRemoveBlogPostVersionCommand

        ServiceCommand newRemoveBlogPostVersionCommand​(BlogPostLocator blogPostLocator)
        Parameters:
        blogPostLocator - provides the BlogPost version to the command
        Returns:
        a command to remove a version of a blog post.