Class CreateBlogPostCommandImpl
java.lang.Object
com.atlassian.confluence.core.service.AbstractServiceCommand
com.atlassian.confluence.content.service.page.CreateAbstractPageCommandImpl
com.atlassian.confluence.content.service.blogpost.CreateBlogPostCommandImpl
- All Implemented Interfaces:
CreateBlogPostCommand
,ServiceCommand
public class CreateBlogPostCommandImpl
extends CreateAbstractPageCommandImpl
implements CreateBlogPostCommand
An implementation of the CreatePageCommand that will create a page, and assign any provided permissions
then perform the clean up of any Drafts and raise the necessary event.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateBlogPostCommandImpl
(PageManager pageManager, SpacePermissionManager spacePermissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, com.atlassian.event.api.EventPublisher eventPublisher, BlogPostProvider blogPostProvider, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper) -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractPage
protected Created
protected boolean
Template method for implementations to perform authorization.protected void
validateInternal
(ServiceCommandValidator validator) Ensure that a page has been provided and that its title will not be a duplicate in the target space.Methods inherited from class com.atlassian.confluence.content.service.page.CreateAbstractPageCommandImpl
executeInternal, getCreatedContent
Methods inherited from class com.atlassian.confluence.core.service.AbstractServiceCommand
execute, getCurrentUser, getValidationErrors, isAuthorized, isValid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.core.service.ServiceCommand
execute, getValidationErrors, isAuthorized, isValid
-
Constructor Details
-
CreateBlogPostCommandImpl
public CreateBlogPostCommandImpl(PageManager pageManager, SpacePermissionManager spacePermissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, com.atlassian.event.api.EventPublisher eventPublisher, BlogPostProvider blogPostProvider, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper) - Since:
- 10.0
-
-
Method Details
-
validateInternal
Ensure that a page has been provided and that its title will not be a duplicate in the target space.- Overrides:
validateInternal
in classCreateAbstractPageCommandImpl
-
isAuthorizedInternal
protected boolean isAuthorizedInternal()Description copied from class:AbstractServiceCommand
Template method for implementations to perform authorization.- Specified by:
isAuthorizedInternal
in classAbstractServiceCommand
- Returns:
- true if the current user is authorized to perform this command, false otherwise
-
getContent
- Specified by:
getContent
in classCreateAbstractPageCommandImpl
- Returns:
- the content to be created.
-
getCreateEvent
- Specified by:
getCreateEvent
in classCreateAbstractPageCommandImpl
- Returns:
- the event to be published on successful creation
-
getCreatedBlogPost
- Specified by:
getCreatedBlogPost
in interfaceCreateBlogPostCommand
- Returns:
- the BlogPost that was created if the command has executed already. Null if the command has not yet executed.
-