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 classProtocolCleaner.ProtocolCleanerFactory 
- 
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_OLDER_THAN_DAYS 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intexecute(IEntityContext ec)Deletes all protocol entries for the set configurationMandantgetClient()DategetOlderThanDate()DurationgetOlderThanDuration()EProtocolTypegetProtocolType()ProtocolCleanerkeepFormRecordHistory(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.ProtocolCleanerwithClient(Mandant client)Sets the client for which protocol entries should be deletedProtocolCleanerwithOlderThanDate(Date olderThanDate)Sets the cut off date.ProtocolCleanerwithOlderThanDays(long days)Sets the cut off duration.ProtocolCleanerwithOlderThanDaysAndHours(long days, long hours)Sets the cut off duration.ProtocolCleanerwithOlderThanDuration(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:
 EProtocolTypefor which protocol entries should be deleted
 
- 
withClient
public ProtocolCleaner withClient(Mandant client)
Sets the client for which protocol entries should be deleted- Parameters:
 client-Mandantfor which protocol entries should be deleted- Returns:
 ProtocolCleanerfor chaining.
 
- 
getOlderThanDate
public Date getOlderThanDate()
- Returns:
 Datecut 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-Datecut off date- Returns:
 ProtocolCleanerfor chaining.
 
- 
getOlderThanDuration
public Duration getOlderThanDuration()
- Returns:
 Durationcut 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-Durationcut off duration- Returns:
 ProtocolCleanerfor chaining.
 
- 
withOlderThanDays
public ProtocolCleaner withOlderThanDays(long days)
Sets the cut off duration. Only protocol entries older than this duration will be deleted- Parameters:
 days-Longnumber of days- Returns:
 ProtocolCleanerfor 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-trueto keep protocol entries of existing form records,falseto delete them anyway.- Returns:
 ProtocolCleanerfor 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-Longnumber of dayshours-Longnumber of hours- Returns:
 ProtocolCleaner
 
- 
execute
public int execute(IEntityContext ec)
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
 
 
 - 
 
 -