Class CreatePageCommandImpl
- java.lang.Object
-
- com.atlassian.confluence.core.service.AbstractServiceCommand
-
- com.atlassian.confluence.content.service.page.CreateAbstractPageCommandImpl
-
- com.atlassian.confluence.content.service.page.CreatePageCommandImpl
-
- All Implemented Interfaces:
CreatePageCommand,ServiceCommand
- Direct Known Subclasses:
CreatePageFromExistingCommandImpl
public class CreatePageCommandImpl extends CreateAbstractPageCommandImpl implements CreatePageCommand
An implementation of the CreatePageCommand that will create a page, and assign any provided permissions then perform the clean up of any Drafts and raise the necessary event.
-
-
Field Summary
Fields Modifier and Type Field Description protected PermissionManagerpermissionManager-
Fields inherited from class com.atlassian.confluence.content.service.page.CreateAbstractPageCommandImpl
attachmentManager, contentPermissionManager, contentPropertyManager, contextProvider, createdContent, draft, draftService, draftsTransitionHelper, eventPublisher, labelManager, notificationManager, notifySelf, pageManager, permissionProvider, user
-
-
Constructor Summary
Constructors Constructor Description CreatePageCommandImpl(PageManager pageManager, PermissionManager permissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, PageProvider pageProvider, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, ContentEntityObject draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)Deprecated.since 5.10CreatePageCommandImpl(PageManager pageManager, PermissionManager permissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, PageProvider pageProvider, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, Draft draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)Deprecated.since 5.10CreatePageCommandImpl(PageManager pageManager, PermissionManager permissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, PageProvider pageProvider, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, Page draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractPagegetContent()PagegetCreatedPage()protected CreatedgetCreateEvent()protected booleanisAuthorizedInternal()Template method for implementations to perform authorization.protected voidvalidateInternal(ServiceCommandValidator validator)Ensure that a page has been provided and that its title will not be a duplicate in the target space.-
Methods inherited from class com.atlassian.confluence.content.service.page.CreateAbstractPageCommandImpl
executeInternal, getCreatedContent
-
Methods inherited from class com.atlassian.confluence.core.service.AbstractServiceCommand
execute, getCurrentUser, getValidationErrors, isAuthorized, isValid
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.core.service.ServiceCommand
execute, getValidationErrors, isAuthorized, isValid
-
-
-
-
Field Detail
-
permissionManager
protected PermissionManager permissionManager
-
-
Constructor Detail
-
CreatePageCommandImpl
@Deprecated public CreatePageCommandImpl(PageManager pageManager, PermissionManager permissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, PageProvider pageProvider, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, Draft draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)
Deprecated.since 5.10
-
CreatePageCommandImpl
@Deprecated public CreatePageCommandImpl(PageManager pageManager, PermissionManager permissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, PageProvider pageProvider, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, ContentEntityObject draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)
Deprecated.since 5.10
-
CreatePageCommandImpl
public CreatePageCommandImpl(PageManager pageManager, PermissionManager permissionManager, ContentPermissionManager contentPermissionManager, DraftService draftService, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, PageProvider pageProvider, ContentPermissionProvider permissionProvider, CreateContextProvider contextProvider, Page draft, com.atlassian.user.User user, boolean notifySelf, ContentPropertyManager contentPropertyManager, LabelManager labelManager, DraftsTransitionHelper draftsTransitionHelper)
-
-
Method Detail
-
validateInternal
protected void validateInternal(ServiceCommandValidator validator)
Ensure that a page has been provided and that its title will not be a duplicate in the target space.- Overrides:
validateInternalin classCreateAbstractPageCommandImpl
-
isAuthorizedInternal
protected boolean isAuthorizedInternal()
Description copied from class:AbstractServiceCommandTemplate method for implementations to perform authorization.- Specified by:
isAuthorizedInternalin classAbstractServiceCommand- Returns:
- true if the current user is authorized to perform this command, false otherwise
-
getContent
protected AbstractPage getContent()
- Specified by:
getContentin classCreateAbstractPageCommandImpl- Returns:
- the content to be created.
-
getCreateEvent
protected Created getCreateEvent()
- Specified by:
getCreateEventin classCreateAbstractPageCommandImpl- Returns:
- the event to be published on successful creation
-
getCreatedPage
public Page getCreatedPage()
- Specified by:
getCreatedPagein interfaceCreatePageCommand- Returns:
- the page that was created if the command has executed already. Null if the command has not yet executed.
-
-