org.apache.tools.ant.taskdefs.optional.ccm
public class: CCMCheck [javadoc |
source]
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.optional.ccm.Continuus
org.apache.tools.ant.taskdefs.optional.ccm.CCMCheck
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
CCMCheckinDefault, CCMCheckout, CCMCheckin
Class common to all check commands (checkout, checkin,checkin default task);
- ant.task:
ignore - ="true"
| Field Summary |
|---|
| protected Vector | filesets | |
| public static final String | FLAG_COMMENT | -comment flag -- comment to attach to the file |
| public static final String | FLAG_TASK | -task flag -- associate checkout task with task |
| Methods from org.apache.tools.ant.Task: |
|---|
|
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, markInvalid, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Method from org.apache.tools.ant.taskdefs.optional.ccm.CCMCheck Detail: |
public void addFileset(FileSet set) {
filesets.addElement(set);
}
Adds a set of files to copy. |
public void execute() throws BuildException {
if (file == null && filesets.size() == 0) {
throw new BuildException(
"Specify at least one source - a file or a fileset.");
}
if (file != null && file.exists() && file.isDirectory()) {
throw new BuildException("CCMCheck cannot be generated for directories");
}
if (file != null && filesets.size() > 0) {
throw new BuildException("Choose between file and fileset !");
}
if (getFile() != null) {
doit();
return;
}
int sizeofFileSet = filesets.size();
for (int i = 0; i < sizeofFileSet; i++) {
FileSet fs = (FileSet) filesets.elementAt(i);
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
String[] srcFiles = ds.getIncludedFiles();
for (int j = 0; j < srcFiles.length; j++) {
File src = new File(fs.getDir(getProject()), srcFiles[j]);
setFile(src);
doit();
}
}
}
|
public String getComment() {
return comment;
}
Get the value of comment. |
public File getFile() {
return file;
}
|
public String getTask() {
return task;
}
|
public void setComment(String v) {
this.comment = v;
}
|
public void setFile(File v) {
log("working file " + v, Project.MSG_VERBOSE);
this.file = v;
}
Sets the path to the file that the command will operate on. |
public void setTask(String v) {
this.task = v;
}
Specifies the task number used to check
in the file (may use 'default'). |