Class MoveRequest

  • All Implemented Interfaces:
    Serializable, org.xwiki.job.Request

    public class MoveRequest
    extends AbstractCopyOrMoveRequest
    A job request that can be used to move a collection of entities to a specified destination. This request can also be used to rename an entity.
    Since:
    7.2M1
    Version:
    $Id: 5f524721354e74ce9e08d7f5ed0a273f612c2cb1 $
    See Also:
    Serialized Form
    • Constructor Detail

      • MoveRequest

        public MoveRequest()
        Default constructor.
      • MoveRequest

        public MoveRequest​(org.xwiki.job.Request request)
        Parameters:
        request - the request to copy
        Since:
        14.7RC1, 14.4.4, 13.10.9
    • Method Detail

      • isDeleteSource

        @Deprecated
        public boolean isDeleteSource()
        Deprecated.
        Since 10.11 the MoveRequest does not handle copy anymore. So it should always delete the source.
        Returns:
        true if the source entities specified by EntityRequest.getEntityReferences() should be deleted, false otherwise; in a standard move operation the source is deleted but sometimes you may want to keep the source as a backup; this option can also be used to perform a copy instead of a move; note that the difference between a copy and a standard move without delete is that the back-links are not updated
      • setDeleteSource

        @Deprecated
        public void setDeleteSource​(boolean deleteSource)
        Deprecated.
        Since 10.11 the MoveRequest does not handle copy anymore. So it should always delete the source.
        Sets whether the source entities specified by EntityRequest.getEntityReferences() should be deleted or not.
        Parameters:
        deleteSource - true to delete the source, false to keep it as a backup
      • isAutoRedirect

        public boolean isAutoRedirect()
        Returns:
        true if the original pages should be redirected automatically to the new location when accessed by the user, in order to preserve external links, false otherwise
      • setAutoRedirect

        public void setAutoRedirect​(boolean autoRedirect)
        Sets whether the original pages should be redirected automatically to the new location when accessed by the user, in order to preserve external links.
        Parameters:
        autoRedirect - true to automatically redirect the old pages to the new location, false otherwise
      • isUpdateParentField

        public boolean isUpdateParentField()
        Returns:
        true if the parent-child relationship should be preserved by updating the parent field of the source's child pages to use the destination as parent instead; false otherwise
        Since:
        8.0M2, 7.4.2
      • setUpdateParentField

        public void setUpdateParentField​(boolean updateParentField)
        Sets whether the parent-child relationship should be preserved by updating the parent field of the source's child pages to use the destination as parent instead; false otherwise.
        Parameters:
        updateParentField - true to update the parent field of the source's child pages and use the destination as parent instead, false otherwise
        Since:
        8.0M2, 7.4.2