Class DataRetentionManagementServiceImpl

java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.impl.DataRetentionManagementServiceImpl
All Implemented Interfaces:
IDataRetentionManagementService

public class DataRetentionManagementServiceImpl extends CayenneService implements IDataRetentionManagementService
Provides an implementation class for log purge services.
  • Field Details

    • EMAIL_QUEUE_MAX_AGE_DAYS

      public static final int EMAIL_QUEUE_MAX_AGE_DAYS
      The maximum age for failed email queue items(hard-coded)
      See Also:
    • IMPORT_LOG_MAX_AGE_DAYS

      public static final int IMPORT_LOG_MAX_AGE_DAYS
      The maximum age for import log entries, both successful and failed (hard-coded)
      See Also:
    • maxEmailQueueAgeDays

      public int maxEmailQueueAgeDays
      The maximum age for email queue items
  • Constructor Details

    • DataRetentionManagementServiceImpl

      public DataRetentionManagementServiceImpl()
  • Method Details

    • applyDataRetentionPolicy

      public int applyDataRetentionPolicy()
      Purge database records which are due to purged (deleted) from the database using service params values Note that this method contains database transactions.
      Specified by:
      applyDataRetentionPolicy in interface IDataRetentionManagementService
      Returns:
      the number of records deleted
      Since:
      23.10.0
      See Also:
    • applyDataRetentionPolicy

      public int applyDataRetentionPolicy(int fetchLimit, int maxPeriodSec)
      Purge database records which are due to purged (deleted) from the database. Note that this method contains database transactions.
      Specified by:
      applyDataRetentionPolicy in interface IDataRetentionManagementService
      Parameters:
      fetchLimit - the purge fetch limit
      maxPeriodSec - the maximum amount of time to perform data retention in seconds
      Returns:
      the number of records deleted
      See Also:
    • getMaxAuditLogAgeDays

      public int getMaxAuditLogAgeDays()
      Return the age in days at which an audit log entry becomes eligible for purging.
      Specified by:
      getMaxAuditLogAgeDays in interface IDataRetentionManagementService
      Returns:
      The age in days at which an audit log entry becomes eligible for purging
    • setMaxAuditLogAgeDays

      public void setMaxAuditLogAgeDays(int maxAuditLogAgeDays)
      Set the age in days at which an audit log entry becomes eligible for purging.
      Parameters:
      maxAuditLogAgeDays - the age in days at which an audit log entry becomes eligible for purging
    • getMaxUserAuthEventAgeDays

      public int getMaxUserAuthEventAgeDays()
      Return the age in days at which a user authentication event becomes eligible for purging.
      Specified by:
      getMaxUserAuthEventAgeDays in interface IDataRetentionManagementService
      Returns:
      The age in days at which a user authentication event becomes eligible for purging
      Since:
      4.1.3
    • setMaxUserAuthEventAgeDays

      public void setMaxUserAuthEventAgeDays(int maxUserAuthEventAgeDays)
      Set the age in days at which a user authentication event becomes eligible for purging.
      Parameters:
      maxUserAuthEventAgeDays - the age in days at which a user authentication event becomes eligible for purging
      Since:
      4.1.3
    • getMaxCollaborationJobAgeDays

      public int getMaxCollaborationJobAgeDays()
      Return the age in days at which a collaboration job becomes eligible for purging.
      Specified by:
      getMaxCollaborationJobAgeDays in interface IDataRetentionManagementService
      Returns:
      The age in days at which a collaboration job becomes eligible for purging
      Since:
      4.3.3
    • setMaxCollaborationJobAgeDays

      public void setMaxCollaborationJobAgeDays(int maxCollaborationJobAgeDays)
      Set the age in days at which a collaboration job becomes eligible for purging.
      Parameters:
      maxCollaborationJobAgeDays - the age in days at which a collaboration job becomes eligible for purging
      Since:
      4.3.3
    • getMaxCollaborationJobDataAgeDays

      public int getMaxCollaborationJobDataAgeDays()
      Return the age in days at which a collaboration job data becomes eligible for purging.
      Specified by:
      getMaxCollaborationJobDataAgeDays in interface IDataRetentionManagementService
      Returns:
      The age in days at which a collaboration job data becomes eligible for purging
      Since:
      24.4.0
    • setMaxCollaborationJobDataAgeDays

      public void setMaxCollaborationJobDataAgeDays(int maxCollaborationJobDataAgeDays)
      Set the age in days at which a collaboration job data becomes eligible for purging.
      Parameters:
      maxCollaborationJobDataAgeDays - the age in days at which a collaboration job data becomes eligible for purging
      Since:
      24.4.0
    • getMaxErrorLogAgeDays

      public int getMaxErrorLogAgeDays()
      Return the age in days at which an error log entry becomes eligible for purging.
      Specified by:
      getMaxErrorLogAgeDays in interface IDataRetentionManagementService
      Returns:
      the age in days at which an error log entry becomes eligible for purging
    • setMaxErrorLogAgeDays

      public void setMaxErrorLogAgeDays(int maxErrorLogAgeDays)
      Set the age in days at which an error log entry becomes eligible for purging.
      Parameters:
      maxErrorLogAgeDays - the age in days at which an error log entry becomes eligible for purging
    • getMaxEventLogAgeDays

      public int getMaxEventLogAgeDays()
      Return the age in days at which an event log entry becomes eligible for purging.
      Specified by:
      getMaxEventLogAgeDays in interface IDataRetentionManagementService
      Returns:
      The age in days at which an event log entry becomes eligible for purging
    • setMaxEventLogAgeDays

      public void setMaxEventLogAgeDays(int maxEventLogAgeDays)
      Set the age in days at which an event log entry becomes eligible for purging.
      Parameters:
      maxEventLogAgeDays - the age in days at which an event log entry becomes eligible for purging
    • getMaxGroovyServiceLogAgeDays

      public int getMaxGroovyServiceLogAgeDays()
      Return the age in days at which a groovy service log entry becomes eligible for purging.
      Specified by:
      getMaxGroovyServiceLogAgeDays in interface IDataRetentionManagementService
      Returns:
      The age in days at which a groovy service log entry becomes eligible for purging
      Since:
      4.1.0
    • setMaxGroovyServiceLogAgeDays

      public void setMaxGroovyServiceLogAgeDays(int maxGroovyServiceLogAgeDays)
      Set the age in days at which a groovy service log entry becomes eligible for purging.
      Parameters:
      maxGroovyServiceLogAgeDays - the age in days at which a groovy service log entry becomes eligible for purging
      Since:
      4.1.0
    • setMaxOfflineSyncLogAgeDays

      public void setMaxOfflineSyncLogAgeDays(int maxOfflineSyncLogAgeDays)
      Set the age in days at which a Field Worker sync log entry becomes eligible for purging.
      Parameters:
      maxOfflineSyncLogAgeDays - the age in days at which a Field Worker sync log entry becomes eligible for purging
    • getMaxOfflineSyncLogAgeDays

      public int getMaxOfflineSyncLogAgeDays()
      Return the age in days at which a Field Worker sync log entry becomes eligible for purging.
      Specified by:
      getMaxOfflineSyncLogAgeDays in interface IDataRetentionManagementService
      Returns:
      the age in days at which a Field Worker sync log entry becomes eligible for purging
    • getMaxScheduledJobHistoryAgeDays

      public int getMaxScheduledJobHistoryAgeDays()
      Return the age in days at which a scheduled job history entry becomes eligible for purging.
      Specified by:
      getMaxScheduledJobHistoryAgeDays in interface IDataRetentionManagementService
      Returns:
      the age in days at which a scheduled job history entry becomes eligible for purging.
      Since:
      4.3.0
    • setMaxScheduledJobHistoryAgeDays

      public void setMaxScheduledJobHistoryAgeDays(int maxScheduledJobHistoryAgeDays)
      Return the age in days at which a scheduled job history entry becomes eligible for purging.
      Parameters:
      maxScheduledJobHistoryAgeDays - the maximum age in days for scheduled job history entry
      Since:
      4.3.0
    • getMaxSecurityManagerLogAgeDays

      public int getMaxSecurityManagerLogAgeDays()
      Return the age in days at which a security manager log entry becomes eligible for purging.
      Specified by:
      getMaxSecurityManagerLogAgeDays in interface IDataRetentionManagementService
      Returns:
      the age in days at which a security manager log entry becomes eligible for purging.
      Since:
      5.1.0
    • setMaxSecurityManagerLogAgeDays

      public void setMaxSecurityManagerLogAgeDays(int maxSecurityManagerLogAgeDays)
      Set the age in days at which a security manager log entry becomes eligible for purging.
      Parameters:
      maxSecurityManagerLogAgeDays - the age in days at which a security manager log entry becomes eligible for purging.
      Since:
      5.1.0
    • getMaxServerHealthLogAgeDays

      public int getMaxServerHealthLogAgeDays()
      Return the age in days at which a request log entry becomes eligible for purging.
      Specified by:
      getMaxServerHealthLogAgeDays in interface IDataRetentionManagementService
      Returns:
      the age in days at which a request log entry becomes eligible for purging
    • setMaxServerHealthLogAgeDays

      public void setMaxServerHealthLogAgeDays(int maxServerHealthLogAgeDays)
      Set the age in days at which a server health log entry becomes eligible for purging.
      Parameters:
      maxServerHealthLogAgeDays - the age in days at which a system health log entry becomes eligible for purging
    • getMaxSubmissionLogAgeDays

      public int getMaxSubmissionLogAgeDays()
      Gets the max submission log age days.
      Specified by:
      getMaxSubmissionLogAgeDays in interface IDataRetentionManagementService
      Returns:
      the max submission log age days
    • setMaxSubmissionLogAgeDays

      public void setMaxSubmissionLogAgeDays(int maxSubmissionLogAgeDays)
      Sets the max submission log age days.
      Parameters:
      maxSubmissionLogAgeDays - the new max submission log age days
    • getMaxEmailQueueAgeDays

      public int getMaxEmailQueueAgeDays()
      Returns the max email queue age days.
      Specified by:
      getMaxEmailQueueAgeDays in interface IDataRetentionManagementService
      Returns:
      the max email queue age days
    • setMaxEmailQueueAgeDays

      public void setMaxEmailQueueAgeDays(int maxEmailQueueAgeDays)
      Sets the max email queue entry age in days.
      Parameters:
      maxEmailQueueAgeDays - the new purge email queue days
    • setStorageExpiryDays

      public void setStorageExpiryDays(int storageExpiryDays)
      This method does nothing and is provided for backward compatibility purposes.
      Parameters:
      storageExpiryDays - the new storage expiry days
    • getMaxDeliveredSubmissionDataAgeDays

      public int getMaxDeliveredSubmissionDataAgeDays()
      Gets the max delivered submission data age in days.
      Specified by:
      getMaxDeliveredSubmissionDataAgeDays in interface IDataRetentionManagementService
      Returns:
      the purge delivered submission days
    • setMaxDeliveredSubmissionDataAgeDays

      public void setMaxDeliveredSubmissionDataAgeDays(int maxAge)
      Sets the max delivered submission data age in days.
      Parameters:
      maxAge - the new purge delivered submission days
    • getMaxCollaborationJobAbandonAgeDays

      public int getMaxCollaborationJobAbandonAgeDays()
      Return the age in days at which a collaboration job becomes eligible for Abandonment.
      Specified by:
      getMaxCollaborationJobAbandonAgeDays in interface IDataRetentionManagementService
      Returns:
      The age in days at which a collaboration job becomes eligible for Abandonment
      Since:
      22.4.0
    • setMaxCollaborationJobAbandonAgeDays

      public void setMaxCollaborationJobAbandonAgeDays(int maxCollaborationJobAbandonAgeDays)
      Set the age in days at which a collaboration job becomes eligible for Abandonment.
      Parameters:
      maxCollaborationJobAbandonAgeDays - the age in days at which a collaboration job becomes eligible for Abandonment
      Since:
      22.4.0
    • getMaxSavedSubmissionAgeDays

      public int getMaxSavedSubmissionAgeDays()
      Gets the max saved submission age days.
      Specified by:
      getMaxSavedSubmissionAgeDays in interface IDataRetentionManagementService
      Returns:
      the max saved submission age days
    • setMaxSavedSubmissionAgeDays

      public void setMaxSavedSubmissionAgeDays(int maxSavedSubmissionAgeDays)
      Sets the max saved submission age days.
      Parameters:
      maxSavedSubmissionAgeDays - the new max saved submission age days
    • getMaxImportLogAgeDays

      public int getMaxImportLogAgeDays()
      Gets the max import log age days.
      Specified by:
      getMaxImportLogAgeDays in interface IDataRetentionManagementService
      Returns:
      the max import log age days
    • getMaxTransactionHistoryAgeDays

      public int getMaxTransactionHistoryAgeDays()
      Description copied from interface: IDataRetentionManagementService
      Return the maximum age of the transaction history in days.
      Specified by:
      getMaxTransactionHistoryAgeDays in interface IDataRetentionManagementService
      Returns:
      the maxTransactionHistoryAgeDays
    • setMaxTransactionHistoryAgeDays

      public void setMaxTransactionHistoryAgeDays(int maxTransactionHistoryAgeDays)
      Parameters:
      maxTransactionHistoryAgeDays - the maxTransactionHistoryAgeDays to set
    • 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 interface IDataRetentionManagementService
      Returns:
      the enforceGlobalThreshold
    • getPiiSearchPurgeMode

      public String getPiiSearchPurgeMode()
      Specified by:
      getPiiSearchPurgeMode in interface IDataRetentionManagementService
      Returns:
      the piiSearchPurgeMode String
      Since:
      18.11.0
    • setPiiSearchPurgeMode

      public void setPiiSearchPurgeMode(String piiSearchPurgeMode)
      Sets the piiSearchPurgeMode String.
      Parameters:
      piiSearchPurgeMode - the PII Search Purge Mode String
      Since:
      18.11.0
    • setEnforceGlobalThreshold

      public void setEnforceGlobalThreshold(boolean enforceGlobalThreshold)
      Parameters:
      enforceGlobalThreshold - the enforceGlobalThreshold to set
    • getFetchLimitForTransactionPurging

      public int getFetchLimitForTransactionPurging()
      Gets fetch limit for transaction purging.
      Returns:
      the fetch limit for transaction purging
      Since:
      23.10.0
    • setFetchLimitForTransactionPurging

      public void setFetchLimitForTransactionPurging(int fetchLimitForTransactionPurging)
      Sets fetch limit for transaction purging.
      Parameters:
      fetchLimitForTransactionPurging - the fetch limit for transaction purging
      Since:
      23.10.0
    • getMaxDataRetentionPeriod

      public int getMaxDataRetentionPeriod()
      Gets max data retention period.
      Returns:
      the max data retention period
      Since:
      23.10.0
    • setMaxDataRetentionPeriod

      public void setMaxDataRetentionPeriod(int maxDataRetentionPeriod)
      Sets max data retention period.
      Parameters:
      maxDataRetentionPeriod - the max data retention period
      Since:
      23.10.0
    • setLogToEventLog

      public void setLogToEventLog(boolean value)
      Specify whether to log the results of the data retention job to the event log.
      Specified by:
      setLogToEventLog in interface IDataRetentionManagementService
      Parameters:
      value - to specify whether to log the results of the data retention job to the event log
      Since:
      4.3.3