public abstract class AbstractSyncTask extends VfsTask
Modifier and Type | Class and Description |
---|---|
static class |
AbstractSyncTask.SourceInfo
Information about a source file.
|
Constructor and Description |
---|
AbstractSyncTask() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredSrc(AbstractSyncTask.SourceInfo srcInfo)
Adds a nested <src> element.
|
protected boolean |
detectMissingSourceFiles()
Check if this task cares about destination files with a missing source
file.
|
void |
execute()
Executes this task.
|
protected void |
handleMissingSourceFile(FileObject destFile)
Handles a destination for which there is no corresponding source file.
|
protected void |
handleOutOfDateFile(FileObject srcFile,
FileObject destFile)
Handles an out-of-date file (a file where the destination file
either doesn't exist, or is older than the source file).
|
protected void |
handleUpToDateFile(FileObject srcFile,
FileObject destFile)
Handles an up-to-date file (where the destination file exists and is
newer than the source file).
|
boolean |
isFailonerror()
Sets whether we should fail if there was an error or not.
|
protected void |
logOrDie(String message,
int level) |
void |
setDestDir(String destDir)
Sets the destination directory.
|
void |
setDestFile(String destFile)
Sets the destination file.
|
void |
setFailonerror(boolean failonerror)
Sets whether we should fail if there was an error or not.
|
void |
setIncludes(String filesList)
Sets the files to includes.
|
void |
setSrc(String srcFile)
Sets the source file.
|
void |
setSrcDir(String srcDir)
Sets the source directory.
|
void |
setSrcDirIsBase(boolean srcDirIsBase)
Sets whether the source directory should be consider as the base directory.
|
closeManager, resolveFile
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void setDestFile(String destFile)
destFile
- The destination file name.public void setDestDir(String destDir)
destDir
- The destination directory.public void setSrc(String srcFile)
srcFile
- The source file name.public void setSrcDir(String srcDir)
srcDir
- The source directory.public void setSrcDirIsBase(boolean srcDirIsBase)
srcDirIsBase
- true if the source directory is the base directory.public void setFailonerror(boolean failonerror)
failonerror
- true if the operation should fail if there is an error.public boolean isFailonerror()
public void setIncludes(String filesList)
filesList
- The list of files to include.public void addConfiguredSrc(AbstractSyncTask.SourceInfo srcInfo) throws org.apache.tools.ant.BuildException
srcInfo
- A nested source element.org.apache.tools.ant.BuildException
- if the SourceInfo doesn't reference a file.public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- if an error occurs.protected void logOrDie(String message, int level)
protected void handleOutOfDateFile(FileObject srcFile, FileObject destFile) throws Exception
Exception
protected void handleUpToDateFile(FileObject srcFile, FileObject destFile) throws Exception
Exception
protected void handleMissingSourceFile(FileObject destFile) throws Exception
Exception
protected boolean detectMissingSourceFiles()
Copyright © 2002-2016 The Apache Software Foundation. All Rights Reserved.