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 AttachmentManager
attachmentManager
protected ContentPermissionManager
contentPermissionManager
protected ContentPropertyManager
contentPropertyManager
protected CreateContextProvider
contextProvider
protected AbstractPage
createdContent
Will content the content created after executeInternal has successfully completed.protected ContentEntityObject
draft
The draft used while creating the content.protected DraftService
draftService
protected DraftsTransitionHelper
draftsTransitionHelper
protected com.atlassian.event.api.EventPublisher
eventPublisher
protected LabelManager
labelManager
protected NotificationManager
notificationManager
protected boolean
notifySelf
A flag indicating if the user creating the page wants to be notified about this event.protected PageManager
pageManager
protected ContentPermissionProvider
permissionProvider
protected com.atlassian.user.User
user
The user who is creating the page.
-
Constructor Summary
Constructors Modifier Constructor Description 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.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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
executeInternal()
Template method for implementations to perform command execution.protected abstract AbstractPage
getContent()
protected AbstractPage
getCreatedContent()
protected abstract Created
getCreateEvent()
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 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:
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
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
-
-