Class 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
  • Constructor Details

    • ExportingService

      public ExportingService(ServletContext servletContext, String exportingServiceDataDir, String exportBaseDir, String xslPath)
      Constructor for the ExportingService object
      Parameters:
      servletContext - NOT YET DOCUMENTED
      exportingServiceDataDir - Description of the Parameter
      exportBaseDir - NOT YET DOCUMENTED
      xslPath - NOT YET DOCUMENTED
  • Method Details

    • 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:
      idsToExport - NOT YET DOCUMENTED
      destDir - Description of the Parameter
      observer - NOT YET DOCUMENTED
    • prtln

      protected static void prtln(String s)
      Print a line to standard out.
      Parameters:
      s - The String to print.