Class MovePageAction

java.lang.Object
org.apache.struts2.ActionSupport
All Implemented Interfaces:
Beanable, WebInterface, MessageHolderAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.Validateable

public class MovePageAction extends AbstractCommandAction
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 MovePageCommand.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 MovePageCommand.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 MovePageCommand.POSITION_ABOVE or MovePageCommand.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".
See Also:
  • Constructor Details

    • MovePageAction

      public MovePageAction()
  • Method Details

    • createCommand

      protected ServiceCommand createCommand()
      Specified by:
      createCommand in class AbstractCommandAction
    • setTargetId

      public void setTargetId(long targetId)
    • setTargetTitle

      public void setTargetTitle(String targetTitle)
    • setPosition

      public void setPosition(String position)
    • setPageService

      public void setPageService(PageService pageService)
    • setSpaceKey

      public void setSpaceKey(String spaceKey)
    • setSpaceService

      public void setSpaceService(SpaceService spaceService)
    • setPageId

      public void setPageId(long pageId)
    • setMovePageCommandHelper

      public void setMovePageCommandHelper(MovePageCommandHelper movePageCommandHelper)
    • setMode

      public void setMode(String mode)