Package com.avoka.fc.core.service.impl
Class DataRetentionManagementServiceImplV2
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.impl.DataRetentionManagementServiceImplV2
- All Implemented Interfaces:
IDataRetentionManagementService
public class DataRetentionManagementServiceImplV2
extends CayenneService
implements IDataRetentionManagementService
Provides a Data Retention Service that delegates calls the configured purgers for processing
- Since:
- 24.04.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The maximum age for import log entries, both successful and failed (hard-coded)int
The maximum age for email queue itemsFields inherited from interface com.avoka.fc.core.service.IDataRetentionManagementService
PARAM_ENFORCE_GLOBAL_THRESHOLD, PARAM_MAX_AUDIT_LOG_AGE_DAYS, PARAM_MAX_COLLABORATION_JOB_ABANDON_AGE_DAYS, PARAM_MAX_COLLABORATION_JOB_AGE_DAYS, PARAM_MAX_COLLABORATION_JOB_DATA_AGE_DAYS, PARAM_MAX_DELIVERED_SUBMISSION_DATA_AGE_DAYS, PARAM_MAX_EMAIL_QUEUE_AGE_DAYS, PARAM_MAX_ERROR_LOG_AGE_DAYS, PARAM_MAX_EVENT_LOG_AGE_DAYS, PARAM_MAX_GROOVY_SERVICE_LOG_AGE_DAYS, PARAM_MAX_OFFLINE_SYNC_LOG_AGE_DAYS, PARAM_MAX_SAVED_SUBMISSION_AGE_DAYS, PARAM_MAX_SCHEDULED_JOB_HISTORY_AGE_DAYS, PARAM_MAX_SECURITY_MANAGER_LOG_AGE_DAYS, PARAM_MAX_SUBMISSION_LOG_AGE_DAYS, PARAM_MAX_TRANSACTION_HISTORY_AGE_DAYS, PARAM_MAX_USER_AUTH_EVENT_AGE_DAYS, PARAM_PII_SEARCH_PURGE_MODE, PARAM_PII_SEARCH_PURGE_MODE_PURGE_TIME, PII_SEARCH_PURGE_MODE_DELIVERY_COMPLETED, PII_SEARCH_PURGE_MODE_FORM_COMPLETED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Apply data retention policies and return the number of records deleted using service params valuesint
applyDataRetentionPolicy
(int purgeTxnsFetchLimit, int maxPeriodSec) Apply data retention policies and return the number of records deleted.int
int
int
Return the age in days at which an audit log entry becomes eligible for purging.int
Return the maximum age (in days) of collaboration jobs before Abandonment.int
Return the maximum age (in days) of collaboration jobs and all associated entities such as job steps, job actions and submissions.int
Return the maximum age (in days) of collaboration job data.int
int
Return the max delivered submission data age in days.int
Return the max email queue age days.int
Return the age in days at which an error log entry becomes eligible for purging.int
Return the age in days at which an event log entry becomes eligible for purging.int
Return the age in days at which a groovy service log entry becomes eligible for purging.int
Return the max import log age days.int
Return the age in days at which a Field Worker sync log entry becomes eligible for purging.int
Return the max saved submission data age days.int
Return the age in days at which a scheduled job history entry becomes eligible for purging.int
Return the age in days at which a security manager log entry becomes eligible for purging.int
Return the age in days at which a server health log entry becomes eligible for purging.int
Return the max submission log age days.int
Return the maximum age of the transaction history in days.int
Return the age in days at which a user authentication event becomes eligible for purging.boolean
Return whether the service is configured to enforce global policies over organization and form level policies.boolean
void
setCommitBatch
(int commitBatch) void
setEnforceGlobalThreshold
(boolean enforceGlobalThreshold) void
setFetchLimitForTransactionPurging
(int fetchLimitForTransactionPurging) void
setLogToEventLog
(boolean value) Specify whether to log the results of the data retention job to the event log.void
setMaxAuditLogAgeDays
(int maxAuditLogAgeDays) void
setMaxCollaborationJobAbandonAgeDays
(int maxCollaborationJobAbandonAgeDays) void
setMaxCollaborationJobAgeDays
(int maxCollaborationJobAgeDays) void
setMaxCollaborationJobDataAgeDays
(int maxCollaborationJobDataAgeDays) void
setMaxDataRetentionPeriod
(int maxDataRetentionPeriod) void
setMaxDeliveredSubmissionDataAgeDays
(int maxDeliveredSubmissionDataAgeDays) void
setMaxEmailQueueAgeDays
(int maxEmailQueueAgeDays) void
setMaxErrorLogAgeDays
(int maxErrorLogAgeDays) void
setMaxEventLogAgeDays
(int maxEventLogAgeDays) void
setMaxGroovyServiceLogAgeDays
(int maxGroovyServiceLogAgeDays) void
setMaxOfflineSyncLogAgeDays
(int maxOfflineSyncLogAgeDays) void
setMaxSavedSubmissionAgeDays
(int maxSavedSubmissionAgeDays) void
setMaxScheduledJobHistoryAgeDays
(int maxScheduledJobHistoryAgeDays) void
setMaxSecurityManagerLogAgeDays
(int maxSecurityManagerLogAgeDays) void
setMaxServerHealthLogAgeDays
(int maxServerHealthLogAgeDays) void
setMaxSubmissionLogAgeDays
(int maxSubmissionLogAgeDays) void
setMaxTransactionHistoryAgeDays
(int maxTransactionHistoryAgeDays) void
setMaxUserAuthEventAgeDays
(int maxUserAuthEventAgeDays) void
setPiiSearchPurgeMode
(String piiSearchPurgeMode) 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 Details
-
IMPORT_LOG_MAX_AGE_DAYS
public static final int IMPORT_LOG_MAX_AGE_DAYSThe maximum age for import log entries, both successful and failed (hard-coded)- See Also:
-
maxEmailQueueAgeDays
public int maxEmailQueueAgeDaysThe maximum age for email queue items
-
-
Constructor Details
-
DataRetentionManagementServiceImplV2
public DataRetentionManagementServiceImplV2()
-
-
Method Details
-
getMaxImportLogAgeDays
public int getMaxImportLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the max import log age days.- Specified by:
getMaxImportLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the max import log age days
-
getMaxAuditLogAgeDays
public int getMaxAuditLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which an audit log entry becomes eligible for purging.- Specified by:
getMaxAuditLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- The age in days at which an audit log entry becomes eligible for purging
-
setMaxAuditLogAgeDays
public void setMaxAuditLogAgeDays(int maxAuditLogAgeDays) -
getMaxUserAuthEventAgeDays
public int getMaxUserAuthEventAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which a user authentication event becomes eligible for purging.- Specified by:
getMaxUserAuthEventAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- The age in days at which a user authentication event becomes eligible for purging
-
setMaxUserAuthEventAgeDays
public void setMaxUserAuthEventAgeDays(int maxUserAuthEventAgeDays) -
getMaxCollaborationJobAgeDays
public int getMaxCollaborationJobAgeDays()Description copied from interface:IDataRetentionManagementService
Return the maximum age (in days) of collaboration jobs and all associated entities such as job steps, job actions and submissions.- Specified by:
getMaxCollaborationJobAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the maximum age (in days) of collaboration jobs
-
setMaxCollaborationJobAgeDays
public void setMaxCollaborationJobAgeDays(int maxCollaborationJobAgeDays) -
getMaxCollaborationJobDataAgeDays
public int getMaxCollaborationJobDataAgeDays()Description copied from interface:IDataRetentionManagementService
Return the maximum age (in days) of collaboration job data.- Specified by:
getMaxCollaborationJobDataAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the maximum age (in days) of collaboration job data.
-
setMaxCollaborationJobDataAgeDays
public void setMaxCollaborationJobDataAgeDays(int maxCollaborationJobDataAgeDays) -
getMaxCollaborationJobAbandonAgeDays
public int getMaxCollaborationJobAbandonAgeDays()Description copied from interface:IDataRetentionManagementService
Return the maximum age (in days) of collaboration jobs before Abandonment.- Specified by:
getMaxCollaborationJobAbandonAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the maximum age (in days) of collaboration jobs before Abandonment.
-
setMaxCollaborationJobAbandonAgeDays
public void setMaxCollaborationJobAbandonAgeDays(int maxCollaborationJobAbandonAgeDays) -
getMaxEmailQueueAgeDays
public int getMaxEmailQueueAgeDays()Description copied from interface:IDataRetentionManagementService
Return the max email queue age days.- Specified by:
getMaxEmailQueueAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the max email queue age days
-
setMaxEmailQueueAgeDays
public void setMaxEmailQueueAgeDays(int maxEmailQueueAgeDays) -
getMaxErrorLogAgeDays
public int getMaxErrorLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which an error log entry becomes eligible for purging.- Specified by:
getMaxErrorLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the age in days at which an error log entry becomes eligible for purging
-
setMaxErrorLogAgeDays
public void setMaxErrorLogAgeDays(int maxErrorLogAgeDays) -
getMaxEventLogAgeDays
public int getMaxEventLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which an event log entry becomes eligible for purging.- Specified by:
getMaxEventLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- The age in days at which an event log entry becomes eligible for purging
-
setMaxEventLogAgeDays
public void setMaxEventLogAgeDays(int maxEventLogAgeDays) -
getMaxGroovyServiceLogAgeDays
public int getMaxGroovyServiceLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which a groovy service log entry becomes eligible for purging.- Specified by:
getMaxGroovyServiceLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- The age in days at which a groovy service log entry becomes eligible for purging
-
setMaxGroovyServiceLogAgeDays
public void setMaxGroovyServiceLogAgeDays(int maxGroovyServiceLogAgeDays) -
getMaxOfflineSyncLogAgeDays
public int getMaxOfflineSyncLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which a Field Worker sync log entry becomes eligible for purging.- Specified by:
getMaxOfflineSyncLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the age in days at which a Field Worker sync log entry becomes eligible for purging
-
setMaxOfflineSyncLogAgeDays
public void setMaxOfflineSyncLogAgeDays(int maxOfflineSyncLogAgeDays) -
getMaxSavedSubmissionAgeDays
public int getMaxSavedSubmissionAgeDays()Description copied from interface:IDataRetentionManagementService
Return the max saved submission data age days.- Specified by:
getMaxSavedSubmissionAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the max saved submission data age days
-
setMaxSavedSubmissionAgeDays
public void setMaxSavedSubmissionAgeDays(int maxSavedSubmissionAgeDays) -
getMaxScheduledJobHistoryAgeDays
public int getMaxScheduledJobHistoryAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which a scheduled job history entry becomes eligible for purging.- Specified by:
getMaxScheduledJobHistoryAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the age in days at which a scheduled job history entry becomes eligible for purging.
-
setMaxScheduledJobHistoryAgeDays
public void setMaxScheduledJobHistoryAgeDays(int maxScheduledJobHistoryAgeDays) -
getMaxSecurityManagerLogAgeDays
public int getMaxSecurityManagerLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which a security manager log entry becomes eligible for purging.- Specified by:
getMaxSecurityManagerLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the age in days at which a security manager log entry becomes eligible for purging.
-
setMaxSecurityManagerLogAgeDays
public void setMaxSecurityManagerLogAgeDays(int maxSecurityManagerLogAgeDays) -
getMaxServerHealthLogAgeDays
public int getMaxServerHealthLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the age in days at which a server health log entry becomes eligible for purging.- Specified by:
getMaxServerHealthLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the age in days at which a server health log entry becomes eligible for purging
-
setMaxServerHealthLogAgeDays
public void setMaxServerHealthLogAgeDays(int maxServerHealthLogAgeDays) -
getMaxSubmissionLogAgeDays
public int getMaxSubmissionLogAgeDays()Description copied from interface:IDataRetentionManagementService
Return the max submission log age days.- Specified by:
getMaxSubmissionLogAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the max submission log age days
-
setMaxSubmissionLogAgeDays
public void setMaxSubmissionLogAgeDays(int maxSubmissionLogAgeDays) -
getMaxTransactionHistoryAgeDays
public int getMaxTransactionHistoryAgeDays()Description copied from interface:IDataRetentionManagementService
Return the maximum age of the transaction history in days.- Specified by:
getMaxTransactionHistoryAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the maxTransactionHistoryAgeDays
-
setMaxTransactionHistoryAgeDays
public void setMaxTransactionHistoryAgeDays(int maxTransactionHistoryAgeDays) -
getMaxDeliveredSubmissionDataAgeDays
public int getMaxDeliveredSubmissionDataAgeDays()Description copied from interface:IDataRetentionManagementService
Return the max delivered submission data age in days.- Specified by:
getMaxDeliveredSubmissionDataAgeDays
in interfaceIDataRetentionManagementService
- Returns:
- the purge delivered submission days
-
setMaxDeliveredSubmissionDataAgeDays
public void setMaxDeliveredSubmissionDataAgeDays(int maxDeliveredSubmissionDataAgeDays) -
getPiiSearchPurgeMode
- Specified by:
getPiiSearchPurgeMode
in interfaceIDataRetentionManagementService
- Returns:
- the piiSearchPurgeMode String
-
setPiiSearchPurgeMode
-
setEnforceGlobalThreshold
public void setEnforceGlobalThreshold(boolean enforceGlobalThreshold) -
getCommitBatch
public int getCommitBatch() -
setCommitBatch
public void setCommitBatch(int commitBatch) -
getFetchLimitForTransactionPurging
public int getFetchLimitForTransactionPurging() -
setFetchLimitForTransactionPurging
public void setFetchLimitForTransactionPurging(int fetchLimitForTransactionPurging) -
getMaxDataRetentionPeriod
public int getMaxDataRetentionPeriod() -
setMaxDataRetentionPeriod
public void setMaxDataRetentionPeriod(int maxDataRetentionPeriod) -
isEnforceGlobalThreshold
public boolean isEnforceGlobalThreshold()Description copied from interface:IDataRetentionManagementService
Return whether the service is configured to enforce global policies over organization and form level policies. If set, organizations and forms cannot specify retention times that are less restrictive (=longer) than the current global settings.- Specified by:
isEnforceGlobalThreshold
in interfaceIDataRetentionManagementService
- Returns:
- whether the service is configured to enforce global policies
-
isLogToEventLog
public boolean isLogToEventLog() -
setLogToEventLog
public void setLogToEventLog(boolean value) Description copied from interface:IDataRetentionManagementService
Specify whether to log the results of the data retention job to the event log.- Specified by:
setLogToEventLog
in interfaceIDataRetentionManagementService
- Parameters:
value
- to specify whether to log the results of the data retention job to the event log
-
applyDataRetentionPolicy
public int applyDataRetentionPolicy()Description copied from interface:IDataRetentionManagementService
Apply data retention policies and return the number of records deleted using service params values- Specified by:
applyDataRetentionPolicy
in interfaceIDataRetentionManagementService
- Returns:
- the number of records deleted
-
applyDataRetentionPolicy
public int applyDataRetentionPolicy(int purgeTxnsFetchLimit, int maxPeriodSec) Description copied from interface:IDataRetentionManagementService
Apply data retention policies and return the number of records deleted.- Specified by:
applyDataRetentionPolicy
in interfaceIDataRetentionManagementService
- Parameters:
purgeTxnsFetchLimit
- the fast mode purge transactions fetch limitmaxPeriodSec
- the maximum amount of time to perform data retention in seconds- Returns:
- the number of records deleted
-