Class SubmissionDataDao


public class SubmissionDataDao extends AbstractDao
Provides a Submission Data DAO to provide safe read only access to submission data. This class uses the underlying ISubmissionDataStorageService to access the submission data.

This class can be used by Groovy Service to access submission data. Note Groovy Services are not permitted to use ISubmissionDataStorageService directly.

Also note the Groovy Client Data Isolation policy is enforce by the class. If the execution context does not have client data access rights then these methods will return null.

 import com.avoka.fc.core.dao.SubmissionDataDao

 def submissionDataDao = new SubmissionDataDao()

 def submissionXmlString = submissionDataDao.getSubmissionXmlString(submission)
 
Since:
3.6.0
  • Constructor Details

    • SubmissionDataDao

      public SubmissionDataDao()
  • Method Details

    • getFormDataMap

      public Map<String,String> getFormDataMap(Submission submission)
      Return the Form Data Map for the given submission based on the submission extract data. Extract names will be converted into Java property format to enable easier use in scripts.
       "First Name" -> "firstName
       
      Parameters:
      submission - the submission to return data form data extract from (required)
      Returns:
      the submission form data extract map, or null of access is not permitted
      Since:
      4.0.0
    • getSubmissionReceipt

      public byte[] getSubmissionReceipt(Submission submission)
      Gets the submission receipt data.
      Parameters:
      submission - the submission (required)
      Returns:
      the submission receipt
    • getSubmissionXml

      public byte[] getSubmissionXml(Submission submission)
      Gets the submission XML data.
      Parameters:
      submission - the submission (required)
      Returns:
      the submission XML
    • getSubmissionXmlString

      public String getSubmissionXmlString(Submission submission)
      Gets the submission XML data as a UTF-8 encoded text.
      Parameters:
      submission - the submission (required)
      Returns:
      the submission XML as a UTF-8 encoded text.
    • getSubmissionXmlDocument

      public Document getSubmissionXmlDocument(Submission submission)
      Gets the submission XML data as Document object.
      Parameters:
      submission - the submission (required)
      Returns:
      the submission XML as a Document object.
      Since:
      4.0.0
    • getSubmissionHistoryXml

      public byte[] getSubmissionHistoryXml(SubmissionHistory history)
      Gets the submission history XML data.
      Parameters:
      history - the history (required)
      Returns:
      the submission history XML
    • getAttachment

      public byte[] getAttachment(FileUpload fileUpload)
      Gets the attachment file data.
      Parameters:
      fileUpload - the file upload
      Returns:
      the attachment