Class CreateAbstractPageCommandImpl
java.lang.Object
com.atlassian.confluence.core.service.AbstractServiceCommand
com.atlassian.confluence.content.service.page.CreateAbstractPageCommandImpl
- All Implemented Interfaces:
ServiceCommand
- Direct Known Subclasses:
CreateBlogPostCommandImpl
,CreatePageCommandImpl
An abstract base class for create commands for AbstractPage subclasses such as Page or BlogPost
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CreateAbstractPageCommandImpl
(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, com.atlassian.event.api.EventPublisher eventPublisher, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Template method for implementations to perform command execution.protected abstract AbstractPage
protected AbstractPage
protected abstract Created
protected void
validateInternal
(ServiceCommandValidator validator) Ensure that an AbstractPage has been provided and that its title is valid.Methods inherited from class com.atlassian.confluence.core.service.AbstractServiceCommand
execute, getCurrentUser, getValidationErrors, isAuthorized, isAuthorizedInternal, isValid
-
Constructor Details
-
CreateAbstractPageCommandImpl
protected CreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, com.atlassian.event.api.EventPublisher eventPublisher, CreateContextProvider contextProvider, ContentEntityObject draft, ConfluenceUser user, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper) - Since:
- 10.0
-
-
Method Details
-
validateInternal
Ensure that an AbstractPage has been provided and that its title is valid.- Specified by:
validateInternal
in classAbstractServiceCommand
-
executeInternal
protected void executeInternal()Description copied from class:AbstractServiceCommand
Template method for implementations to perform command execution. Implementations can assume that if this method is called, both authorization and validation have already been completed successfully.- Specified by:
executeInternal
in classAbstractServiceCommand
-
getCreatedContent
-
getContent
- Returns:
- the content to be created.
-
getCreateEvent
- Returns:
- the event to be published on successful creation
-