atg.repository.loader
Interface LoaderManager


public interface LoaderManager

The LoaderManager API provides a set of overloaded methods for performing the fixed operations on sets of Files and methods for processing XML formatted manifest files (that describe operations and other parameters on a per file basis.) It also provides methods for managing the Job objects it creates to process files.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 atg.repository.loader.JobId add(java.io.File[] pFiles, atg.repository.loader.TypeMapper pMapper, int pBatchSizeHint)
          Adds the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.
 atg.repository.loader.JobId add(java.io.File[] pFiles, atg.repository.loader.TypeMapper pMapper, java.util.Properties pProperties)
          Adds the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.
 atg.repository.loader.JobId add(java.io.File[] pFiles, atg.repository.loader.TypeMapping[] pMappings, int pBatchSizeHint)
          Adds the provided Files using data from the matching TypeMappings as needed.
 atg.repository.loader.JobId add(java.io.File[] pFiles, atg.repository.loader.TypeMapping[] pMappings, java.util.Properties pProperties)
          Adds the provided Files using data from the matching TypeMappings as needed.
 boolean cancelJob(atg.repository.loader.JobId pId)
          Allows a Job that has not yet started running to be removed from the queue.
 void deleteJobs(atg.repository.loader.JobId[] pIds)
          Deletes the jobs specified by the array of ID's.
 Job getJob(atg.repository.loader.JobId pId)
          Returns the Job matching the provided JobID.
 java.util.Collection getJobs()
          Returns a Collection of all the current Jobs.
 boolean isRecordResultsForJob()
          Returns whether jobs will record information about successfully processed files as well as errors.
 atg.repository.loader.JobId processManifest(java.io.File pManifestFile, java.util.Properties pProperties)
          Processes the files specified in the provided "manifest" file, adding, updating or deleting as directed.
 atg.repository.loader.JobId processManifest(java.io.File pManifestFile, atg.repository.loader.TypeMapper pMapper, java.util.Properties pProperties)
          Processes the files specified in the provided "manifest" file, adding, updating or deleting as directed.
 atg.repository.loader.JobId remove(java.io.File[] pFiles, atg.repository.loader.TypeMapper pMapper, int pBatchSizeHint)
          Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.
 atg.repository.loader.JobId remove(java.io.File[] pFiles, atg.repository.loader.TypeMapper pMapper, java.util.Properties pProperties)
          Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.
 atg.repository.loader.JobId remove(java.io.File[] pFiles, atg.repository.loader.TypeMapper pMapper, java.util.Properties pProperties, boolean pReverseOrder)
          Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.
 atg.repository.loader.JobId remove(java.io.File[] pFiles, atg.repository.loader.TypeMapping[] pMappings, int pBatchSizeHint)
          Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.
 atg.repository.loader.JobId remove(java.io.File[] pFiles, atg.repository.loader.TypeMapping[] pMappings, java.util.Properties pProperties)
          Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.
 void setRecordResultsForJob(boolean pRecordResultsForJob)
          Sets whether jobs will record information about successfully processed files as well as errors.
 atg.repository.loader.JobId update(java.io.File[] pFiles, atg.repository.loader.TypeMapper pMapper, int pBatchSizeHint)
          Updates the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.
 atg.repository.loader.JobId update(java.io.File[] pFiles, atg.repository.loader.TypeMapper pMapper, java.util.Properties pProperties)
          Updates the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.
 atg.repository.loader.JobId update(java.io.File[] pFiles, atg.repository.loader.TypeMapping[] pMappings, int pBatchSizeHint)
          Updates the provided Files using data from the matching TypeMappings as needed.
 atg.repository.loader.JobId update(java.io.File[] pFiles, atg.repository.loader.TypeMapping[] pMappings, java.util.Properties pProperties)
          Updates the provided Files using data from the matching TypeMappings as needed.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

setRecordResultsForJob

void setRecordResultsForJob(boolean pRecordResultsForJob)
Sets whether jobs will record information about successfully processed files as well as errors.


isRecordResultsForJob

boolean isRecordResultsForJob()
Returns whether jobs will record information about successfully processed files as well as errors.


add

atg.repository.loader.JobId add(java.io.File[] pFiles,
                                atg.repository.loader.TypeMapping[] pMappings,
                                int pBatchSizeHint)
                                throws atg.repository.loader.LoaderException
Adds the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMappings - the matching array of TypeMappings
pBatchSizeHint - the number of files that should be processed in a single transaction. The backend is free to treat this as an approximation (due to relationships between items) or ignore it altogether.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

add

atg.repository.loader.JobId add(java.io.File[] pFiles,
                                atg.repository.loader.TypeMapping[] pMappings,
                                java.util.Properties pProperties)
                                throws atg.repository.loader.LoaderException
Adds the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMappings - the matching array of TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

add

atg.repository.loader.JobId add(java.io.File[] pFiles,
                                atg.repository.loader.TypeMapper pMapper,
                                int pBatchSizeHint)
                                throws atg.repository.loader.LoaderException
Adds the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.

Parameters:
pFiles - the array of input source Files
pMapper - the TypeMapper that should be used to provide TypeMappings
pBatchSizeHint - specifies the number of files that should be processed in a single transaction. The backend is free to treat this as an approximation (due to relationships between items) or ignore it altogether.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

add

atg.repository.loader.JobId add(java.io.File[] pFiles,
                                atg.repository.loader.TypeMapper pMapper,
                                java.util.Properties pProperties)
                                throws atg.repository.loader.LoaderException
Adds the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.

Parameters:
pFiles - the array of input source Files
pMapper - the TypeMapper that should be used to provide TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

update

atg.repository.loader.JobId update(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapping[] pMappings,
                                   int pBatchSizeHint)
                                   throws atg.repository.loader.LoaderException
Updates the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMappings - the matching array of TypeMappings
pBatchSizeHint - specifies the number of files that should be processed in a single transaction. The backend is free to treat this as an approximation (due to relationships between items) or ignore it altogether.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

update

atg.repository.loader.JobId update(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapping[] pMappings,
                                   java.util.Properties pProperties)
                                   throws atg.repository.loader.LoaderException
Updates the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMappings - the matching array of TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

update

atg.repository.loader.JobId update(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapper pMapper,
                                   int pBatchSizeHint)
                                   throws atg.repository.loader.LoaderException
Updates the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.

Parameters:
pFiles - the array of input source Files
pMapper - the TypeMapper that should be used to provide TypeMappings
pBatchSizeHint - specifies the number of files that should be processed in a single transaction. The backend is free to treat this as an approximation (due to relationships between items) or ignore it altogether.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

update

atg.repository.loader.JobId update(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapper pMapper,
                                   java.util.Properties pProperties)
                                   throws atg.repository.loader.LoaderException
Updates the provided Files using data from the provided TypeMapper which must know how to return an appropriate TypeMapping from getMapping() given a File object.

Parameters:
pFiles - the array of input source Files
pMapper - the TypeMapper that should be used to provide TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Returns:
the JobId of the new Job created to perform the load operation
Throws:
atg.repository.loader.LoaderException

remove

atg.repository.loader.JobId remove(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapping[] pMappings,
                                   int pBatchSizeHint)
                                   throws atg.repository.loader.LoaderException
Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMappings - the matching array of TypeMappings
pBatchSize - specifies the number of files that should be processed in a single transaction. The backend is free to treat this as an approximation (due to relationships between items) or ignore it altogether.
Returns:
the JobId of the new Job created to perform the remove operation
Throws:
atg.repository.loader.LoaderException

remove

atg.repository.loader.JobId remove(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapper pMapper,
                                   int pBatchSizeHint)
                                   throws atg.repository.loader.LoaderException
Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMapper - the TypeMapper that should be used to provide TypeMappings
pBatchSize - specifies the number of files that should be processed in a single transaction. The backend is free to treat this as an approximation (due to relationships between items) or ignore it altogether.
Returns:
the JobId of the new Job created to perform the remove operation
Throws:
atg.repository.loader.LoaderException

remove

atg.repository.loader.JobId remove(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapping[] pMappings,
                                   java.util.Properties pProperties)
                                   throws atg.repository.loader.LoaderException
Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMappings - the matching array of TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Returns:
the JobId of the new Job created to perform the remove operation
Throws:
atg.repository.loader.LoaderException

remove

atg.repository.loader.JobId remove(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapper pMapper,
                                   java.util.Properties pProperties)
                                   throws atg.repository.loader.LoaderException
Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMapper - the TypeMapper that should be used to provide TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Returns:
the JobId of the new Job created to perform the remove operation
Throws:
atg.repository.loader.LoaderException

remove

atg.repository.loader.JobId remove(java.io.File[] pFiles,
                                   atg.repository.loader.TypeMapper pMapper,
                                   java.util.Properties pProperties,
                                   boolean pReverseOrder)
                                   throws atg.repository.loader.LoaderException
Removes repository items corresponding to the provided Files using data from the matching TypeMappings as needed.

Parameters:
pFiles - the array of input source Files
pMapper - the TypeMapper that should be used to provide TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
pReverseOrder - should the file array be processed in reverse order possibly to deal with foreign key constraints on parent folders?
Returns:
the JobId of the new Job created to perform the remove operation
Throws:
atg.repository.loader.LoaderException

processManifest

atg.repository.loader.JobId processManifest(java.io.File pManifestFile,
                                            java.util.Properties pProperties)
                                            throws atg.repository.loader.LoaderException
Processes the files specified in the provided "manifest" file, adding, updating or deleting as directed. The manifest file must conform to the rl-manifest_1.0.dtd.

Parameters:
pManifestFile - the text file of file names to be processed.
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Throws:
atg.repository.loader.LoaderException

processManifest

atg.repository.loader.JobId processManifest(java.io.File pManifestFile,
                                            atg.repository.loader.TypeMapper pMapper,
                                            java.util.Properties pProperties)
                                            throws atg.repository.loader.LoaderException
Processes the files specified in the provided "manifest" file, adding, updating or deleting as directed. The manifest file must conform to the rl-manifest_1.0.dtd.

Parameters:
pManifestFile - the text file of file names to be processed.
pMapper - the TypeMapper that should be used to provide TypeMappings
pProperties - a dictionary of properties which the LoaderManager can use as hints for the load operation.
Throws:
atg.repository.loader.LoaderException

getJob

Job getJob(atg.repository.loader.JobId pId)
Returns the Job matching the provided JobID.

Parameters:
pId - the JobId of the Job requested.
Returns:
The Job object matching the provided JobId or null if there are no Jobs matching the provided JobId.

getJobs

java.util.Collection getJobs()
Returns a Collection of all the current Jobs.

Returns:
a Collection of Job objects

deleteJobs

void deleteJobs(atg.repository.loader.JobId[] pIds)
Deletes the jobs specified by the array of ID's. The jobs must be in the FAILED, COMPLETE, or CANCELLED state to be deleted.

Parameters:
pIds - job ID's

cancelJob

boolean cancelJob(atg.repository.loader.JobId pId)
                  throws atg.repository.loader.LoaderException
Allows a Job that has not yet started running to be removed from the queue.

Returns:
true if the job was cancelled, false if cancellation was not possible, i.e. the job had already starting running.
Throws:
atg.repository.loader.LoaderException