org.ourgrid.common.spec
Class JobSpec

java.lang.Object
  extended by org.ourgrid.common.spec.JobSpec
All Implemented Interfaces:
java.io.Serializable

public class JobSpec
extends java.lang.Object
implements java.io.Serializable

Entity that encapsulates all the information given by the user about each job. To inform, the user uses the Description Files that can be compiled by the CommonCompiler.

Version:
1.0
See Also:
CommonCompiler, Serialized Form

Constructor Summary
JobSpec(java.lang.String label)
          The constructor
JobSpec(java.lang.String label, java.lang.String requirements, java.util.List<TaskSpec> taskSpecs)
          Constructor.
 
Method Summary
 java.lang.String getLabel()
           
 java.lang.String getRequirements()
           
 java.util.List<TaskSpec> getTaskSpecs()
           
 void setRequirements(java.lang.String expression)
          Sets the logical expression for the job.
 void setTaskSpecs(java.util.List<TaskSpec> taskSpecs)
          Inserts a list of task specifications.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobSpec

public JobSpec(java.lang.String label,
               java.lang.String requirements,
               java.util.List<TaskSpec> taskSpecs)
        throws JobSpecificationException
Constructor.

Parameters:
label - The label for the job.
requirements - The logical expression that defines the job. It will be used to choose machines that are able to run its tasks. To define it well, check the OurGrid manual.
taskSpecs - A list with all the task specifications of this job.
Throws:
JobSpecificationException

JobSpec

public JobSpec(java.lang.String label)
The constructor

Parameters:
label - The label for the job.
Method Detail

getTaskSpecs

public java.util.List<TaskSpec> getTaskSpecs()
Returns:
A list with the tasks specification in this job.

setTaskSpecs

public void setTaskSpecs(java.util.List<TaskSpec> taskSpecs)
                  throws JobSpecificationException
Inserts a list of task specifications.

Parameters:
taskSpecs - The list of tasks that will be contained by this job.
Throws:
JobSpecificationException

getRequirements

public java.lang.String getRequirements()
Returns:
The logical expression that will be used to choose machines to run the tasks in this job.

setRequirements

public void setRequirements(java.lang.String expression)
Sets the logical expression for the job.

Parameters:
expression - The logical expression that defines the job. It will be used to choose machines that are able to run its tasks.

getLabel

public java.lang.String getLabel()
Returns:
The label of the job.