Class DeleteRequest

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

    @Unstable
    public class DeleteRequest
    extends EntityRequest
    Job request for deleting a page.
    Since:
    14.4.2, 14.5
    Version:
    $Id: b8b7869c9edfbfeb376e428fcec61b1615ed83be $
    See Also:
    Serialized Form
    • Constructor Detail

      • DeleteRequest

        public DeleteRequest()
        Default constructor.
      • DeleteRequest

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

      • shouldSkipRecycleBin

        public boolean shouldSkipRecycleBin()
        Returns:
        true if the document will be removed permanently, false if it will be moved to recycle bin
      • setShouldSkipRecycleBin

        public void setShouldSkipRecycleBin​(boolean shouldSkipRecycleBin)
        Sets whether the document should be send to the recycle bin or removed permanently.
        Parameters:
        shouldSkipRecycleBin - true if the document should be removed permanently, false if it should be sent to recycle bin
      • getNewBacklinkTargets

        public Map<org.xwiki.model.reference.DocumentReference,​org.xwiki.model.reference.DocumentReference> getNewBacklinkTargets()
        Returns:
        a Map where the keys are the deleted documents and the values are the new target documents to be used after delete
      • setNewBacklinkTargets

        public void setNewBacklinkTargets​(Map<org.xwiki.model.reference.DocumentReference,​org.xwiki.model.reference.DocumentReference> newBacklinkTargets)
        Sets the new backlink target for documents after delete.
        Parameters:
        newBacklinkTargets - a Map where the keys are the deleted documents and the values are new target documents
      • isUpdateLinks

        public boolean isUpdateLinks()
        Returns:
        true if the links that target the old entity reference (before the delete) should be updated to point to the new specified target, false to preserve the old link target
      • setUpdateLinks

        public void setUpdateLinks​(boolean updateLinks)
        Sets whether the links that target the old entity reference (before the delete) should be updated to point to the new specified target or not.
        Parameters:
        updateLinks - true to update the links, false to preserve the old link target
      • isUpdateLinksOnFarm

        @Deprecated(since="14.8RC1")
        public boolean isUpdateLinksOnFarm()
        Deprecated.
        not taken into account anymore
        Returns:
        true if the job should update the links that target the old entity reference (before the delete) from anywhere on the farm, false if the job should update only the links from the wiki where the entity was located before the delete
      • setUpdateLinksOnFarm

        @Deprecated(since="14.8RC1")
        public void setUpdateLinksOnFarm​(boolean updateLinksOnFarm)
        Deprecated.
        not taken into account anymore
        Sets whether the job should update the links that target the old entity reference (before the delete) from anywhere on the farm, or only from the wiki where the entity was located before the delete.

        Note that this parameter has no effect if isUpdateLinks() is false.

        Parameters:
        updateLinksOnFarm - true to update the links from anywhere on the farm, false to update only the links from the wiki where the entity is located
      • isAutoRedirect

        public boolean isAutoRedirect()
        Returns:
        true if the original pages should be redirected automatically to the new specified 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 specified location when accessed by the user, in order to preserve external links.
        Parameters:
        autoRedirect - true to automatically redirect the old pages to the new target, false otherwise