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
public abstract class CreateAbstractPageCommandImpl extends AbstractServiceCommand
An abstract base class for create commands for AbstractPage subclasses such as Page or BlogPost
-
-
Field Summary
Fields Modifier and Type Field Description protected AttachmentManagerattachmentManagerprotected ContentPermissionManagercontentPermissionManagerprotected ContentPropertyManagercontentPropertyManagerprotected CreateContextProvidercontextProviderprotected AbstractPagecreatedContentWill content the content created after executeInternal has successfully completed.protected ContentEntityObjectdraftThe draft used while creating the content.protected DraftServicedraftServiceprotected DraftsTransitionHelperdraftsTransitionHelperprotected com.atlassian.event.api.EventPublishereventPublisherprotected LabelManagerlabelManagerprotected NotificationManagernotificationManagerprotected booleannotifySelfA flag indicating if the user creating the page wants to be notified about this event.protected PageManagerpageManagerprotected ContentPermissionProviderpermissionProviderprotected com.atlassian.user.UseruserThe user who is creating the page.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, ContentEntityObject draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)Deprecated.since 5.10protectedCreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, AbstractPage draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)protectedCreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, Draft draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)Deprecated.since 5.10
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidexecuteInternal()Template method for implementations to perform command execution.protected abstract AbstractPagegetContent()protected AbstractPagegetCreatedContent()protected abstract CreatedgetCreateEvent()protected voidvalidateInternal(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
-
-
-
-
Field Detail
-
pageManager
protected PageManager pageManager
-
contentPermissionManager
protected ContentPermissionManager contentPermissionManager
-
attachmentManager
protected AttachmentManager attachmentManager
-
notificationManager
protected NotificationManager notificationManager
-
eventPublisher
protected com.atlassian.event.api.EventPublisher eventPublisher
-
permissionProvider
protected ContentPermissionProvider permissionProvider
-
contextProvider
protected final CreateContextProvider contextProvider
-
draftService
protected final DraftService draftService
-
contentPropertyManager
protected final ContentPropertyManager contentPropertyManager
-
labelManager
protected final LabelManager labelManager
-
draftsTransitionHelper
protected final DraftsTransitionHelper draftsTransitionHelper
-
user
protected com.atlassian.user.User user
The user who is creating the page. This may be null if the anonymous user.
-
notifySelf
protected boolean notifySelf
A flag indicating if the user creating the page wants to be notified about this event.
-
createdContent
protected AbstractPage createdContent
Will content the content created after executeInternal has successfully completed.
-
draft
protected final ContentEntityObject draft
The draft used while creating the content.
-
-
Constructor Detail
-
CreateAbstractPageCommandImpl
@Deprecated protected CreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, Draft draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)
Deprecated.since 5.10
-
CreateAbstractPageCommandImpl
@Deprecated protected CreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, ContentEntityObject draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)
Deprecated.since 5.10
-
CreateAbstractPageCommandImpl
protected CreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, AbstractPage draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)
-
-
Method Detail
-
validateInternal
protected void validateInternal(ServiceCommandValidator validator)
Ensure that an AbstractPage has been provided and that its title is valid.- Specified by:
validateInternalin classAbstractServiceCommand
-
executeInternal
protected void executeInternal()
Description copied from class:AbstractServiceCommandTemplate 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:
executeInternalin classAbstractServiceCommand
-
getCreatedContent
protected AbstractPage getCreatedContent()
-
getContent
protected abstract AbstractPage getContent()
- Returns:
- the content to be created.
-
getCreateEvent
protected abstract Created getCreateEvent()
- Returns:
- the event to be published on successful creation
-
-