Package org.xwiki.filemanager.job
Class OverwriteQuestion
- java.lang.Object
-
- org.xwiki.filemanager.job.OverwriteQuestion
-
@Unstable public class OverwriteQuestion extends Object
Question asked when a file with the same name is found during a copy or move operation and we don't know whether to overwrite or keep the existing file.- Since:
- 2.0M1
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description OverwriteQuestion(org.xwiki.model.reference.DocumentReference source, org.xwiki.model.reference.DocumentReference destination)Ask whether to overwrite or not the destination file with the source file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xwiki.model.reference.DocumentReferencegetDestination()org.xwiki.model.reference.DocumentReferencegetSource()booleanisAskAgain()booleanisOverwrite()voidsetAskAgain(boolean askAgain)Sets whether this question will be asked again or not if another file with the same name is found.voidsetOverwrite(boolean overwrite)Sets whether to overwrite or not the file that exists in the destination folder with the one being copied or moved.
-
-
-
Constructor Detail
-
OverwriteQuestion
public OverwriteQuestion(org.xwiki.model.reference.DocumentReference source, org.xwiki.model.reference.DocumentReference destination)Ask whether to overwrite or not the destination file with the source file.- Parameters:
source- the file being copied or moveddestination- a file with the same name that exists in the destination folder
-
-
Method Detail
-
getSource
public org.xwiki.model.reference.DocumentReference getSource()
- Returns:
- the file that is being copied or moved
-
getDestination
public org.xwiki.model.reference.DocumentReference getDestination()
- Returns:
- a file with the same name that exists in the destination folder
-
isOverwrite
public boolean isOverwrite()
- Returns:
trueto overwrite the file that exists in the destination folder with the one being copied or moved,falseto keep the exiting file
-
setOverwrite
public void setOverwrite(boolean overwrite)
Sets whether to overwrite or not the file that exists in the destination folder with the one being copied or moved.- Parameters:
overwrite-trueto overwrite,falseto keep
-
isAskAgain
public boolean isAskAgain()
- Returns:
- whether this question will be asked again or not if another file with the same name is found.
-
setAskAgain
public void setAskAgain(boolean askAgain)
Sets whether this question will be asked again or not if another file with the same name is found.- Parameters:
askAgain-trueto ask again,falseto perform the same action for the following files, during the current operation
-
-