public abstract class

AbstractCreatePageAction

extends AbstractCreateAndEditPageAction
implements Spaced
java.lang.Object
   ↳ com.opensymphony.xwork.ActionSupport
     ↳ com.atlassian.confluence.core.ConfluenceActionSupport
       ↳ com.atlassian.confluence.pages.actions.AbstractPageAwareAction
         ↳ com.atlassian.confluence.pages.actions.AbstractPageAction
           ↳ com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
             ↳ com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
               ↳ com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
                 ↳ com.atlassian.confluence.pages.actions.AbstractCreatePageAction
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Functions shared between creating pages and blog posts.

Summary

Constants
String INPUT_VARIABLES
[Expand]
Inherited Constants
From class com.atlassian.confluence.pages.actions.AbstractPageAction
From class com.atlassian.confluence.core.ConfluenceActionSupport
From interface com.opensymphony.xwork.Action
Fields
protected AttachmentManager attachmentManager
[Expand]
Inherited Fields
From class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
From class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
From class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
From class com.atlassian.confluence.pages.actions.AbstractPageAction
From class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
Public Constructors
AbstractCreatePageAction()
Public Methods
void createPage()
Create the CEO to be saved from the data supplied to the action.
String doAdd()
String doDefault()
Default webwork action execution method.
ContentEntityObject getAttachmentSourceContent()
Returns the ConfluenceEntityObject that contains attachments relevant to the current action.
String getContentType()
Returns the content type being created or edited.
Page getFromPage()
long getFromPageId()
Space getNewSpace()
AbstractPage getPageToReturnToOnCancel()
Space getSpace()
String getSpaceKey()
boolean hasSetPagePermissionsPermission()
boolean isInvalidPageTitle()
boolean isPageRequired()
If the action requires that the page be set before being run, then it should return true to this method.
void setAttachmentManager(AttachmentManager attachmentManager)
void setFromPageId(long fromPageId)
void setSpaceKey(String spaceKey)
void setTitle(String title)
void setTitleWritten(String titleWritten)
Protected Methods
String afterAdd()
Common processing to be performed by all subclasses after the add operation.
String beforeAdd()
Common processing to be performed by all subclasses prior to performing the add.
abstract AbstractPage getPageToCreate()
void transferDraftAttachments()
[Expand]
Inherited Methods
From class com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction
From class com.atlassian.confluence.pages.actions.AbstractTemplatePageAction
From class com.atlassian.confluence.pages.actions.AbstractPreviewPageAction
From class com.atlassian.confluence.pages.actions.AbstractPageAction
From class com.atlassian.confluence.pages.actions.AbstractPageAwareAction
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
From class java.lang.Object
From interface com.atlassian.confluence.pages.actions.PageAware
From interface com.atlassian.confluence.pages.actions.TinyUrlAware
From interface com.atlassian.confluence.plugin.descriptor.web.WebInterface
From interface com.atlassian.confluence.spaces.Spaced
From interface com.opensymphony.xwork.Action
From interface com.opensymphony.xwork.LocaleProvider
From interface com.opensymphony.xwork.TextProvider
From interface com.opensymphony.xwork.Validateable
From interface com.opensymphony.xwork.ValidationAware

Constants

public static final String INPUT_VARIABLES

Constant Value: "inputvariables"

Fields

protected AttachmentManager attachmentManager

Public Constructors

public AbstractCreatePageAction ()

Public Methods

public void createPage ()

Create the CEO to be saved from the data supplied to the action.

public String doAdd ()

Throws
Exception

public String doDefault ()

Default webwork action execution method.

Returns
  • the action result
Throws
Exception

public ContentEntityObject getAttachmentSourceContent ()

Returns the ConfluenceEntityObject that contains attachments relevant to the current action. E.g.:

public String getContentType ()

Returns the content type being created or edited. e.g. "page", "blogpost"

public Page getFromPage ()

public long getFromPageId ()

public Space getNewSpace ()

Returns
  • the space referenced by the newSpaceKey property, or null if there is none or it cannot be found.

public AbstractPage getPageToReturnToOnCancel ()

public Space getSpace ()

public String getSpaceKey ()

public boolean hasSetPagePermissionsPermission ()

public boolean isInvalidPageTitle ()

public boolean isPageRequired ()

If the action requires that the page be set before being run, then it should return true to this method. If the action requires a page, but no page is available, then the interceptor will automatically redirect to the 'pagenotfound' result

Returns
  • true if the action requires a page in order to execute

public void setAttachmentManager (AttachmentManager attachmentManager)

public void setFromPageId (long fromPageId)

public void setSpaceKey (String spaceKey)

public void setTitle (String title)

public void setTitleWritten (String titleWritten)

Protected Methods

protected String afterAdd ()

Common processing to be performed by all subclasses after the add operation.

Returns
  • SUCCESS if successful. Any other return value means a failure.

protected String beforeAdd ()

Common processing to be performed by all subclasses prior to performing the add.

Returns
  • SUCCESS if successful. Any other return value means the add operation should not proceed.
Throws
Exception

protected abstract AbstractPage getPageToCreate ()

protected void transferDraftAttachments ()