Package de.xima.fc.protocol
Class ProtocolCleaner
java.lang.Object
de.xima.fc.protocol.ProtocolCleaner
Deletes protocol entries for clients
- Author:
- XIMA MEDIA GmbH
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintDeletes all protocol entries for the set configurationkeepFormRecordHistory(boolean keepFormRecordHistory) Sets whether process protocol entries should be preserved (not deleted) when there are still form records in the inbox that reference these protocol entries.withClient(Mandant client) Sets the client for which protocol entries should be deletedwithOlderThanDate(Date olderThanDate) Sets the cut off date.withOlderThanDays(long days) Sets the cut off duration.withOlderThanDaysAndHours(long days, long hours) Sets the cut off duration.withOlderThanDuration(Duration olderThanDuration) Sets the cut off duration.
-
Field Details
-
DEFAULT_OLDER_THAN_DAYS
public static final int DEFAULT_OLDER_THAN_DAYS- See Also:
-
-
Method Details
-
getProtocolType
- Returns:
EProtocolTypefor which protocol entries should be deleted
-
getClient
- Returns:
Mandantfor which protocol entries should be deleted
-
withClient
Sets the client for which protocol entries should be deleted- Parameters:
client-Mandantfor which protocol entries should be deleted- Returns:
ProtocolCleanerfor chaining.
-
getOlderThanDate
- Returns:
Datecut off date. Only protocol entries older than this date will be deleted
-
withOlderThanDate
Sets the cut off date. Only protocol entries older than this date will be deleted- Parameters:
olderThanDate-Datecut off date- Returns:
ProtocolCleanerfor chaining.
-
getOlderThanDuration
- Returns:
Durationcut off duration. Only protocol entries older than this duration will be deleted
-
withOlderThanDuration
Sets the cut off duration. Only protocol entries older than this duration will be deleted- Parameters:
olderThanDuration-Durationcut off duration- Returns:
ProtocolCleanerfor chaining.
-
withOlderThanDays
Sets the cut off duration. Only protocol entries older than this duration will be deleted- Parameters:
days-Longnumber of days- Returns:
ProtocolCleanerfor chaining.
-
keepFormRecordHistory
Sets whether process protocol entries should be preserved (not deleted) when there are still form records in the inbox that reference these protocol entries.- Parameters:
keepFormRecordHistory-trueto keep protocol entries of existing form records,falseto delete them anyway.- Returns:
ProtocolCleanerfor chaining.
-
withOlderThanDaysAndHours
Sets the cut off duration. Only protocol entries older than this duration will be deleted- Parameters:
days-Longnumber of dayshours-Longnumber of hours- Returns:
ProtocolCleaner
-
execute
Deletes all protocol entries for the set configuration- Parameters:
ec-IEntityContextcontains the user that is executing the task- Returns:
- the number of protocol entries that have bee deleted
-