Class SubmissionExtractDataService

java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.submission.SubmissionExtractDataService

public class SubmissionExtractDataService extends CayenneService
Provides service methods around submission data extract values
  • Constructor Details

    • SubmissionExtractDataService

      public SubmissionExtractDataService()
  • Method Details

    • store

      public void store(Submission submission, Map<String,String> dataMap)
      Store the given XML data extract map against the given submission.
      Parameters:
      submission - the submission to store the data extracts against (required)
      dataMap - the XML data extract map (required)
      Since:
      5.1.0
    • store

      public void store(Submission submission, Map<String,String> dataMap, ISubmissionDataStorageService storageService, boolean backwardCompatibility)
      Store the given XML data extract map against the given submission.
      Parameters:
      submission - the submission to store the data extracts against (required)
      dataMap - the XML data extract map (required)
      storageService - the submission data storage service
      backwardCompatibility - support submission extract data entities for backward compatibility
      Since:
      17.10.0
    • getCondensedExtractDataAsXLS

      public byte[] getCondensedExtractDataAsXLS(TemplateVersion version, Date startDate, Date endDate, boolean zipOutput) throws IOException
      Return an Excel spreadsheet that contains the submission extract data for a form version and date range. Only submissions in form status Submission.STATUS_Completed will be considered. Note: Only extract data mappings defined in the schema seed currently are considered. If mappings have been deleted, data extracted for these mappings will not be included.
      Parameters:
      version - the form version (required, must have a schema seed)
      startDate - the start date (required)
      endDate - the end date (required)
      zipOutput - whether to return ZIP file data containing the XLS, or just the XLS itself
      Returns:
      a byte array representing the XLS file, or the ZIP file if zipOutput was set
      Throws:
      IOException - if an error occurs while generating the XLS file data
    • getExtractDataXlsForFormStatus

      public byte[] getExtractDataXlsForFormStatus(TemplateVersion version, Set<String> formStatusValues, Date startDate, Date endDate, boolean zipOutput) throws IOException
      Return an Excel spreadsheet that contains the submission extract data for a form version, a set of submission form status values and date range.
      Parameters:
      version - the form version (required, must have a schema seed)
      formStatusValues - the set of submission form status values to filter on (used only if it contains at least one entry)
      startDate - the start date (required)
      endDate - the end date (required)
      zipOutput - whether to zip the XLS file
      Returns:
      a byte array representing the XLS file, or the ZIP file if zipOutput was set
      Throws:
      IOException - if an error occurs while generating the XLS file data
      Since:
      4.1.0
    • mustEncryptDataExtractValue

      @Deprecated public boolean mustEncryptDataExtractValue(Submission submission, String name)
      Deprecated.
      Check whether the values for the data extract with the given name must be encrypted.
      Parameters:
      submission - the submission
      name - the name of the data extract
      Returns:
      true
      Since:
      4.3.0