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 String
AUTO_REDIRECT
static String
NEW_BACKLINK_TARGETS
static 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.static String
UPDATE_LINKS
static String
UPDATE_LINKS_ON_FARM
Deprecated.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()
boolean
isAutoRedirect()
boolean
isUpdateLinks()
boolean
isUpdateLinksOnFarm()
Deprecated.not taken into account anymorevoid
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.void
setNewBacklinkTargets(Map<org.xwiki.model.reference.DocumentReference,org.xwiki.model.reference.DocumentReference> newBacklinkTargets)
Sets the new backlink target for documents after delete.void
setShouldSkipRecycleBin(boolean shouldSkipRecycleBin)
Sets whether the document should be send to the recycle bin or removed permanently.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.void
setUpdateLinksOnFarm(boolean updateLinksOnFarm)
Deprecated.not taken into account anymoreboolean
shouldSkipRecycleBin()
-
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:
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 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
-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
-
-