Package org.xwiki.refactoring.job
Class OverwriteQuestion
- java.lang.Object
-
- org.xwiki.refactoring.job.OverwriteQuestion
-
public class OverwriteQuestion extends Object
Question asked when an entity with the same name is found during a copy or move operation and we don't know whether to overwrite or keep the existing entity.- Since:
- 7.2M1
- Version:
- $Id: 6df92c59509e40590efbdbdf86f81f7efcde59cc $
-
-
Constructor Summary
Constructors Constructor Description OverwriteQuestion(org.xwiki.model.reference.EntityReference source, org.xwiki.model.reference.EntityReference destination)
Ask whether to overwrite or not the destination entity with the source entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xwiki.model.reference.EntityReference
getDestination()
org.xwiki.model.reference.EntityReference
getSource()
boolean
isAskAgain()
boolean
isOverwrite()
void
setAskAgain(boolean askAgain)
Sets whether this question will be asked again or not if another pair of entities with the same name is found.void
setOverwrite(boolean overwrite)
Sets whether to overwrite or not the destination entity with the one being copied or moved.
-
-
-
Constructor Detail
-
OverwriteQuestion
public OverwriteQuestion(org.xwiki.model.reference.EntityReference source, org.xwiki.model.reference.EntityReference destination)
Ask whether to overwrite or not the destination entity with the source entity.- Parameters:
source
- the entity being copied or moveddestination
- an entity with the same name that exists at the destination
-
-
Method Detail
-
getSource
public org.xwiki.model.reference.EntityReference getSource()
- Returns:
- the entity that is being copied or moved
-
getDestination
public org.xwiki.model.reference.EntityReference getDestination()
- Returns:
- an entity with the same name that exists at the destination
-
isOverwrite
public boolean isOverwrite()
- Returns:
true
to overwrite the destination entity with the one being copied or moved,false
to keep the destination entity
-
setOverwrite
public void setOverwrite(boolean overwrite)
Sets whether to overwrite or not the destination entity with the one being copied or moved.- Parameters:
overwrite
-true
to overwrite,false
to keep
-
isAskAgain
public boolean isAskAgain()
- Returns:
- whether this question will be asked again or not if another pair of entities with the same name is found
-
setAskAgain
public void setAskAgain(boolean askAgain)
Sets whether this question will be asked again or not if another pair of entities with the same name is found.- Parameters:
askAgain
-true
to ask again,false
to perform the same action for the following entities, during the current operation
-
-