atg.repository.loader
Interface Job


public interface Job

Represents a logical but not transactional unit of work managed by the LoaderManager. A completed Job will contain one or more Batch objects. It also offers access to the aggregated errors and results (if available) in the form of an ErrorList or ResultList.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static boolean DELETE_OP
           
static boolean UPDATE_OP
           
 
Method Summary
 Batch getCompletedBatch(int pIndex)
          Returns the completed Batch object at the index provided or null if no Batch object exists in the job at that index.
 int getCompletedBatchCount()
          Returns the number of completed batches that have been run for the job, not including any that may still be running.
 ErrorList getErrorList()
           Returns an aggregate ErrorList or null if 1) the Job is not in a COMPLETE or FAILED state, 2) the Job is RUNNING but has not completed processing its first batch, or 3) the Job contains no Errors.
 int getErrorListSize()
          Returns the number of elements in the ErrorList property.
 java.util.Collection getFileElements()
          Returns an immutable Collection of File objects comprising the Job.
 int getFileElementsSize()
          Returns the number of File objects comprising the Job.
 atg.repository.loader.JobId getID()
          The unique, immutable identifier of this Job
 ResultList getResultList()
          Returns an aggregate ResultList or null if 1) the Job is not in a COMPLETE or FAILED state, 2) the Job is RUNNING but has not completed processing its first batch, or 3) the Job contains no Results (because it failed entirely or because the Job has been configured to record only Errors.) The order of results is the order in which the source files were processed.
 int getResultListSize()
          Returns the number of elements in the ResultList property.
 atg.repository.loader.JobStatus getStatus()
          The current status of the Job.
 long getTimeCreated()
          Returns the timestamp when the Job was created.
 long getTimeStarted()
          Returns the time when the Job started processing or 0 if the Job has not been started.
 long getTimeStopped()
          Returns the time when the Job finished processing or 0 if the Job has not started running or has not yet finished.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

DELETE_OP

static final boolean DELETE_OP
See Also:
Constant Field Values

UPDATE_OP

static final boolean UPDATE_OP
See Also:
Constant Field Values
Method Detail

getID

atg.repository.loader.JobId getID()
The unique, immutable identifier of this Job


getStatus

atg.repository.loader.JobStatus getStatus()
The current status of the Job.

See Also:
for a description of the states

getTimeCreated

long getTimeCreated()
Returns the timestamp when the Job was created.


getTimeStarted

long getTimeStarted()
Returns the time when the Job started processing or 0 if the Job has not been started.


getTimeStopped

long getTimeStopped()
Returns the time when the Job finished processing or 0 if the Job has not started running or has not yet finished.


getFileElements

java.util.Collection getFileElements()
                                     throws atg.repository.loader.JobException
Returns an immutable Collection of File objects comprising the Job. This method should be called cautiously since the returned Collection may be extremely large.

Throws:
JobException - if the collection could not be returned.

getFileElementsSize

int getFileElementsSize()
Returns the number of File objects comprising the Job.


getResultList

ResultList getResultList()
Returns an aggregate ResultList or null if 1) the Job is not in a COMPLETE or FAILED state, 2) the Job is RUNNING but has not completed processing its first batch, or 3) the Job contains no Results (because it failed entirely or because the Job has been configured to record only Errors.) The order of results is the order in which the source files were processed.

This is a convenience method. The same information can be found by calling getBatchElements() on each completed Batch and sorting the BatchElements for instances of BatchElement.ERROR_RESULT.


getResultListSize

int getResultListSize()
Returns the number of elements in the ResultList property.


getErrorList

ErrorList getErrorList()

Returns an aggregate ErrorList or null if 1) the Job is not in a COMPLETE or FAILED state, 2) the Job is RUNNING but has not completed processing its first batch, or 3) the Job contains no Errors. The order of Errors is the order in which the source files were processed.

This is a convenience method. The same information can be found by calling getBatchElements() on each completed Batch and sorting the BatchElements for instances of BatchElement.ERROR_TYPE.


getErrorListSize

int getErrorListSize()
Returns the number of elements in the ErrorList property.


getCompletedBatchCount

int getCompletedBatchCount()
Returns the number of completed batches that have been run for the job, not including any that may still be running. Jobs that are in the COMPLETED or FAILED state return the complete number of batches.


getCompletedBatch

Batch getCompletedBatch(int pIndex)
Returns the completed Batch object at the index provided or null if no Batch object exists in the job at that index.