public class

MovePageAction

extends AbstractCommandAction
java.lang.Object
   ↳ com.opensymphony.xwork.ActionSupport
     ↳ com.atlassian.confluence.core.ConfluenceActionSupport
       ↳ com.atlassian.confluence.pages.actions.AbstractCommandAction
         ↳ com.atlassian.confluence.pages.actions.MovePageAction

Class Overview

Move a page and its children to a new location in the system. There are three ways to specify the new location:

  • moving to the top level of a space is accomplished by setting a position of POSITION_TOP_LEVEL and setting #spaceKey to the key of the destination space
  • moving to the default location under a new parent page is accomplished by setting a position of POSITION_APPEND and setting #targetId or both #spaceKey and #targetTitle to specify the new parent page
  • moving to a specific position under a new parent page is accomplished by setting a position of either POSITION_ABOVE or POSITION_BELOW and setting #targetId or both #spaceKey and #targetTitle to specify the relevant sibling.
Note the important difference in the target parameters for the second and third cases. The target is the new parent when using "append", but is a new sibling when using "above" or "below".

Summary

[Expand]
Inherited Constants
From class com.atlassian.confluence.core.ConfluenceActionSupport
From interface com.opensymphony.xwork.Action
[Expand]
Inherited Fields
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
Public Constructors
MovePageAction()
Public Methods
void setPageId(long pageId)
void setPageService(PageService pageService)
void setPosition(String position)
void setSpaceKey(String spaceKey)
void setSpaceService(SpaceService spaceService)
void setTargetId(long targetId)
void setTargetTitle(String targetTitle)
Protected Methods
ServiceCommand createCommand()
[Expand]
Inherited Methods
From class com.atlassian.confluence.pages.actions.AbstractCommandAction
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
From class java.lang.Object
From interface com.atlassian.confluence.core.Beanable
From interface com.atlassian.confluence.plugin.descriptor.web.WebInterface
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

Public Constructors

public MovePageAction ()

Public Methods

public void setPageId (long pageId)

public void setPageService (PageService pageService)

public void setPosition (String position)

public void setSpaceKey (String spaceKey)

public void setSpaceService (SpaceService spaceService)

public void setTargetId (long targetId)

public void setTargetTitle (String targetTitle)

Protected Methods

protected ServiceCommand createCommand ()