com.atlassian.confluence.content.service.page
Class CreateAbstractPageCommandImpl

java.lang.Object
  extended by com.atlassian.confluence.core.service.AbstractServiceCommand
      extended by 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
protected  AttachmentManager attachmentManager
           
protected  ContentPermissionManager contentPermissionManager
           
protected  AbstractPage createdContent
          Will content the content created after executeInternal has successfully completed.
protected  DraftManager draftManager
           
protected  com.atlassian.event.api.EventPublisher eventPublisher
           
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
protected CreateAbstractPageCommandImpl(PageManager pageManager, ContentPermissionManager contentPermissionManager, DraftManager draftManager, AttachmentManager attachmentManager, NotificationManager notificationManager, com.atlassian.event.api.EventPublisher eventPublisher, ContentPermissionProvider permissionProvider, com.atlassian.user.User user, boolean notifySelf)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pageManager

protected PageManager pageManager

contentPermissionManager

protected ContentPermissionManager contentPermissionManager

draftManager

protected DraftManager draftManager

attachmentManager

protected AttachmentManager attachmentManager

notificationManager

protected NotificationManager notificationManager

eventPublisher

protected com.atlassian.event.api.EventPublisher eventPublisher

permissionProvider

protected ContentPermissionProvider permissionProvider

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.

Constructor Detail

CreateAbstractPageCommandImpl

protected CreateAbstractPageCommandImpl(PageManager pageManager,
                                        ContentPermissionManager contentPermissionManager,
                                        DraftManager draftManager,
                                        AttachmentManager attachmentManager,
                                        NotificationManager notificationManager,
                                        com.atlassian.event.api.EventPublisher eventPublisher,
                                        ContentPermissionProvider permissionProvider,
                                        com.atlassian.user.User user,
                                        boolean notifySelf)
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 class AbstractServiceCommand

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 class AbstractServiceCommand

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


Copyright © 2003-2011 Atlassian. All Rights Reserved.