DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.threadedservices
Class ExportingService

java.lang.Object
  extended by org.dlese.dpc.schemedit.threadedservices.MonitoredTask
      extended by org.dlese.dpc.schemedit.threadedservices.ThreadedService
          extended by org.dlese.dpc.schemedit.threadedservices.ExportingService

public class ExportingService
extends ThreadedService

Supports exporting of collections and portions of collections to disk. Exported records are stripped of cataloger information.

Author:
ostwald

Nested Class Summary
 
Nested classes/interfaces inherited from class org.dlese.dpc.schemedit.threadedservices.ThreadedService
ThreadedService.SortReports
 
Field Summary
 
Fields inherited from class org.dlese.dpc.schemedit.threadedservices.ThreadedService
dataStore, dcsDataManager, dcsSetInfo, index, indexOnValidation, isProcessing, NUM_STATUS_MESSAGES, servletContext, sessionBean, statuses, stopProcessing, validateFiles
 
Constructor Summary
ExportingService(ServletContext servletContext, String exportingServiceDataDir, String exportBaseDir, String xslPath)
          Constructor for the ExportingService object
 
Method Summary
 void exportRecords(File destDir, DcsSetInfo dcsSetInfo, String[] statuses, SessionBean sessionBean)
          Exports records from specified collection and having specified statuses to disk in a separate ExportThread.
 void exportRecords(File destDir, DcsSetInfo dcsSetInfo, String[] statuses, SessionBean sessionBean, ThreadedServiceObserver observer)
          Exports records from specified collection and having specified statuses to disk, notifying observer when ExportThread is completed.
 void exportRecords(List idsToExport, File destDir, ThreadedServiceObserver observer)
          Triggered by ExportThread.run, writes specified records to a directory on disk and save report.
 String getExportBaseDir()
          Gets the exportBaseDir attribute of the ExportingService object
 DcsSetInfo getExportingSetInfo()
          Gets the exportingSetInfo attribute of the ExportingService object
 ExportReport getExportReport()
          Gets the exportReport attribute of the ExportingService object
 boolean isLegalExportDest(File destDir)
          Gets the legalExportDest attribute of the ExportingService object
protected static void prtln(String s)
          Print a line to standard out.
static File validateExportDestination(String exportBaseDir, String relativeDestPath)
          NOT YET DOCUMENTED
 
Methods inherited from class org.dlese.dpc.schemedit.threadedservices.ThreadedService
addStatusMessage, archiveServiceReport, buildQuery, clearServiceReport, clearStatusMessages, getArchivedReport, getArchivedReports, getDateStamp, getDocReader, getIdList, getIndexOnValidation, getIsProcessing, getServiceReport, getSessionId, getSimpleDateStamp, getStatusMessages, list2delimitedString, setDcsSetInfo, setIndexOnValidation, setServiceReport, setStatuses, setValidationEnabled, stopProcessing, validate, validationIsStale
 
Methods inherited from class org.dlese.dpc.schemedit.threadedservices.MonitoredTask
getTaskProgress, setTaskProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportingService

public ExportingService(ServletContext servletContext,
                        String exportingServiceDataDir,
                        String exportBaseDir,
                        String xslPath)
Constructor for the ExportingService object

Parameters:
exportingServiceDataDir - Description of the Parameter
servletContext - NOT YET DOCUMENTED
exportBaseDir - NOT YET DOCUMENTED
xslPath - NOT YET DOCUMENTED
Method Detail

getExportingSetInfo

public DcsSetInfo getExportingSetInfo()
Gets the exportingSetInfo attribute of the ExportingService object

Returns:
The exportingSetInfo value

getExportBaseDir

public String getExportBaseDir()
Gets the exportBaseDir attribute of the ExportingService object

Returns:
The exportBaseDir value

isLegalExportDest

public boolean isLegalExportDest(File destDir)
Gets the legalExportDest attribute of the ExportingService object

Parameters:
destDir - NOT YET DOCUMENTED
Returns:
The legalExportDest value

validateExportDestination

public static File validateExportDestination(String exportBaseDir,
                                             String relativeDestPath)
                                      throws Exception
NOT YET DOCUMENTED

Parameters:
exportBaseDir - NOT YET DOCUMENTED
relativeDestPath - NOT YET DOCUMENTED
Returns:
NOT YET DOCUMENTED
Throws:
Exception - NOT YET DOCUMENTED

getExportReport

public ExportReport getExportReport()
Gets the exportReport attribute of the ExportingService object

Returns:
The exportReport value

exportRecords

public void exportRecords(File destDir,
                          DcsSetInfo dcsSetInfo,
                          String[] statuses,
                          SessionBean sessionBean)
                   throws ExportingServiceException
Exports records from specified collection and having specified statuses to disk in a separate ExportThread.

Parameters:
destDir - export directory
dcsSetInfo - setInfo for collection to be exported
statuses - record statuses to be exported
sessionBean - NOT YET DOCUMENTED
Throws:
ExportingServiceException - if unable to export

exportRecords

public void exportRecords(File destDir,
                          DcsSetInfo dcsSetInfo,
                          String[] statuses,
                          SessionBean sessionBean,
                          ThreadedServiceObserver observer)
                   throws ExportingServiceException
Exports records from specified collection and having specified statuses to disk, notifying observer when ExportThread is completed.

This method will not complete if another ExportThread is active.

Parameters:
destDir - export directory
dcsSetInfo - setInfo for collection to be exported
statuses - record statuses to be exported
sessionBean - NOT YET DOCUMENTED
observer - observer receives notification when export is complete.
Throws:
ExportingServiceException - NOT YET DOCUMENTED

exportRecords

public void exportRecords(List idsToExport,
                          File destDir,
                          ThreadedServiceObserver observer)
Triggered by ExportThread.run, writes specified records to a directory on disk and save report.

NOTE: this method assumes the destination directory has been validated and exists.

Parameters:
destDir - Description of the Parameter
idsToExport - NOT YET DOCUMENTED
observer - NOT YET DOCUMENTED

prtln

protected static void prtln(String s)
Print a line to standard out.

Parameters:
s - The String to print.

DLESE Tools
v1.6.0