Package org.xwiki.refactoring.job
Class DeleteRequest
- java.lang.Object
-
- org.xwiki.job.AbstractRequest
-
- org.xwiki.job.api.AbstractCheckRightsRequest
-
- org.xwiki.refactoring.job.EntityRequest
-
- org.xwiki.refactoring.job.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
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTO_REDIRECTstatic StringNEW_BACKLINK_TARGETSstatic StringSHOULD_SKIP_RECYCLE_BINKey of the optional property that indicates whether the document should be sent to the recycle bin or removed permanently.static StringUPDATE_LINKSstatic StringUPDATE_LINKS_ON_FARMDeprecated.not taken into account anymore
-
Constructor Summary
Constructors Constructor Description DeleteRequest()Default constructor.DeleteRequest(org.xwiki.job.Request request)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Map<org.xwiki.model.reference.DocumentReference,org.xwiki.model.reference.DocumentReference>getNewBacklinkTargets()booleanisAutoRedirect()booleanisUpdateLinks()booleanisUpdateLinksOnFarm()Deprecated.not taken into account anymorevoidsetAutoRedirect(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.voidsetNewBacklinkTargets(Map<org.xwiki.model.reference.DocumentReference,org.xwiki.model.reference.DocumentReference> newBacklinkTargets)Sets the new backlink target for documents after delete.voidsetShouldSkipRecycleBin(boolean shouldSkipRecycleBin)Sets whether the document should be send to the recycle bin or removed permanently.voidsetUpdateLinks(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.voidsetUpdateLinksOnFarm(boolean updateLinksOnFarm)Deprecated.not taken into account anymorebooleanshouldSkipRecycleBin()-
Methods inherited from class org.xwiki.refactoring.job.EntityRequest
getEntityParameters, getEntityReferences, getJobType, isDeep, setDeep, setEntityParameters, setEntityReferences, setJobType
-
Methods inherited from class org.xwiki.job.api.AbstractCheckRightsRequest
getAuthorReference, getUserReference, isCheckAuthorRights, isCheckRights, setAuthorReference, setCheckAuthorRights, setCheckRights, setUserReference
-
Methods inherited from class org.xwiki.job.AbstractRequest
containsProperty, equals, getContext, getId, getProperties, getProperty, getProperty, getPropertyNames, hashCode, isInteractive, isRemote, isStatusLogIsolated, isStatusSerialized, isVerbose, removeProperty, setContext, setId, setId, setId, setInteractive, setProperty, setRemote, setStatusLogIsolated, setStatusSerialized, setVerbose
-
-
-
-
Field Detail
-
SHOULD_SKIP_RECYCLE_BIN
public static final String SHOULD_SKIP_RECYCLE_BIN
Key of the optional property that indicates whether the document should be sent to the recycle bin or removed permanently.- See Also:
- Constant Field Values
-
NEW_BACKLINK_TARGETS
public static final String NEW_BACKLINK_TARGETS
- See Also:
getNewBacklinkTargets(), Constant Field Values
-
UPDATE_LINKS
public static final String UPDATE_LINKS
- See Also:
isUpdateLinks(), Constant Field Values
-
UPDATE_LINKS_ON_FARM
@Deprecated(since="14.8RC1") public static final String UPDATE_LINKS_ON_FARM
Deprecated.not taken into account anymore- See Also:
isUpdateLinksOnFarm(), Constant Field Values
-
AUTO_REDIRECT
public static final String AUTO_REDIRECT
- See Also:
isAutoRedirect(), Constant Field Values
-
-
Method Detail
-
shouldSkipRecycleBin
public boolean shouldSkipRecycleBin()
- Returns:
trueif the document will be removed permanently,falseif 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-trueif the document should be removed permanently,falseif 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:
trueif the links that target the old entity reference (before the delete) should be updated to point to the new specified target,falseto 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-trueto update the links,falseto preserve the old link target
-
isUpdateLinksOnFarm
@Deprecated(since="14.8RC1") public boolean isUpdateLinksOnFarm()
Deprecated.not taken into account anymore- Returns:
trueif the job should update the links that target the old entity reference (before the delete) from anywhere on the farm,falseif 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 anymoreSets 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()isfalse.- Parameters:
updateLinksOnFarm-trueto update the links from anywhere on the farm,falseto update only the links from the wiki where the entity is located
-
isAutoRedirect
public boolean isAutoRedirect()
- Returns:
trueif the original pages should be redirected automatically to the new specified location when accessed by the user, in order to preserve external links,falseotherwise
-
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-trueto automatically redirect the old pages to the new target,falseotherwise
-
-