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
-
Field Summary
Modifier and TypeFieldDescriptionprotected AttachmentManager
protected ContentPermissionManager
protected final ContentPropertyManager
protected final CreateContextProvider
protected AbstractPage
Will content the content created after executeInternal has successfully completed.protected final ContentEntityObject
The draft used while creating the content.protected final DraftService
protected final DraftsTransitionHelper
protected com.atlassian.event.api.EventPublisher
protected final LabelManager
protected NotificationManager
protected boolean
A flag indicating if the user creating the page wants to be notified about this event.protected PageManager
protected ContentPermissionProvider
protected com.atlassian.user.User
The user who is creating the page. -
Constructor Summary
ModifierConstructorDescriptionprotected
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.10protected
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) 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 -
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
-
Field Details
-
pageManager
-
contentPermissionManager
-
attachmentManager
-
notificationManager
-
eventPublisher
protected com.atlassian.event.api.EventPublisher eventPublisher -
permissionProvider
-
contextProvider
-
draftService
-
contentPropertyManager
-
labelManager
-
draftsTransitionHelper
-
user
protected com.atlassian.user.User userThe user who is creating the page. This may be null if the anonymous user. -
notifySelf
protected boolean notifySelfA flag indicating if the user creating the page wants to be notified about this event. -
createdContent
Will content the content created after executeInternal has successfully completed. -
draft
The draft used while creating the content.
-
-
Constructor Details
-
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 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
-