|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.peace_tools.workspace.JobList
public class JobList
A class to encapsulate information about a list of jobs that have already been configured in this work space. This class is instantiated from the work space class. This class is relatively straightforward in that it merely contains a list of Job objects. In addition, it facilitates marshalling and unmarshalling of job data.
Field Summary | |
---|---|
private java.util.ArrayList<Job> |
jobs
The list of job objects that have been configured and added to this list. |
private long |
seqCounter
Sequence counter that is maintained on a per-work space basis to generate unique/valid IDs for each new job entry added to this list. |
Constructor Summary | |
---|---|
JobList()
The default constructor. |
Method Summary | |
---|---|
void |
add(Job job)
Method to add a new job entry to the job list. |
static JobList |
create(org.w3c.dom.Element jobListNode)
Helper method to utilize data from a DOM tree to create a suitable JobList entry. |
Job |
getjob(java.lang.String jobID)
Obtain reference to a job object, given its work space wide unique job ID. |
java.util.ArrayList<Job> |
getJobs()
Obtain the list of job objects that are currently available in a work space. |
void |
marshall(org.w3c.dom.Element workspace)
Method to marshall the data stored in this object to become part of a DOM tree element passed in. |
void |
marshall(java.io.PrintWriter out)
Method to marshall the data stored in this object directly to a XML fragment. |
void |
remove(Job job)
Method to remove a job entry. |
java.lang.String |
reserveJobID()
Reserves the next job ID for use in a job object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<Job> jobs
private long seqCounter
Constructor Detail |
---|
public JobList()
Method Detail |
---|
public static JobList create(org.w3c.dom.Element jobListNode) throws java.lang.Exception
jobListNode
- The DOM element to be used for creating the
job list and to be used for creating the Job entries.
java.lang.Exception
- This method throws an exception when errors occur
during reading and processing elements from the DOM node.public java.lang.String reserveJobID()
public Job getjob(java.lang.String jobID)
jobID
- The generated work space wide unique job ID.
Note that checks are case sensitive.
public void add(Job job)
job
- The new job entry to be added to the job list.public void remove(Job job)
Note: This method does not delete any of the files associated with the job. It simply removes the job entry from the work space.
job
- The job entry to be removed from the job list.public java.util.ArrayList<Job> getJobs()
public final void marshall(org.w3c.dom.Element workspace)
workspace
- The DOM element corresponding to the Workspace
node that contains this entry.public final void marshall(java.io.PrintWriter out)
out
- The stream to which the XML must be serialized.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |