public abstract class AbstractExecution extends Object implements Execution
Execution implementations.Execution| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
algorithms
The list of algorithms used for execution.
|
protected boolean |
failIfNoAlgorithms
Fail if no files no process.
|
protected boolean |
failIfNoFiles
Fail if no files no process.
|
protected boolean |
failIfNoTargets
Fail if no files no process.
|
protected List<ChecksumFile> |
files
The list of files used for the execution.
|
protected String |
subPath
Part of relative path to exclude from file path
|
protected List<ExecutionTarget> |
targets
The list of targets used for the execution.
|
| Constructor and Description |
|---|
AbstractExecution() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlgorithm(String algorithm)
Add an algorithm to the list of checksum algorithms to be used by the execution.
|
void |
addFile(ChecksumFile file)
Add a file to the list of files to be processed by the execution.
|
void |
addTarget(ExecutionTarget target)
Add a target to the list of
ExecutionTarget to be
used by the execution. |
void |
checkParameters()
Check that an execution can be run with the
Execution.run() method. |
List<String> |
getAlgorithms()
Get the list of checksum algorithms to be used by the execution.
|
List<ChecksumFile> |
getFiles()
Get the list of files to be processed by the execution.
|
String |
getSubPath()
Get the part of relative path that will be removed.
|
List<ExecutionTarget> |
getTargets()
Get the list of
ExecutionTarget to be used by the
execution. |
boolean |
isFailIfNoAlgorithms()
Execution should fail if no algorithm has been added.
|
boolean |
isFailIfNoFiles()
Execution should fail if no file has been added.
|
boolean |
isFailIfNoTargets()
Execution should fail if no target has been added.
|
void |
removeAlgorithm(String algorithm)
Remove an algorithm from the list of checksum algorithms to be used by the execution.
|
void |
removeFile(ChecksumFile file)
Remove a file from the list of files to be processed by the execution.
|
void |
removeTarget(ExecutionTarget target)
Remove a target from the list of
ExecutionTarget to
be used by the execution. |
void |
setAlgorithms(List<String> algorithms)
Set the list of checksum algorithms to be used by the execution.
|
void |
setFailIfNoAlgorithms(boolean failIfNoAlgorithms)
Execution should fail if no algorithm has been added.
|
void |
setFailIfNoFiles(boolean failIfNoFiles)
Execution should fail if no file has been added.
|
void |
setFailIfNoTargets(boolean failIfNoTargets)
Execution should fail if no target has been added.
|
void |
setFiles(List<ChecksumFile> files)
Set the list of files to be processed by the execution.
|
void |
setSubPath(String subPath)
Set the part of relative path that will be removed.
|
void |
setTargets(List<ExecutionTarget> targets)
Set the list of
ExecutionTarget to be used by the
execution. |
protected List<ChecksumFile> files
protected String subPath
protected List<ExecutionTarget> targets
protected boolean failIfNoFiles
protected boolean failIfNoAlgorithms
protected boolean failIfNoTargets
public List<ChecksumFile> getFiles()
public void setFiles(List<ChecksumFile> files)
public String getSubPath()
getSubPath in interface Executionpublic void setSubPath(String subPath)
setSubPath in interface ExecutionsubPath - of relative path that will be removed.public void addFile(ChecksumFile file)
public void removeFile(ChecksumFile file)
removeFile in interface Executionfile - the file to remove.public List<String> getAlgorithms()
getAlgorithms in interface Executionpublic void setAlgorithms(List<String> algorithms)
setAlgorithms in interface Executionalgorithms - the value to set.public void addAlgorithm(String algorithm)
addAlgorithm in interface Executionalgorithm - the algorithm to add.public void removeAlgorithm(String algorithm)
removeAlgorithm in interface Executionalgorithm - the algorithm to remove.public List<ExecutionTarget> getTargets()
ExecutionTarget to be used by the
execution.getTargets in interface Executionpublic void addTarget(ExecutionTarget target)
ExecutionTarget to be
used by the execution.public void removeTarget(ExecutionTarget target)
ExecutionTarget to
be used by the execution.removeTarget in interface Executiontarget - the target to remove.public void setTargets(List<ExecutionTarget> targets)
ExecutionTarget to be used by the
execution.setTargets in interface Executiontargets - the value to set.public boolean isFailIfNoFiles()
isFailIfNoFiles in interface Executiontrue if execution should fail if no file has been addedpublic void setFailIfNoFiles(boolean failIfNoFiles)
setFailIfNoFiles in interface ExecutionfailIfNoFiles - true if execution should fail if no file has been addedpublic boolean isFailIfNoAlgorithms()
isFailIfNoAlgorithms in interface Executiontrue if execution should fail if no algorithm has been addedpublic void setFailIfNoAlgorithms(boolean failIfNoAlgorithms)
setFailIfNoAlgorithms in interface ExecutionfailIfNoAlgorithms - true if execution should fail if no algorithm has been addedpublic boolean isFailIfNoTargets()
isFailIfNoTargets in interface Executiontrue if execution should fail if no target has been addedpublic void setFailIfNoTargets(boolean failIfNoTargets)
setFailIfNoTargets in interface ExecutionfailIfNoTargets - true if execution should fail if no target has been addedpublic void checkParameters()
throws ExecutionException
Execution.run() method.checkParameters in interface ExecutionExecutionException - if some parameters are not initialized or invalid.Copyright © 2010–2018. All rights reserved.