Class AbandonmentService


public class AbandonmentService extends CayenneService
Provides utility methods for submission abandonment.
Since:
4.0.0
  • Field Details

    • ABANDONMENT_TYPE_SYSTEM

      public static final String ABANDONMENT_TYPE_SYSTEM
      The type for transactions abandoned by the system.
      See Also:
    • ABANDONMENT_TYPE_USER

      public static final String ABANDONMENT_TYPE_USER
      The type for transactions abandoned by the submitting user.
      See Also:
    • ABANDONMENT_TYPE_ADMINISTRATOR

      public static final String ABANDONMENT_TYPE_ADMINISTRATOR
      The type for transactions abandoned by an administrator.
      See Also:
    • ABANDONMENT_TYPE_INELIGIBLE

      public static final String ABANDONMENT_TYPE_INELIGIBLE
      The type for transactions abandoned due to user ineligibility.
      See Also:
    • ABANDONMENT_TYPES

      public static final String[] ABANDONMENT_TYPES
      The set of abandonment types.
  • Constructor Details

    • AbandonmentService

      public AbandonmentService()
  • Method Details

    • performExplicitAdminAbandonment

      public boolean performExplicitAdminAbandonment(Submission submission)
      Perform explicit administrator abandonment.
      Parameters:
      submission - the submission (required)
      Returns:
      true if the submission was actually abandoned
    • performImmediateAdminAbandonment

      public boolean performImmediateAdminAbandonment(Submission submission, AbandonmentService.AbandonMode abandonMode)
      Perform immediate administrator abandonment. This is used by administrators to immediately abandon and mark for purging a submission, e.g. to enact the "Right to be Forgotten". It will abandon the submission unless already abandoned without performing task reset or abandonment delivery.
      Parameters:
      submission - the submission (required)
      abandonMode - either AbandonmentService.AbandonMode.IMMEDIATE_DATA_PURGE for purging of PII data only or AbandonmentService.AbandonMode.IMMEDIATE_FULL_PURGE for purging of the submission record
      Returns:
      true if the submission was actually abandoned
      Since:
      18.11.0
    • performExplicitUserAbandonment

      public boolean performExplicitUserAbandonment(Submission submission)
      Perform explicit user abandonment.

      Note this method will reset any task submissions to 'Assigned' status.

      Parameters:
      submission - the submission (required), note already completed or abandoned submissions will not be abandoned
      Returns:
      true if the submission was actually abandoned
    • performExplicitUserTaskAbandonment

      public boolean performExplicitUserTaskAbandonment(Submission submission)
      Perform explicit user submission task abandonment.
      Parameters:
      submission - the submission (required), note already completed or abandoned submissions will not be abandoned
      Returns:
      true if the task submission was abandoned, or false otherwise
    • performImplicitAbandonment

      public boolean performImplicitAbandonment(Submission submission)
      Perform implicit abandonment. Called by by background abandonment job. This method will not reset any Tasks, but will abandon them.
      Parameters:
      submission - the submission (required)
      Returns:
      true if the submission requires abandonment delivery.
    • performIneligibilityAbandonment

      public boolean performIneligibilityAbandonment(Submission submission)
      Perform submission abandonment due to user ineligibility.
      Parameters:
      submission - the submission (required), note already completed or abandoned submissions will not be abandoned
      Returns:
      true if the submission was abandoned, or false otherwise
      Since:
      5.1.0
    • requiresAbandonDelivery

      public boolean requiresAbandonDelivery(Submission submission)
      Return true if the submission requires abandonment delivery.
      Parameters:
      submission - the submission to test (required)
      Returns:
      true if the submission requires abandonment delivery.