Class ExportingService
java.lang.Object
org.dlese.dpc.schemedit.threadedservices.MonitoredTask
org.dlese.dpc.schemedit.threadedservices.ThreadedService
org.dlese.dpc.schemedit.threadedservices.ExportingService
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
ConstructorsConstructorDescriptionExportingService(ServletContext servletContext, String exportingServiceDataDir, String exportBaseDir, String xslPath) Constructor for the ExportingService object -
Method Summary
Modifier and TypeMethodDescriptionvoidexportRecords(File destDir, DcsSetInfo dcsSetInfo, String[] statuses, SessionBean sessionBean) Exports records from specified collection and having specified statuses to disk in a separate ExportThread.voidexportRecords(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.voidexportRecords(List idsToExport, File destDir, ThreadedServiceObserver observer) Triggered by ExportThread.run, writes specified records to a directory on disk and save report.Gets the exportBaseDir attribute of the ExportingService objectGets the exportingSetInfo attribute of the ExportingService objectGets the exportReport attribute of the ExportingService objectbooleanisLegalExportDest(File destDir) Gets the legalExportDest attribute of the ExportingService objectprotected static voidPrint a line to standard out.static FilevalidateExportDestination(String exportBaseDir, String relativeDestPath) NOT YET DOCUMENTEDMethods 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, validationIsStaleMethods inherited from class org.dlese.dpc.schemedit.threadedservices.MonitoredTask
getTaskProgress, setTaskProgress
-
Constructor Details
-
ExportingService
public ExportingService(ServletContext servletContext, String exportingServiceDataDir, String exportBaseDir, String xslPath) Constructor for the ExportingService object- Parameters:
servletContext- NOT YET DOCUMENTEDexportingServiceDataDir- Description of the ParameterexportBaseDir- NOT YET DOCUMENTEDxslPath- NOT YET DOCUMENTED
-
-
Method Details
-
getExportingSetInfo
Gets the exportingSetInfo attribute of the ExportingService object- Returns:
- The exportingSetInfo value
-
getExportBaseDir
Gets the exportBaseDir attribute of the ExportingService object- Returns:
- The exportBaseDir value
-
isLegalExportDest
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 DOCUMENTEDrelativeDestPath- NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
- Throws:
Exception- NOT YET DOCUMENTED
-
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 directorydcsSetInfo- setInfo for collection to be exportedstatuses- record statuses to be exportedsessionBean- 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 directorydcsSetInfo- setInfo for collection to be exportedstatuses- record statuses to be exportedsessionBean- NOT YET DOCUMENTEDobserver- observer receives notification when export is complete.- Throws:
ExportingServiceException- NOT YET DOCUMENTED
-
exportRecords
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:
idsToExport- NOT YET DOCUMENTEDdestDir- Description of the Parameterobserver- NOT YET DOCUMENTED
-
prtln
Print a line to standard out.- Parameters:
s- The String to print.
-