Package de.xima.fc.protocol
Class ProtocolCleaner
- java.lang.Object
-
- de.xima.fc.protocol.ProtocolCleaner
-
public class ProtocolCleaner extends Object
Deletes protocol entries for clients- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProtocolCleaner.ProtocolCleanerFactory
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_OLDER_THAN_DAYS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
execute(IEntityContext ec)
Deletes all protocol entries for the set configurationMandant
getClient()
Date
getOlderThanDate()
Duration
getOlderThanDuration()
EProtocolType
getProtocolType()
ProtocolCleaner
keepFormRecordHistory(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.ProtocolCleaner
withClient(Mandant client)
Sets the client for which protocol entries should be deletedProtocolCleaner
withOlderThanDate(Date olderThanDate)
Sets the cut off date.ProtocolCleaner
withOlderThanDays(long days)
Sets the cut off duration.ProtocolCleaner
withOlderThanDaysAndHours(long days, long hours)
Sets the cut off duration.ProtocolCleaner
withOlderThanDuration(Duration olderThanDuration)
Sets the cut off duration.
-
-
-
Field Detail
-
DEFAULT_OLDER_THAN_DAYS
public static final int DEFAULT_OLDER_THAN_DAYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProtocolType
public EProtocolType getProtocolType()
- Returns:
EProtocolType
for which protocol entries should be deleted
-
withClient
public ProtocolCleaner withClient(Mandant client)
Sets the client for which protocol entries should be deleted- Parameters:
client
-Mandant
for which protocol entries should be deleted- Returns:
ProtocolCleaner
for chaining.
-
getOlderThanDate
public Date getOlderThanDate()
- Returns:
Date
cut off date. Only protocol entries older than this date will be deleted
-
withOlderThanDate
public ProtocolCleaner withOlderThanDate(Date olderThanDate)
Sets the cut off date. Only protocol entries older than this date will be deleted- Parameters:
olderThanDate
-Date
cut off date- Returns:
ProtocolCleaner
for chaining.
-
getOlderThanDuration
public Duration getOlderThanDuration()
- Returns:
Duration
cut off duration. Only protocol entries older than this duration will be deleted
-
withOlderThanDuration
public ProtocolCleaner withOlderThanDuration(Duration olderThanDuration)
Sets the cut off duration. Only protocol entries older than this duration will be deleted- Parameters:
olderThanDuration
-Duration
cut off duration- Returns:
ProtocolCleaner
for chaining.
-
withOlderThanDays
public ProtocolCleaner withOlderThanDays(long days)
Sets the cut off duration. Only protocol entries older than this duration will be deleted- Parameters:
days
-Long
number of days- Returns:
ProtocolCleaner
for chaining.
-
keepFormRecordHistory
public ProtocolCleaner keepFormRecordHistory(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.- Parameters:
keepFormRecordHistory
-true
to keep protocol entries of existing form records,false
to delete them anyway.- Returns:
ProtocolCleaner
for chaining.
-
withOlderThanDaysAndHours
public ProtocolCleaner withOlderThanDaysAndHours(long days, long hours)
Sets the cut off duration. Only protocol entries older than this duration will be deleted- Parameters:
days
-Long
number of dayshours
-Long
number of hours- Returns:
ProtocolCleaner
-
execute
public int execute(IEntityContext ec)
Deletes all protocol entries for the set configuration- Parameters:
ec
-IEntityContext
contains the user that is executing the task- Returns:
- the number of protocol entries that have bee deleted
-
-