org.jbind.xml.schema.reader
Class Job

java.lang.Object
  extended byorg.jbind.xml.schema.reader.Job
All Implemented Interfaces:
IHasLocation, IJob
Direct Known Subclasses:
ComponentJob, SchemaJob, SourceJob

public abstract class Job
extends java.lang.Object
implements IJob


Constructor Summary
Job(IJobHelper aHelper)
           
 
Method Summary
protected  void addSubJob(IJob aJob)
           
 boolean checkSubJobsValidated()
          Checks if the validation step of all sub jobs has been executed.
protected abstract  void collectRefsForCompletion(IJobRefs aJobRefs)
           
protected abstract  void collectRefsForCreation(IJobRefs aJobRefs)
           
protected abstract  void collectRefsForValidation(IJobRefs aJobRefs)
           
protected abstract  void doExecuteCompletion(IConstraintViolations aViolations)
           
protected abstract  void doExecuteCreation(IConstraintViolations aViolations)
           
protected abstract  void doExecuteValidation(IConstraintViolations aViolations)
           
 void executeCompletion(IConstraintViolations aViolations)
          Executes the completion step of the job.
 void executeCreation(IConstraintViolations aViolations)
          Executes the creation step of the job.
 void executeValidation(IConstraintViolations aViolations)
          Executes the validation step of the job.
protected  IJobHelper getHelper()
           
 boolean getIsValidated()
          Checks if the validation step of this job has been executed.
 ILocation getLocation()
           
 IJob getParent()
          Gets the job that initiated (created) this job.
 java.util.Iterator iterRefsForCompletion()
          Iterates the references that must be resolved before the completion step of this job can be executed.
 java.util.Iterator iterRefsForCreation()
          Iterates the references that must be resolved before the creation step of this job can be executed.
 java.util.Iterator iterRefsForValidation()
          Iterates the references that must be resolved before the validation step of this job can be executed.
 java.util.Iterator iterSubJobs()
          Iterates the sub jobs of this job.
 void setParent(IJob aParent)
          Sets the parent job.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.schema.reader.IJob
getDescription, getInstantiator
 

Constructor Detail

Job

public Job(IJobHelper aHelper)
Method Detail

getHelper

protected IJobHelper getHelper()

getIsValidated

public boolean getIsValidated()
Description copied from interface: IJob
Checks if the validation step of this job has been executed.

Specified by:
getIsValidated in interface IJob
Returns:
Returns true iff the validation step of this job has been executed.

getParent

public final IJob getParent()
Description copied from interface: IJob
Gets the job that initiated (created) this job.

Specified by:
getParent in interface IJob
Returns:
(optional) Returns the job that initiated this job. Schema jobs have no parent.

setParent

public final void setParent(IJob aParent)
Description copied from interface: IJob
Sets the parent job.

Specified by:
setParent in interface IJob
Parameters:
aParent - (required).

iterRefsForCreation

public final java.util.Iterator iterRefsForCreation()
Description copied from interface: IJob
Iterates the references that must be resolved before the creation step of this job can be executed.

Specified by:
iterRefsForCreation in interface IJob
Returns:
Returns an iterator of IJobRef. (required)

iterRefsForCompletion

public final java.util.Iterator iterRefsForCompletion()
Description copied from interface: IJob
Iterates the references that must be resolved before the completion step of this job can be executed.

Specified by:
iterRefsForCompletion in interface IJob
Returns:
Returns an iterator of IJobRef. (required)

iterRefsForValidation

public final java.util.Iterator iterRefsForValidation()
Description copied from interface: IJob
Iterates the references that must be resolved before the validation step of this job can be executed.

Specified by:
iterRefsForValidation in interface IJob
Returns:
Returns an iterator of IJobRef. (required)

collectRefsForCreation

protected abstract void collectRefsForCreation(IJobRefs aJobRefs)

collectRefsForCompletion

protected abstract void collectRefsForCompletion(IJobRefs aJobRefs)

collectRefsForValidation

protected abstract void collectRefsForValidation(IJobRefs aJobRefs)

addSubJob

protected void addSubJob(IJob aJob)

iterSubJobs

public java.util.Iterator iterSubJobs()
Description copied from interface: IJob
Iterates the sub jobs of this job.

Specified by:
iterSubJobs in interface IJob
Returns:
An iterator of IJobs.

executeCreation

public final void executeCreation(IConstraintViolations aViolations)
Description copied from interface: IJob
Executes the creation step of the job. This step may be executed if all necessary references can be resolved (cf. iterRefsForCreation.

Specified by:
executeCreation in interface IJob
Returns:
Returns true iff the step was executed successfully.

doExecuteCreation

protected abstract void doExecuteCreation(IConstraintViolations aViolations)

executeCompletion

public final void executeCompletion(IConstraintViolations aViolations)
Description copied from interface: IJob
Executes the completion step of the job. This step may be executed if all necessary references can be resolved (cf. iterRefsForCompletion.

Specified by:
executeCompletion in interface IJob
Returns:
Returns true iff the step was executed successfully.

doExecuteCompletion

protected abstract void doExecuteCompletion(IConstraintViolations aViolations)

executeValidation

public final void executeValidation(IConstraintViolations aViolations)
Description copied from interface: IJob
Executes the validation step of the job. This step may be executed if all necessary references can be resolved (cf. iterRefsForValidation and if the validation steps of all sub jobs have been executed.

Specified by:
executeValidation in interface IJob
Returns:
Returns true iff the step was executed successfully.

doExecuteValidation

protected abstract void doExecuteValidation(IConstraintViolations aViolations)

checkSubJobsValidated

public boolean checkSubJobsValidated()
Description copied from interface: IJob
Checks if the validation step of all sub jobs has been executed.

Specified by:
checkSubJobsValidated in interface IJob
Returns:
Returns true iff the validation steps of all sub jobs have been executed.

toString

public java.lang.String toString()

getLocation

public ILocation getLocation()
Specified by:
getLocation in interface IHasLocation