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
FieldsModifier and TypeFieldDescriptionprotected AttachmentManagerprotected ContentPermissionManagerprotected final ContentPropertyManagerprotected final CreateContextProviderprotected AbstractPageWill content the content created after executeInternal has successfully completed.protected final ContentEntityObjectThe draft used while creating the content.protected final DraftServiceprotected final DraftsTransitionHelperprotected com.atlassian.event.api.EventPublisherprotected final LabelManagerprotected NotificationManagerprotected booleanA flag indicating if the user creating the page wants to be notified about this event.protected PageManagerprotected ContentPermissionProviderprotected com.atlassian.user.UserThe user who is creating the page. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreateAbstractPageCommandImpl(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
Modifier and TypeMethodDescriptionprotected voidTemplate method for implementations to perform command execution.protected abstract AbstractPageprotected AbstractPageprotected abstract Createdprotected 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 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:
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
-
getContent
- Returns:
- the content to be created.
-
getCreateEvent
- Returns:
- the event to be published on successful creation
-