Package com.avoka.fc.core.dao
Class SubmissionDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.SubmissionDao
Provides a DAO for the Submission entity.
- See Also:
-
Field Summary
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddProcessingStatus
(Submission submission, String status, UserAccount user) Return a processing status entry to a submission.addProcessingStatusWithLoginName
(Submission submission, String status, String loginName) Return a processing status entry to a submission.copyAttachmentToSubmission
(Attachment attachment, Submission targetSubmission, RequiredAttachment targetRA) Copy the attachment to the specified submission, cloning the file upload data.void
copyRequiredAttachmentToSubmission
(RequiredAttachment requiredAttachment, Submission targetSubmission) Copy the required attachment to the specified submission, cloning the associated attachment and file data.void
copyRequiredAttachmentToSubmission
(RequiredAttachment requiredAttachment, Submission targetSubmission, Document targetXmlDoc) Copy the required attachment to the specified submission, cloning the associated attachment and file data.getAbandonedLegacyTasks
(int fetchLimit) getAbandonedLegacyTransactions
(int fetchLimit) int
getAbandonedSubmissionCount
(String genericSearchValue, String clientId, Date startDate, Date endDate, String attachmentStatus, String paymentStatus, String emailVerificationStatus, String deliveryStatus, Integer transactionScore) Return the number of abandoned submissions matching the specified search criteria.getAbandonedSubmissionList
(String genericSearchValue, String clientId, String portalId, String abandonmentType, Integer transactionScore, Date startDate, Date endDate) Return the list of submission with a form status of 'Abandoned' which meet the specified criteria.getAbandonedSubmissionsForDelivery
(int maxRows) Deprecated.getAdminCachedFormSubmissions
(Form form, int fetchLimit) Return the most recent non-test administrator cached form submissions for the given form.getAdminFormSubmissions
(String clientId) Return the most recent form submissions for the specified admin client or all clients if not specified.getAllSubmissionsByFilter
(String submissionQueryFilter, String dateField, Date cutoffDate) Deprecated.getAnonymousBgSaveSubmissionsForAbandonment
(int maxRows) Return a list of Form Starts (auto saved, but no user save), which are configured for abandonment delivery and reach the form configured abandon submitted timeout.int
getAssignedTaskCountForUser
(UserAccount userAccount, Portal portal, boolean includeGroupTasks) Get the number of assigned task submissions for the specified user and portal.getAssignedTasksForUser
(UserAccount userAccount, Portal portal, int maxNumber, boolean includeGroupTasks) Get the list of assigned task submissions for the specified user and portal.int
Gets the finished submission count (Completed or Abandoned).getCompletedSubmissionsForUser
(UserAccount user, String keyword, String clientName, String formNameLike, Date fromDate, Date toDate, Portal portal, Map<String, String> submissionExtractDataSearch, boolean includeGroupSubmission) Return the list of completed submissions for the given user.getCompletedSubmissionsForUser
(String keywordLike, UserAccount userAccount, Portal portal, boolean includeGroupSubmission) Provide the keyword search Submission History results based on the user own account or group access control.getCompletedSubmissionsForUser
(String keywordLike, UserAccount userAccount, Portal portal, List<String> groupNames, Set<Long> clientIdSet, Integer fetchLimit) Provide the keyword search Submission History results based on the user own account or group access control.getCompletedSubmissionsForUserAndForms
(UserAccount user, Collection<String> formCodes, Date fromDate, Date toDate, Portal portal, Map<String, String> submissionExtractDataSearch, boolean includeGroupSubmission) Return the list of completed submissions for the given user.Queries for outstanding DocuSign transactions and returns a Map linking the a DocuSign envelopeId to a SubmissionIdgetDraftsForUser
(UserAccount userAccount, Portal portal, List<String> groupNames, boolean includeGroupSubmission) Return the list of draft or 'Saved' submissions for a given user and portal.getEscalations
(Date cutoffTime) Return information on how many clients have submissions for which delivery has not been completed after a specified cutoff timegetExpiredSubmissionsToAbandon
(int fetchLimit) Return the list of expired submissions to abandon.getExpiredTasksRequiringAbandonment
(int fetchLimit) Returns the list of tasks which have been 'Expired' and data deleted but have no purge time set.getFormSubmissions
(Form form, int fetchLimit) Return the most recent non-test form submissions for the given form.getFormSubmissions
(String clientId, int fetchLimit) Return the most recent form submissions for the specified client or all clients if not specified.getHelpDeskSubmissions
(Portal portal, String keyword, String formStatus, Date startDate, boolean includeAnonymousSubmissions, boolean includeAuthenticatedSubmissions) Return a the list help desk submission.getInProgressSubmissionsForFormAndExpiryDate
(Form form, Date submissionExpiryDate) Return the list of in progress submissions (Opened, Assigned, Saved, Submitted) for the given form and submission expiry date.Returns the submissions that are marked delivery completed and have jobDeliveryRequiredFlag set to true.long
Return the last submission id.getMandatoryRequiredAttachments
(Submission submission) Return the list of mandatory required attachments for the given submissiongetNextRestDeliverySubmission
(DeliveryDetails deliveryDetails) Return the next REST delivery submission ready for delivery.getNextSubmissionsForDeliveryDetailsAndStatus
(DeliveryDetails deliveryDetails, String deliveryStatus) Return the next delivery submissions for the specified delivery details and delivery status.int
Return the number of opened submission entriesgetOpenedSubmissionsForAbandonment
(int maxRows) Return a list of the n most recent opened and background save only submissions that are ready for abandonmentgetOptionalRequiredAttachments
(Submission submission) Return the list of optional required attachments for the given submissiongetPortalToDoSubmissionsForUser
(UserAccount userAccount, String keywordLike, List<String> statusList, Portal portal, boolean includeGroupSubmission) Return the list of incomplete submissions matching the specified search criteria.getPortalToDoSubmissionsForUser
(UserAccount userAccount, String keyword, List<String> submissionStatusList, Portal portal, List<String> groupNames, Set<Long> clientIdSet, Integer fetchLimit) Gets the portal to do submissions for user.getPurgeSubmissionIdList
(int fetchLimit) Return the list of Submission ID to purge.int
getRequiredPaymentSubmissionsCount
(int hours, Client client) Return a list of the n submissions with a Payment Status of "Required" which are older than a configurable period of time in days.Return the list of submissions with the delivery status of 'In-Progress' and delivery method 'REST Service' and where their next_delivery_time exceeds the current time.int
Return the number of saved submission entriesgetSavedSubmissionList
(String genericSearchValue, String clientId, String portalId, Integer transactionScore, Date startDate, Date endDate) Return the list of submission with a form status of 'Saved' which meet the specified criteria.getSavedSubmissionsForAbandonment
(int maxRows) Return a list of the n most recent save submissions that are ready for abandonmentgetSubmission
(Object id) Return the submission with the specified OIDgetSubmissionByEmailVerificationKey
(String emailKey) Return a submission with the specified email verification key.getSubmissionByKey
(String submitKey) Return a submission with the specified surrogate keygetSubmissionByKeyAndClient
(String clientKey, String submitKey) Return a submission for the given submission and client surrogate keys.getSubmissionByOfflineKey
(String offlineSubmitKey) Return the submission with the given offline submit keygetSubmissionByReceiptNumber
(String receiptNumber) Return a submission with the specified receipt numbergetSubmissionByTrackingNumber
(String trackingNumber) Return a submission with the specified tracking numbergetSubmissionDeliveryList
(String deliveryStatus, String clientId, String deliveryDetailsId, String formCode, String deliveryMessageLike, Date startDate, Date endDate, int fetchLimit) Return a list of submissions which match the delivery criteria.getSubmissionList
(String keyword, String clientId, Date startDate, Date endDate, String formStatus, String attachmentStatus, String paymentStatus, String emailVerificationStatus, String deliveryStatus, int offset, int pageSize) Return the list of submissions matching the specified search criteriagetSubmissionOverviewData
(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, boolean excludeJobsTasks, String periodType, Date startDate, Date endDate) Return live submission overview data for a time period.getSubmissionOverviewData
(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, String periodType, Date startDate, Date endDate) Deprecated.getSubmissionsByTransRefNumber
(String transRefNumber) Return the list of submissions matching the specified transaction reference number, ordered by PK.getSubmissionsDeliveredViaEmailBefore
(Date cutoffTime, int maxRows) Return the list of submissions for which secure email delivery was initiated before a specified cutoff timeint
Return the number of submission entries, excluding "Opened" submissionsgetSubmissionsForDeliveryDetailsAndStatus
(DeliveryDetails deliveryDetails, String deliveryStatus) Return the delivery submissions for the specified delivery details and delivery status.getSubmissionsForDeliveryDetailsAndStatus
(DeliveryDetails deliveryDetails, String deliveryStatus, int fetchLimit) Return the delivery submissions for the specified delivery details and delivery status.Return submissions for delivery, but with no delivery details configured.getSubmissionsForExternalUserId
(String externalUserId) Return the list of submissions with the given external user ID, ordered by submission time.getSubmissionsReadyForDelivery
(int maxRows) Return a list of the n most recent submission that are ready for delivery and for which a delivery method is configured.getSubmissionsReadyForDelivery
(Client client) Return the list of submissions for a specified client that are ready to be delivered, ordered by submission timeReturn the list of submissions that are ready for delivery via a web service delivery methodgetSubmissionsSearch
(String clientId, String value) Return a list of submissions whose form name contain the search string, or whose OID, form OID or user OID matches the search string if it is numeric.getSubmissionsToReceipt
(int fetchLimit, int maxRenderAttempts) Return submissions that are ready for receipt generation, ordered by submission time.getSubmissionSummaryData
(Long clientId, String portalId, Collection<TemplateVersion> versions, boolean excludeJobsTasks, Date startDate, Date endDate) Return live submission summary data for a time period.getSubmissionSummaryData
(Long clientId, String portalId, Collection<TemplateVersion> versions, Date startDate, Date endDate) Deprecated.getSubmissionTrendData
(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, String periodType, boolean excludeJobsTasks, Date startDate, Date endDate) Return live submission trend data for a time period and period type and optionally a specific form version.getSubmissionTrendData
(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, String periodType, Date startDate, Date endDate) Deprecated.getSubmittedOrCompletedSubmissionsForUser
(UserAccount userAccount, Portal portal, List<String> groupNames, boolean includeGroupSubmission) Return the list of completed submissions for the given user.getSubmittedSubmissionsForAbandonment
(int maxRows) Return a list of the n most recent save submissions that are ready for abandonmentgetSupportSearchList
(String clientId, String formId, String portalId, String refNumber, String userOrEmail, Boolean tasksInclude, Boolean jobsInclude, String formStatus, String attachmentStatus, String paymentStatus, String emailVerifStatus, String receiptStatus, String deliveryStatus, Date startDate, Date endDate, int fetchLimit) Provides a Transaction Support Search query.getTaskByKey
(String taskKey) Return the submission with the specified task key.getTaskSubmissionList
(String clientId, String keyword, String type, String status, Date startDate, Date endDate) Return the list of task submissions matching the specified search criteriagetTaskSubmissionList
(String clientId, String keyword, String type, String status, Date startDate, Date endDate, int pageSize, int fetchLimit) Return the list of task submissions matching the specified search criteriaReturns task submissions for which an expiry process needs to be run.getTaskSubmissionsToAbandon
(int fetchLimit) Return the list of Assigned and Opened Tasks, without expiry or associated Job which can be abandoned.getTaskSubmissionsToExpire
(int fetchLimit) Return the list of task submissions that have passed their expiry date but are still in statusSubmission.STATUS_Assigned
,Submission.STATUS_Opened
orSubmission.STATUS_Opened
.getToDoSubmissionsForUser
(UserAccount userAccount, String keywordLike, String clientName, List<String> statusList, Date fromDateTime, Date toDateTime, Portal portal, boolean includeGroupSubmission) Return the list of incomplete submissions matching the specified search criteria.getToDoSubmissionsForUserAndForm
(UserAccount userAccount, Form form, boolean includeGroupSubmission) Gets the submissions for user and form.int
Return the total number of submission entries, including "Opened" submissions.boolean
hasTrackingNumberSubmission
(String trackingNumber) Return true if there is a submission for the given tracking number.void
iterateOverSubmissionsForEmailVerificationReminders
(Form form, Date lastReminderSentBefore, int maxAttempts, org.apache.cayenne.ResultIteratorCallback<Submission> op) Iterates over the list of submissions for which an email verification reminder needs to be sent (i.e.void
iterateOverSubmissionsWithOverdueEmailVerification
(Form form, Date submittedBefore, org.apache.cayenne.ResultIteratorCallback<Submission> op) Iterates over the list of submissions for which email verification is overdue (i.e.void
recalcDeliveredSubmissionRetentionTimeForForm
(Form form, int maxDeliveredSubmissionAgeDays) Recalculate purge time for delivered submissions of a form.void
recalcPurgeDeliveredDataTime
(Long clientId, int ageOfDays) Recalc purge delivered data time.void
recalcPurgeSubmissionTime
(int ageOfDays) Recalc purge data time.void
recalcSaveAbandonTime
(Long formId, Long clientId, int maxAgeInDays) Recalculate save abandon scheduled times after a policy change on the form, organization or system level.boolean
safelyAbandonSubmission
(Long submissionId, String currentFormStatus, String abandonmentType, String deliveryStatus) Safely mark a submission as abandoned.boolean
safelySetSubmissionIneligible
(Long submissionId, String currentFormStatus, String deliveryStatus) Safely mark a submission as abandoned due to ineligibility of the user.void
setPaymentStatusGuarded
(String submitKey, String newPaymentStatus, String oldPaymentStatus) Updates a submission status only if the current status matches the specified old statusvoid
Deprecated.void
setPurgeDatesForDeliveredAbandonedForms
(Submission submission) Sets the submission data purge date for finished (Completed or Abandoned) form data.void
setPurgeDatesForSavedForms
(Submission submission) Deprecated.use updateScheduledSaveAbandonTime instead.void
setPurgeDeliveredDate
(Submission submission) Deprecated.void
updatePurgeTime
(Submission submission) Deprecated.void
updateScheduledSaveAbandonTime
(Submission submission) Sets the scheduled abandonment time for a saved submission.int[]
updateSubmissionExpiryDate
(Long formId, Date newExpiryDate) Return an int array containing the total number of updated recordsMethods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
Constructor Details
-
SubmissionDao
public SubmissionDao()
-
-
Method Details
-
getSubmission
Return the submission with the specified OID- Parameters:
id
- the OID- Returns:
- the matching submission, or null if not found
-
getSubmissionsForExternalUserId
Return the list of submissions with the given external user ID, ordered by submission time. Submissions with a Form Status of 'Opened' will be excluded.- Parameters:
externalUserId
- the external user ID to look for- Returns:
- the list of matching submissions
-
updateSubmissionExpiryDate
Return an int array containing the total number of updated records- Parameters:
formId
- the form Id (required)newExpiryDate
- the new expiry date (required)- Returns:
- a single element int array containing the total number of updated submission(s), otherwise an empty array
- Since:
- 21.5.2
-
getFormSubmissions
Return the most recent non-test form submissions for the given form.- Parameters:
form
- the form to get the submissions forfetchLimit
- the maximum number of submissions to return- Returns:
- the most recent non-test form submissions for the given form
-
getAdminCachedFormSubmissions
Return the most recent non-test administrator cached form submissions for the given form.- Parameters:
form
- the form to get the submissions forfetchLimit
- the maximum number of submissions to return- Returns:
- the most recent non-test form submissions for the given form
- Since:
- 4.3.2
-
getFormSubmissions
Return the most recent form submissions for the specified client or all clients if not specified.- Parameters:
clientId
- the client ID to get the submissions forfetchLimit
- the maximum number of submissions to return- Returns:
- the most recent form submissions
- Since:
- 4.0.0
-
getAdminFormSubmissions
Return the most recent form submissions for the specified admin client or all clients if not specified.- Parameters:
clientId
- the client ID to get the submissions for- Returns:
- the most recent form submissions
- Since:
- 4.3.2
-
getToDoSubmissionsForUserAndForm
public List<Submission> getToDoSubmissionsForUserAndForm(UserAccount userAccount, Form form, boolean includeGroupSubmission) Gets the submissions for user and form. This is used for internally managed group access- Parameters:
userAccount
- the user accountform
- the formincludeGroupSubmission
- the include group submission- Returns:
- the submissions for user and form
-
getNextRestDeliverySubmission
Return the next REST delivery submission ready for delivery.- Parameters:
deliveryDetails
- the delivery details (required)- Returns:
- the delivery submissions for the specified delivery details and delivery status
- Since:
- 4.1.8
-
getSubmissionsForDeliveryDetailsAndStatus
public List<Submission> getSubmissionsForDeliveryDetailsAndStatus(DeliveryDetails deliveryDetails, String deliveryStatus) Return the delivery submissions for the specified delivery details and delivery status.- Parameters:
deliveryDetails
- the delivery details (required)deliveryStatus
- the delivery status (required)- Returns:
- the delivery submissions for the specified delivery details and delivery status
- Since:
- 4.1.8
-
getRESTDeliveryRetrySubmissions
Return the list of submissions with the delivery status of 'In-Progress' and delivery method 'REST Service' and where their next_delivery_time exceeds the current time.- Returns:
- list of REST Service delivery submissions which should be retried.
- Since:
- 4.1.8
-
getNextSubmissionsForDeliveryDetailsAndStatus
public Submission getNextSubmissionsForDeliveryDetailsAndStatus(DeliveryDetails deliveryDetails, String deliveryStatus) Return the next delivery submissions for the specified delivery details and delivery status. This method is intended for use by the REST Delivery API, and will only return submissions which have not been purge, and where their next delivery time is ready when getting submissions with a deliveryStatus of 'Error'.- Parameters:
deliveryDetails
- the delivery details (required)deliveryStatus
- the delivery status (required)- Returns:
- the delivery submissions for the specified delivery details and delivery status
- Since:
- 4.2.0
-
getSubmissionsForDeliveryDetailsAndStatus
public List<Submission> getSubmissionsForDeliveryDetailsAndStatus(DeliveryDetails deliveryDetails, String deliveryStatus, int fetchLimit) Return the delivery submissions for the specified delivery details and delivery status. This method is intended for use by the REST Delivery API, and will only return submissions which have not been purge, and where their next delivery time is ready when getting submissions with a deliveryStatus of 'Error'.- Parameters:
deliveryDetails
- the delivery details (required)deliveryStatus
- the delivery status (required)fetchLimit
- the query fetch limit- Returns:
- the delivery submissions for the specified delivery details and delivery status
- Since:
- 4.2.0
-
getSubmissionsForDeliveryNoDeliveryDetails
Return submissions for delivery, but with no delivery details configured.- Returns:
- submissions for delivery, but with no delivery details configured
- Since:
- 4.3.4
-
getSubmissionsReadyForDelivery
Return a list of the n most recent submission that are ready for delivery and for which a delivery method is configured. Note that abandoned submissions are not included.- Parameters:
maxRows
- the value for n, limiting the result size- Returns:
- the list of matching submission
-
getAbandonedSubmissionsForDelivery
Deprecated.Return a list of the n most recent submission that are abandoned and ready for delivery- Parameters:
maxRows
- the value for n, limiting the result size- Returns:
- the list of matching submissions
-
getAnonymousBgSaveSubmissionsForAbandonment
Return a list of Form Starts (auto saved, but no user save), which are configured for abandonment delivery and reach the form configured abandon submitted timeout.- Parameters:
maxRows
- the value for n, limiting the result size- Returns:
- the list of matching submissions
- Since:
- 4.0.0
-
getOpenedSubmissionsForAbandonment
Return a list of the n most recent opened and background save only submissions that are ready for abandonment- Parameters:
maxRows
- the value for n, limiting the result size- Returns:
- the list of matching submissions
- Since:
- 4.0.0
-
getSavedSubmissionsForAbandonment
Return a list of the n most recent save submissions that are ready for abandonment- Parameters:
maxRows
- the value for n, limiting the result size- Returns:
- the list of matching submissions
- Since:
- 4.0.0
-
getSubmittedSubmissionsForAbandonment
Return a list of the n most recent save submissions that are ready for abandonment- Parameters:
maxRows
- the value for n, limiting the result size- Returns:
- the list of matching submissions
- Since:
- 4.0.0
-
getInProgressSubmissionsForFormAndExpiryDate
public List<Submission> getInProgressSubmissionsForFormAndExpiryDate(Form form, Date submissionExpiryDate) Return the list of in progress submissions (Opened, Assigned, Saved, Submitted) for the given form and submission expiry date.- Parameters:
form
- the form to get the submissions from (required)submissionExpiryDate
- the sumission expiry date- Returns:
- the list of in progress submissions (Opened, Assigned, Saved, Submitted) for the given form and expiry date
- Since:
- 4.3.0
-
getSubmissionsDeliveredViaEmailBefore
Return the list of submissions for which secure email delivery was initiated before a specified cutoff time- Parameters:
cutoffTime
- the cutoff date/timemaxRows
- the maximum number of rows to retrieve- Returns:
- the list of matching submissions
-
getEscalations
Return information on how many clients have submissions for which delivery has not been completed after a specified cutoff time- Parameters:
cutoffTime
- the cutoff date/time- Returns:
- a map containing client codes and the number of submissions to escalate for each client
-
getExpiredSubmissionsToAbandon
Return the list of expired submissions to abandon.- Parameters:
fetchLimit
- the query fetch limit- Returns:
- the list of expired submissions to abandon
- Since:
- 18.5.0
-
getSubmissionByKey
Return a submission with the specified surrogate key- Parameters:
submitKey
- the surrogate key of an existing submission- Returns:
- the matching submission
-
getSubmissionByEmailVerificationKey
Return a submission with the specified email verification key.- Parameters:
emailKey
- email verification key- Returns:
- the matching submission
-
getSubmissionByReceiptNumber
Return a submission with the specified receipt number- Parameters:
receiptNumber
- the receipt number of an existing submission (required)- Returns:
- the matching submission
- Throws:
ApplicationException
- if multiple submissions with the given receipt number were found
-
getSubmissionByTrackingNumber
Return a submission with the specified tracking number- Parameters:
trackingNumber
- the tracking number of an existing submission (required)- Returns:
- the matching submission
- Throws:
ApplicationException
- if multiple submissions with the given receipt number were found- Since:
- 4.0.0
-
hasTrackingNumberSubmission
Return true if there is a submission for the given tracking number.- Parameters:
trackingNumber
- the tracking number to test- Returns:
- true if there is a submission with the given tracking number
- Since:
- 4.1.0
-
getSubmissionsByTransRefNumber
Return the list of submissions matching the specified transaction reference number, ordered by PK.- Parameters:
transRefNumber
- the transaction reference number- Returns:
- the list of submissions matching the specified transaction reference number, ordered by PK.
- Since:
- 3.6.0
-
getSubmissionByOfflineKey
Return the submission with the given offline submit key- Parameters:
offlineSubmitKey
- the offline submit key of the submission- Returns:
- the matching submission
-
getSubmissionByKeyAndClient
Return a submission for the given submission and client surrogate keys. It is important to use both keys from a security perspective.- Parameters:
clientKey
- the surrogate key of the client associated with the submissionsubmitKey
- the surrogate key of the submission- Returns:
- the matching submission
-
getCompletedSubmissionsForUser
public List<Submission> getCompletedSubmissionsForUser(String keywordLike, UserAccount userAccount, Portal portal, List<String> groupNames, Set<Long> clientIdSet, Integer fetchLimit) Provide the keyword search Submission History results based on the user own account or group access control. Only used by webservice api for externally managed group access- Parameters:
keywordLike
- the keyword like to searchuserAccount
- the logged in user accountportal
- the current portalgroupNames
- the list of group names for which to include submissionsclientIdSet
- the set of clients to filter on (optional; pass in null to skip client filtering)fetchLimit
- the fetch limit (optional; if not specified, the default fetch limit will be used)- Returns:
- the keyword search Submission History results
- Since:
- 3.6.0
-
getCompletedSubmissionsForUser
public List<Submission> getCompletedSubmissionsForUser(String keywordLike, UserAccount userAccount, Portal portal, boolean includeGroupSubmission) Provide the keyword search Submission History results based on the user own account or group access control.- Parameters:
keywordLike
- the keyword like to searchuserAccount
- the logged in user accountportal
- the current portalincludeGroupSubmission
- the include group submission- Returns:
- the keyword search Submission History results
- Since:
- 3.6.0
-
getCompletedSubmissionsForUser
public List<Submission> getCompletedSubmissionsForUser(UserAccount user, String keyword, String clientName, String formNameLike, Date fromDate, Date toDate, Portal portal, Map<String, String> submissionExtractDataSearch, boolean includeGroupSubmission) Return the list of completed submissions for the given user. Only used in classic portal- Parameters:
user
- the non-null user account objectkeyword
- a keyword to search for in the receipt number (optional)clientName
- the name of the client associated with the submission (optional)formNameLike
- a substring of the name of the form associated with the submission (optional)fromDate
- the lower bound on the time form completed (optional)toDate
- the upper bound on the time form completed (optional)portal
- the non-null portal that submissions must be associated withsubmissionExtractDataSearch
- - obsolete filter parameter which is not supportedincludeGroupSubmission
- the include group submission- Returns:
- the list of matching submissions with form status
Submission.STATUS_Completed
-
getSubmittedOrCompletedSubmissionsForUser
public List<Submission> getSubmittedOrCompletedSubmissionsForUser(UserAccount userAccount, Portal portal, List<String> groupNames, boolean includeGroupSubmission) Return the list of completed submissions for the given user. Used for field worker- Parameters:
userAccount
- the non-null user account objectportal
- the non-null portal that submissions must be associated withgroupNames
- the list of group names for which to include submissionsincludeGroupSubmission
- whether to include submissions made by other group members- Returns:
- the list of matching submissions with form status
Submission.STATUS_Completed
- Since:
- 3.5.1
-
getCompletedSubmissionsForUserAndForms
public List<Submission> getCompletedSubmissionsForUserAndForms(UserAccount user, Collection<String> formCodes, Date fromDate, Date toDate, Portal portal, Map<String, String> submissionExtractDataSearch, boolean includeGroupSubmission) Return the list of completed submissions for the given user. Only used by classic portal- Parameters:
user
- the non-null user account objectformCodes
- the non-empty collection of form codes of forms associated with the submissionsfromDate
- the lower bound on the time form completed (optional)toDate
- the upper bound on the time form completed (optional)portal
- the non-null portal that submissions must be associated withsubmissionExtractDataSearch
- a set of submission extract data key-value pairs tha submissions must contain (optional)includeGroupSubmission
- the include group submission- Returns:
- the list of matching submissions with form status
Submission.STATUS_Completed
- Since:
- 3.6.0
-
getMandatoryRequiredAttachments
Return the list of mandatory required attachments for the given submission- Parameters:
submission
- the non-null submission- Returns:
- the list of mandatory required attachments
-
getOptionalRequiredAttachments
Return the list of optional required attachments for the given submission- Parameters:
submission
- the non-null submission- Returns:
- the list of optional required attachments
-
getSubmissionDeliveryList
public List<Submission> getSubmissionDeliveryList(String deliveryStatus, String clientId, String deliveryDetailsId, String formCode, String deliveryMessageLike, Date startDate, Date endDate, int fetchLimit) Return a list of submissions which match the delivery criteria.- Parameters:
deliveryStatus
- the delivery status (required)clientId
- the selected client Id (optional)deliveryDetailsId
- the associated client delivery details (optional)formCode
- the associated form (optional)deliveryMessageLike
- the delivery message like criteria (optional)startDate
- the start date range (optional)endDate
- the end date range (optional)fetchLimit
- the maximum number of records to return- Returns:
- a list of submissions which match the delivery criteria.
- Since:
- 3.6.0
-
getSupportSearchList
public List<Submission> getSupportSearchList(String clientId, String formId, String portalId, String refNumber, String userOrEmail, Boolean tasksInclude, Boolean jobsInclude, String formStatus, String attachmentStatus, String paymentStatus, String emailVerifStatus, String receiptStatus, String deliveryStatus, Date startDate, Date endDate, int fetchLimit) Provides a Transaction Support Search query.- Parameters:
clientId
- the client id (optional)formId
- the form id (optional)portalId
- the portal id (optional)refNumber
- the ref number (optional)userOrEmail
- the user login or contact email (optional)tasksInclude
- filter to include or exclude form and review tasks (optional)jobsInclude
- filter to include or exclude job transactions (optional)formStatus
- the form status (optional)attachmentStatus
- the attachment status (optional)paymentStatus
- the payment status (optional)emailVerifStatus
- the email verification status (optional)receiptStatus
- the receipt status (optional)deliveryStatus
- the delivery status (optional)startDate
- the start date (optional)endDate
- the end date (optional)fetchLimit
- the query fetch limit- Returns:
- the support search transactions
- Since:
- 4.3.2
-
getSavedSubmissionList
public List<Submission> getSavedSubmissionList(String genericSearchValue, String clientId, String portalId, Integer transactionScore, Date startDate, Date endDate) Return the list of submission with a form status of 'Saved' which meet the specified criteria.- Parameters:
genericSearchValue
- the generic search value (optional)clientId
- the Client id (optional)portalId
- the Portal id (optional)transactionScore
- the transaction score (optional)startDate
- the search start date (optional)endDate
- the search end date (optional)- Returns:
- the list of submission with a form status of 'Saved' which meet the specified criteria
- Since:
- 4.0.0
-
getAbandonedSubmissionList
public List<Submission> getAbandonedSubmissionList(String genericSearchValue, String clientId, String portalId, String abandonmentType, Integer transactionScore, Date startDate, Date endDate) Return the list of submission with a form status of 'Abandoned' which meet the specified criteria.- Parameters:
genericSearchValue
- the free text search value (optional)clientId
- the Client id (optional)portalId
- the Portal id (optional)abandonmentType
- the abandonment type (optional)transactionScore
- the transaction score (optional)startDate
- the search start date (optional)endDate
- the search end date (optional)- Returns:
- the list of submission with a form status of 'Abandoned' which meet the specified criteria
- Since:
- 4.0.0
-
getSubmissionList
public List<Submission> getSubmissionList(String keyword, String clientId, Date startDate, Date endDate, String formStatus, String attachmentStatus, String paymentStatus, String emailVerificationStatus, String deliveryStatus, int offset, int pageSize) Return the list of submissions matching the specified search criteria- Parameters:
keyword
- the value entered into the generic search fieldclientId
- the OID of the client associated with the submission (optional)startDate
- the lower bound on the submission time (optional)endDate
- the upper bound on the submission time (optional)formStatus
- the form status, one ofSubmission.FORM_STATUS_VALUES
(optional)attachmentStatus
- the attachment status, one ofSubmission.ATTACHMENT_STATUS_VALUES
(optional)paymentStatus
- the payment status, one ofSubmission.PAYMENT_STATUS_VALUES
(optional)emailVerificationStatus
- the email verification status, one ofSubmission.EMAIL_VERIFICATION_STATUS_VALUES
(optional)deliveryStatus
- the delivery status, one ofSubmission.DELIVERY_STATUS_VALUES
(optional)offset
- the offset to be used in the querypageSize
- the number of items to be returned- Returns:
- the list of matching submissions
-
getTotalSubmissionCount
public int getTotalSubmissionCount()Return the total number of submission entries, including "Opened" submissions.- Returns:
- the total number of submission entries
-
getSubmissionSearchCount
public int getSubmissionSearchCount()Return the number of submission entries, excluding "Opened" submissions- Returns:
- the number of submission entries
- Since:
- 4.0.0
-
getOpenedSubmissionCount
public int getOpenedSubmissionCount()Return the number of opened submission entries- Returns:
- the number of opened submission entries
- Since:
- 4.1.0
-
getSavedSubmissionCount
public int getSavedSubmissionCount()Return the number of saved submission entries- Returns:
- the number of saved submission entries
-
getCompletedAbandonedSubmissionCount
public int getCompletedAbandonedSubmissionCount()Gets the finished submission count (Completed or Abandoned).- Returns:
- the finished submission count
- Since:
- 3.6.0
-
getAbandonedSubmissionCount
public int getAbandonedSubmissionCount(String genericSearchValue, String clientId, Date startDate, Date endDate, String attachmentStatus, String paymentStatus, String emailVerificationStatus, String deliveryStatus, Integer transactionScore) Return the number of abandoned submissions matching the specified search criteria.- Parameters:
genericSearchValue
- the value entered into the generic search fieldclientId
- the OID of the client associated with the submission (optional)startDate
- the lower bound on the submission time (optional)endDate
- the upper bound on the submission time (optional)attachmentStatus
- the attachment status, one ofSubmission.ATTACHMENT_STATUS_VALUES
(optional)paymentStatus
- the payment status, one ofSubmission.PAYMENT_STATUS_VALUES
(optional)emailVerificationStatus
- the email verification status, one ofSubmission.EMAIL_VERIFICATION_STATUS_VALUES
(optional)deliveryStatus
- the delivery status, one ofSubmission.DELIVERY_STATUS_VALUES
(optional)transactionScore
- the transaction score- Returns:
- the number of matching submissions
- Since:
- 4.0.0
-
getSubmissionsReadyForDelivery
Return the list of submissions for a specified client that are ready to be delivered, ordered by submission time- Parameters:
client
- the non-null client object- Returns:
- the list of matching submissions
-
getSubmissionsReadyForWSDelivery
Return the list of submissions that are ready for delivery via a web service delivery method- Parameters:
client
- the non-null clients that submissions must belong to- Returns:
- the list of matching submissions keys
- Since:
- 4.0.0
-
getSubmissionsToReceipt
Return submissions that are ready for receipt generation, ordered by submission time.- Parameters:
fetchLimit
- the maximum number of submissions to fetchmaxRenderAttempts
- the max render attempts- Returns:
- the list of matching submissions
-
getToDoSubmissionsForUser
public List<Submission> getToDoSubmissionsForUser(UserAccount userAccount, String keywordLike, String clientName, List<String> statusList, Date fromDateTime, Date toDateTime, Portal portal, boolean includeGroupSubmission) Return the list of incomplete submissions matching the specified search criteria. This method should only be invoked by the Classic Portal.- Parameters:
userAccount
- the non-null user account objectkeywordLike
- a keyword to search for in the receipt number (optional)clientName
- the name of the client associated with the submission (optional)statusList
- the set of form status values to search for (optional, defaults to saved and submitted submissions)fromDateTime
- the lower bound on the submission time (optional)toDateTime
- the upper bound on the submission time (optional)portal
- the non-null portal that submissions must be associated withincludeGroupSubmission
- the include group submission- Returns:
- the list of matching submissions that are saved or submitted
-
getPortalToDoSubmissionsForUser
public List<Submission> getPortalToDoSubmissionsForUser(UserAccount userAccount, String keyword, List<String> submissionStatusList, Portal portal, List<String> groupNames, Set<Long> clientIdSet, Integer fetchLimit) Gets the portal to do submissions for user. Only used for webservice api for groupNames are externally managed- Parameters:
userAccount
- the user accountkeyword
- the keywordsubmissionStatusList
- the submission status listportal
- the portalgroupNames
- the group namesclientIdSet
- the set of clients to filter on (optional; pass in null to skip client filtering)fetchLimit
- the fetch limit (optional)- Returns:
- the portal to do submissions for user
-
getPortalToDoSubmissionsForUser
public List<Submission> getPortalToDoSubmissionsForUser(UserAccount userAccount, String keywordLike, List<String> statusList, Portal portal, boolean includeGroupSubmission) Return the list of incomplete submissions matching the specified search criteria. Used by the new responsive portal- Parameters:
userAccount
- the non-null user account objectkeywordLike
- a keyword to search for in the receipt number (optional)statusList
- the status listportal
- the non-null portal that submissions must be associated withincludeGroupSubmission
- the include group submission- Returns:
- the list of matching submissions that are saved or submitted
-
getSubmissionsSearch
Return a list of submissions whose form name contain the search string, or whose OID, form OID or user OID matches the search string if it is numeric.- Parameters:
clientId
- the OID of an existing client (optional)value
- the search value (optional)- Returns:
- the list of matching submissions
-
addProcessingStatus
Return a processing status entry to a submission.- Parameters:
submission
- the submission to add the processing status update to (required)status
- the new processing status value (required)user
- the user account creating the processing status (optional)- Returns:
- the new ProcessingStatus added to the submission
-
addProcessingStatusWithLoginName
public ProcessingStatus addProcessingStatusWithLoginName(Submission submission, String status, String loginName) Return a processing status entry to a submission.- Parameters:
submission
- the submission to add the processing status update to (required)status
- the new processing status value (required)loginName
- the user account login name (optional)- Returns:
- the new ProcessingStatus added to the submission
- Since:
- 4.0.0
-
getRequiredPaymentSubmissionsCount
Return a list of the n submissions with a Payment Status of "Required" which are older than a configurable period of time in days.- Parameters:
hours
- the configurable period of time in hoursclient
- the client- Returns:
- the number of outstanding payment count
-
getLastSubmissionId
public long getLastSubmissionId()Return the last submission id.- Returns:
- the last submission id
-
getDraftsForUser
public List<Submission> getDraftsForUser(UserAccount userAccount, Portal portal, List<String> groupNames, boolean includeGroupSubmission) Return the list of draft or 'Saved' submissions for a given user and portal. For field worker only.- Parameters:
userAccount
- the user (required)portal
- the portalgroupNames
- the list of group names for which to include draft submissionsincludeGroupSubmission
- whether to include draft submissions made by other group members- Returns:
- the list of draft or 'Saved' submissions for a given user and portal.
-
getAllSubmissionsByFilter
@Deprecated public List<Submission> getAllSubmissionsByFilter(String submissionQueryFilter, String dateField, Date cutoffDate) Deprecated.Gets the all submissions by filter.- Parameters:
submissionQueryFilter
- the submission query filterdateField
- the date fieldcutoffDate
- the cutoff date- Returns:
- the all submissions by filter
-
setPaymentStatusGuarded
public void setPaymentStatusGuarded(String submitKey, String newPaymentStatus, String oldPaymentStatus) Updates a submission status only if the current status matches the specified old status- Parameters:
submitKey
- the submission to updatenewPaymentStatus
- the new payment statusoldPaymentStatus
- the old payment status
-
copyRequiredAttachmentToSubmission
public void copyRequiredAttachmentToSubmission(RequiredAttachment requiredAttachment, Submission targetSubmission) Copy the required attachment to the specified submission, cloning the associated attachment and file data. If the required attachment does not exist on the target submission it will be new required attachment will be created.- Parameters:
requiredAttachment
- the required attachment to copy (required)targetSubmission
- the submission to copy the required attachment to (required)
-
copyRequiredAttachmentToSubmission
public void copyRequiredAttachmentToSubmission(RequiredAttachment requiredAttachment, Submission targetSubmission, Document targetXmlDoc) Copy the required attachment to the specified submission, cloning the associated attachment and file data. If the required attachment does not exist on the target submission it will be new required attachment will be created.- Parameters:
requiredAttachment
- the required attachment to copy (required)targetSubmission
- the submission to copy the required attachment to (required)targetXmlDoc
- the target submission form XML data document (optional)- Since:
- 4.1.0
-
copyAttachmentToSubmission
public Attachment copyAttachmentToSubmission(Attachment attachment, Submission targetSubmission, RequiredAttachment targetRA) Copy the attachment to the specified submission, cloning the file upload data.- Parameters:
attachment
- the attachment to copy (required)targetSubmission
- the submission to copy the attachment to (required)targetRA
- the required attachment to associate the attachment with (optional)- Returns:
- the new attachment
- Since:
- 4.1.0
-
updateScheduledSaveAbandonTime
Sets the scheduled abandonment time for a saved submission.- Parameters:
submission
- the submission (required)- Since:
- 4.3.3
-
getPurgeSubmissionIdList
Return the list of Submission ID to purge.- Parameters:
fetchLimit
- the query fetch limit- Returns:
- the list of Submission ID to purge
- Since:
- 4.3.3
-
setPurgeDatesForSavedForms
Deprecated.use updateScheduledSaveAbandonTime instead. This method may be removed in a future release.Sets the scheduled abandonment time for a saved submission.- Parameters:
submission
- the submission (required)- Since:
- 4.1.0
-
setPurgeDateForSubmissionAndSavedAbandonedData
Deprecated.This method has been deprecated, please useupdateScheduledSaveAbandonTime
.- Parameters:
submission
- deprecated
-
setPurgeDeliveredDate
Deprecated.This method has been deprecated, please usesetPurgeDatesForDeliveredAbandonedForms
.- Parameters:
submission
- the new purge delivered date
-
setPurgeDatesForDeliveredAbandonedForms
Sets the submission data purge date for finished (Completed or Abandoned) form data.- Parameters:
submission
- the new purge delivered date- Since:
- 4.1.0
-
updatePurgeTime
Deprecated.Sets the purge time for a finished submission.- Parameters:
submission
- the submission (required, must be of form status "Completed" or "Abandoned")- Since:
- 4.3.3
-
recalcPurgeSubmissionTime
public void recalcPurgeSubmissionTime(int ageOfDays) Recalc purge data time.- Parameters:
ageOfDays
- the age of days
-
recalcSaveAbandonTime
Recalculate save abandon scheduled times after a policy change on the form, organization or system level.- Parameters:
formId
- the form id (optional; if not set, clientId will be considered)clientId
- the client id (optional; if neither formId nor clientId is set, it is assumed that the system policy has changed)maxAgeInDays
- the maximum age of saved submissions in days before they will be abandoned- Since:
- 4.3.3
-
recalcPurgeDeliveredDataTime
Recalc purge delivered data time.- Parameters:
clientId
- the client idageOfDays
- the age of days
-
recalcDeliveredSubmissionRetentionTimeForForm
public void recalcDeliveredSubmissionRetentionTimeForForm(Form form, int maxDeliveredSubmissionAgeDays) Recalculate purge time for delivered submissions of a form.- Parameters:
form
- the form for which retention settings have changed (required)maxDeliveredSubmissionAgeDays
- the new maximum delivered submission age in days- Since:
- 4.1.0
-
iterateOverSubmissionsWithOverdueEmailVerification
public void iterateOverSubmissionsWithOverdueEmailVerification(Form form, Date submittedBefore, org.apache.cayenne.ResultIteratorCallback<Submission> op) Iterates over the list of submissions for which email verification is overdue (i.e. the user has not responded and the timeout has been exceeded). Note that the queries are form based as timeout settings are configured on a form level.- Parameters:
form
- the form (required)submittedBefore
- the cutoff date for the submission time (required); submissions older than this are considered overdueop
- an operation to apply to each submission.
-
iterateOverSubmissionsForEmailVerificationReminders
public void iterateOverSubmissionsForEmailVerificationReminders(Form form, Date lastReminderSentBefore, int maxAttempts, org.apache.cayenne.ResultIteratorCallback<Submission> op) Iterates over the list of submissions for which an email verification reminder needs to be sent (i.e. the user has not responded, we have not reached the maximum number of emails to send and the reminder interval has passed since the last email was sent). Note that the queries are form based as number of attempts and the reminder interval are configured on a form level.- Parameters:
form
- the form (required)lastReminderSentBefore
- the cutoff date for the email verification email (required); submissions with times older than this may need a reminder nowmaxAttempts
- the maximum number of emails to send (required); if as many or more reminders were already sent, the submission will be excludedop
- an operation to be invoked on each object during iteration.
-
getAssignedTasksForUser
public List<Submission> getAssignedTasksForUser(UserAccount userAccount, Portal portal, int maxNumber, boolean includeGroupTasks) Get the list of assigned task submissions for the specified user and portal. Assigned tasks include transactions with the status: [ Assigned | Opened | Saved | Submitted ]. This method is called by the FieldWorker Sync Rest Service.- Parameters:
userAccount
- the user accountportal
- the portalmaxNumber
- the max numberincludeGroupTasks
- the include tasks assigned to groups the user belongs to- Returns:
- the list of task submissions assigned to the user, ordered by scheduled timestamp and then creation timestamp
-
getAssignedTaskCountForUser
public int getAssignedTaskCountForUser(UserAccount userAccount, Portal portal, boolean includeGroupTasks) Get the number of assigned task submissions for the specified user and portal.- Parameters:
userAccount
- the user accountportal
- the portalincludeGroupTasks
- the include tasks assigned to groups the user belongs to- Returns:
- the total field worker tasks count for user
-
getTaskByKey
Return the submission with the specified task key.- Parameters:
taskKey
- the task key (required)- Returns:
- the matching submission, or null if not found
- Since:
- 4.0.0
-
getTaskSubmissionsToExpire
Return the list of task submissions that have passed their expiry date but are still in statusSubmission.STATUS_Assigned
,Submission.STATUS_Opened
orSubmission.STATUS_Opened
.- Parameters:
fetchLimit
- the query fetch limit- Returns:
- the list of matching task submissions
-
getTaskSubmissionsToAbandon
Return the list of Assigned and Opened Tasks, without expiry or associated Job which can be abandoned.- Parameters:
fetchLimit
- the query fetch limit- Returns:
- the list of matching task submissions
- Since:
- 18.5.0
-
getTaskSubmissionsForExpiryProcess
Returns task submissions for which an expiry process needs to be run.- Returns:
- set of submissions in form status
Submission.STATUS_Expired
with a task expiry process status ofSubmission.STATUS_Ready
orSubmission.STATUS_Error
-
getExpiredTasksRequiringAbandonment
Returns the list of tasks which have been 'Expired' and data deleted but have no purge time set.- Returns:
- the list of tasks which have been 'Expired' and data deleted but have no purge time set.
- Since:
- 18.5.0
-
getAbandonedLegacyTasks
- Returns:
- the list of legacy tasks which have been 'Abandoned' but have no purge time set.
- Since:
- 18.5.0
-
getAbandonedLegacyTransactions
- Returns:
- the list of legacy transactions which have been 'Abandoned' but have no purge time set.
- Since:
- 18.5.0
-
getTaskSubmissionList
public List<Submission> getTaskSubmissionList(String clientId, String keyword, String type, String status, Date startDate, Date endDate) Return the list of task submissions matching the specified search criteria- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the keyword search (optional)type
- the submission task type, one ofSubmission.TASK_TYPE_VALUES
(optional)status
- the form status, one ofSubmission.TASK_STATUS_VALUES
(optional)startDate
- the lower bound on the task creation time (optional)endDate
- the upper bound on the task creation time (optional)- Returns:
- the list of matching task submissions
-
getTaskSubmissionList
public List<Submission> getTaskSubmissionList(String clientId, String keyword, String type, String status, Date startDate, Date endDate, int pageSize, int fetchLimit) Return the list of task submissions matching the specified search criteria- Parameters:
clientId
- the OID of the client to filter on (optional)keyword
- the keyword search (optional)type
- the submission task type, one ofSubmission.TASK_TYPE_VALUES
(optional)status
- the form status, one ofSubmission.TASK_STATUS_VALUES
(optional)startDate
- the lower bound on the task creation time (optional)endDate
- the upper bound on the task creation time (optional)pageSize
- the query page sizefetchLimit
- the query fetch limit- Returns:
- the list of matching task submissions
-
getSubmissionTrendData
public List<SubmissionTrendBean> getSubmissionTrendData(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, String periodType, boolean excludeJobsTasks, Date startDate, Date endDate) Return live submission trend data for a time period and period type and optionally a specific form version. Note: Test data is included. Submissions may be counted multiple times (e.g. if multiple saves occur). The data is intended to measure user activity.- Parameters:
clientId
- the OID of the selected client (optional)portalId
- the OID of the selected portal (optional)versions
- the form versions to filter on (optional)deviceType
- the device type to filter on (optional; one ofUserAgentInfo.DEVICE_TYPES
)periodType
- the period type (required, must beDataUtils.PERIOD_TYPE_DAY
orDataUtils.PERIOD_TYPE_HOUR
)excludeJobsTasks
- exclude job and task transactions (optional)startDate
- the start date/time (required)endDate
- the end date/time (required)- Returns:
- the list of trend data for the selected period, with an entry for each hour / day, sorted ascending by date
-
getSubmissionTrendData
@Deprecated public List<SubmissionTrendBean> getSubmissionTrendData(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, String periodType, Date startDate, Date endDate) Deprecated.Return live submission trend data for a time period and period type and optionally a specific form version. Note: Test data is included. Submissions may be counted multiple times (e.g. if multiple saves occur). The data is intended to measure user activity. Note: Job invalid input: '&' Tasks are excluded- Parameters:
clientId
- the OID of the selected client (optional)portalId
- the OID of the selected portal (optional)versions
- the form versions to filter on (optional)deviceType
- the device type to filter on (optional; one ofUserAgentInfo.DEVICE_TYPES
)periodType
- the period type (required, must beDataUtils.PERIOD_TYPE_DAY
orDataUtils.PERIOD_TYPE_HOUR
)startDate
- the start date/time (required)endDate
- the end date/time (required)- Returns:
- the list of trend data for the selected period, with an entry for each hour / day, sorted ascending by date
- Since:
- 4.1.0
-
getSubmissionSummaryData
public SubmissionSummaryBean getSubmissionSummaryData(Long clientId, String portalId, Collection<TemplateVersion> versions, boolean excludeJobsTasks, Date startDate, Date endDate) Return live submission summary data for a time period. Note: Test data is included. Submissions may be counted multiple times (e.g. if multiple saves occur). The data is intended to measure user activity.- Parameters:
clientId
- the OID of the selected client (optional)portalId
- the OID of selected portal (optional)versions
- the list of form versions to filter on (optional)excludeJobsTasks
- exclude job and task transactions (optional)startDate
- the start date/time (required)endDate
- the end date/time (required)- Returns:
- summary data for the selected period
-
getSubmissionSummaryData
@Deprecated public SubmissionSummaryBean getSubmissionSummaryData(Long clientId, String portalId, Collection<TemplateVersion> versions, Date startDate, Date endDate) Deprecated.Return live submission summary data for a time period. Note: Test data is included. Submissions may be counted multiple times (e.g. if multiple saves occur). The data is intended to measure user activity. Note: Excludes jobs invalid input: '&' tasks- Parameters:
clientId
- the OID of the selected client (optional)portalId
- the OID of selected portal (optional)versions
- the list of form versions to filter on (optional)startDate
- the start date/time (required)endDate
- the end date/time (required)- Returns:
- summary data for the selected period
- Since:
- 4.1.0
-
getSubmissionOverviewData
public List<SubmissionTrendBean> getSubmissionOverviewData(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, boolean excludeJobsTasks, String periodType, Date startDate, Date endDate) Return live submission overview data for a time period. Note: Test data is included. Submissions may be counted multiple times. The data is intended to measure user activity.- Parameters:
clientId
- the OID of the selected client (optional)portalId
- the OID of the selected portal (optional)versions
- the list of form versions to filter on (optional)deviceType
- the device type to filter on (optional; one ofUserAgentInfo.DEVICE_TYPES
)excludeJobsTasks
- exclude job and task transactions (optional)periodType
- the period type to group by (DataUtils.PERIOD_TYPE_HOUR
orDataUtils.PERIOD_TYPE_DAY
)startDate
- the start date/time (required)endDate
- the end date/time (required)- Returns:
- trend data for the selected period
-
getSubmissionOverviewData
@Deprecated public List<SubmissionTrendBean> getSubmissionOverviewData(Long clientId, String portalId, Collection<TemplateVersion> versions, String deviceType, String periodType, Date startDate, Date endDate) Deprecated.Return live submission overview data for a time period. Note: Test data is included. Submissions may be counted multiple times. The data is intended to measure user activity. Note: excludes jobs invalid input: '&' Tasks- Parameters:
clientId
- the OID of the selected client (optional)portalId
- the OID of the selected portal (optional)versions
- the list of form versions to filter on (optional)deviceType
- the device type to filter on (optional; one ofUserAgentInfo.DEVICE_TYPES
)periodType
- the period type to group by (DataUtils.PERIOD_TYPE_HOUR
orDataUtils.PERIOD_TYPE_DAY
)startDate
- the start date/time (required)endDate
- the end date/time (required)- Returns:
- trend data for the selected period
- Since:
- 4.1.0
-
safelyAbandonSubmission
public boolean safelyAbandonSubmission(Long submissionId, String currentFormStatus, String abandonmentType, String deliveryStatus) Safely mark a submission as abandoned. This method uses a named query that does a conditional update, avoiding race conditions with other threads updating the submission.- Parameters:
submissionId
- the OID of the submission to be abandoned (required)currentFormStatus
- the form status value the submission must be in for abandonment to be performed (required, should be the current known form status)abandonmentType
- the desired abandonment type (required)deliveryStatus
- the new delivery status (optional, currently used only to mark submission as undeliverable)- Returns:
- true if the submission was abandoned, false otherwise
- Since:
- 4.1.0
-
safelySetSubmissionIneligible
public boolean safelySetSubmissionIneligible(Long submissionId, String currentFormStatus, String deliveryStatus) Safely mark a submission as abandoned due to ineligibility of the user. This method uses a named query that does a conditional update, avoiding race conditions with other threads updating the submission.- Parameters:
submissionId
- the OID of the submission to be abandoned (required)currentFormStatus
- the form status value the submission must be in for abandonment to be performed (required, should be the current known form status)deliveryStatus
- the new delivery status (optional, currently used only to mark submission as undeliverable)- Returns:
- true if the submission was abandoned and marked as ineligible, false otherwise
- Since:
- 5.1.0
-
getHelpDeskSubmissions
public List<Submission> getHelpDeskSubmissions(Portal portal, String keyword, String formStatus, Date startDate, boolean includeAnonymousSubmissions, boolean includeAuthenticatedSubmissions) Return a the list help desk submission.- Parameters:
portal
- the portal associated with the submissions (optional)keyword
- the search keyword (optional)formStatus
- the form status (optional)startDate
- the search start date (optional)includeAnonymousSubmissions
- the include anonymous submissions optionincludeAuthenticatedSubmissions
- the include authenticated submissions option- Returns:
- the list help desk submission for the given search criteria
- Since:
- 4.2.0
-
getDocusignMapPendingSubmission
Queries for outstanding DocuSign transactions and returns a Map linking the a DocuSign envelopeId to a SubmissionId- Returns:
- a Mapinvalid input: '<'String, Long> linking a DocuSign envelopeId to a SubmissionId
- Since:
- 4.3.4
-
getJobDeliveryCompleteSubmissions
Returns the submissions that are marked delivery completed and have jobDeliveryRequiredFlag set to true.- Returns:
- the submissions that have delivery completed but have not been processed by collaboration jobs.
- Since:
- 20.11.0
-