|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
edu.pdx.cs399J.grader.SubmitTask
public class SubmitTask
An Ant task for submitting projects. This class follows the JavaBean pattern that is required by Ant: public, zero-argument constructor and setter methods for each of the task's attributes.
Submits project files to the Grader for grading. A receipt email is sent to the submitter. Because this Ant task sends email, the JavaMail libraries must be available to the task:
<taskdef name="submit" classname="edu.pdx.cs399J.grader.SubmitTask">
<classpath>
<pathelement location="${daves.jars.dir}/grader.jar"/>
<pathelement location="${daves.jars.dir}/mail.jar"/>
<pathelement location="${daves.jars.dir}/activation.jar"/>
</classpath>
</taskdef>
| Attribute | Description | Required |
| project | The name of the project to be submitted | Yes |
| username | The name of the submitter | Yes |
| userid | The login id of the submitter. All submitted files must reside in a directory with this name. | Yes |
| The email address of the submitter | Yes | |
| comment | Information about the project that the submitter wants the grader to know. A longer comment can be specified with a nexted <comment> element. | No |
| server | The name of the SMTP server used to send email | No |
| debug | Enabled verbose logging? ("true" or "false") | No |
| savejar | Should the temporary jar file containing the submitted files be saved? ("true" or "false") | No |
An Ant FileSet that specifies the files to be submitted.
A longer comment that communicates some information from the submitter to the grader. Multiple nested <comment> elements can be specified. Each nested <comment> has a value attribute that specifies the text of the comment:
<comment value="GUI file browser"/>
<submit project="Project 4" username="David Whitlock"
userid="whitlock" email="whitlock@cs.pdx.edu">
<comment value="Fixed command line parsing bug"/>
<fileset dir="${src.dir}">
<include name="edu/pdx/cs399J/whitlock/*.java"/>
</fileset>
</submit>
| Nested Class Summary | |
|---|---|
static class |
SubmitTask.Comment
A little class that holds a comment. |
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.Task |
|---|
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
SubmitTask()
Ant requires that all Tasks have a public,
zero-argument constructor. |
|
| Method Summary | |
|---|---|
void |
addFileSet(org.apache.tools.ant.types.FileSet files)
Adds set of files to this submission |
SubmitTask.Comment |
createComment()
Creates a new comment for this submission |
void |
execute()
Performs the submission using the configuration specified in this Ant task. |
void |
setComment(String value)
Sets the comment for this submission |
void |
setDebug(boolean debug)
Sets whether or not the progress of the submission should be logged. |
void |
setEmail(String email)
Sets the email address of the user who is submitting the project |
void |
setProject(String projName)
Sets the name of project being submitted |
void |
setSavejar(boolean saveJar)
Sets whether or not the jar file generated by the submission should be saved. |
void |
setServer(String serverName)
Sets the name of the SMTP server that is used to send emails |
void |
setUserid(String userId)
Sets the id of the user who is submitting the project |
void |
setUserName(String userName)
Sets the name of the user who is submitting the project |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubmitTask()
Tasks have a public,
zero-argument constructor. This constructor is invoked
reflectively when the ant build file is parsed.
| Method Detail |
|---|
public void setServer(String serverName)
public void setDebug(boolean debug)
public void setSavejar(boolean saveJar)
public void setComment(String value)
public void setProject(String projName)
public void setUserName(String userName)
public void setUserid(String userId)
public void setEmail(String email)
public SubmitTask.Comment createComment()
public void addFileSet(org.apache.tools.ant.types.FileSet files)
public void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||