Package com.avoka.fc.core.service
Class AbandonmentService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- com.avoka.fc.core.service.AbandonmentService
-
public class AbandonmentService extends CayenneService
Provides utility methods for submission abandonment.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbandonmentService.AbandonMode
-
Field Summary
Fields Modifier and Type Field Description static String
ABANDONMENT_TYPE_ADMINISTRATOR
The type for transactions abandoned by an administrator.static String
ABANDONMENT_TYPE_INELIGIBLE
The type for transactions abandoned due to user ineligibility.static String
ABANDONMENT_TYPE_SYSTEM
The type for transactions abandoned by the system.static String
ABANDONMENT_TYPE_USER
The type for transactions abandoned by the submitting user.static String[]
ABANDONMENT_TYPES
The set of abandonment types.
-
Constructor Summary
Constructors Constructor Description AbandonmentService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
performExplicitAdminAbandonment(Submission submission)
Perform explicit administrator abandonment.boolean
performExplicitUserAbandonment(Submission submission)
Perform explicit user abandonment.boolean
performExplicitUserTaskAbandonment(Submission submission)
Perform explicit user submission task abandonment.boolean
performImmediateAdminAbandonment(Submission submission, AbandonmentService.AbandonMode abandonMode)
Perform immediate administrator abandonment.boolean
performImplicitAbandonment(Submission submission)
Perform implicit abandonment.boolean
performIneligibilityAbandonment(Submission submission)
Perform submission abandonment due to user ineligibility.boolean
requiresAbandonDelivery(Submission submission)
Return true if the submission requires abandonment delivery.-
Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
-
-
-
Field Detail
-
ABANDONMENT_TYPE_SYSTEM
public static final String ABANDONMENT_TYPE_SYSTEM
The type for transactions abandoned by the system.- See Also:
- Constant Field Values
-
ABANDONMENT_TYPE_USER
public static final String ABANDONMENT_TYPE_USER
The type for transactions abandoned by the submitting user.- See Also:
- Constant Field Values
-
ABANDONMENT_TYPE_ADMINISTRATOR
public static final String ABANDONMENT_TYPE_ADMINISTRATOR
The type for transactions abandoned by an administrator.- See Also:
- Constant Field Values
-
ABANDONMENT_TYPE_INELIGIBLE
public static final String ABANDONMENT_TYPE_INELIGIBLE
The type for transactions abandoned due to user ineligibility.- See Also:
- Constant Field Values
-
ABANDONMENT_TYPES
public static final String[] ABANDONMENT_TYPES
The set of abandonment types.
-
-
Method Detail
-
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
- eitherAbandonmentService.AbandonMode.IMMEDIATE_DATA_PURGE
for purging of PII data only orAbandonmentService.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.
-
-