Class RecycleBinRetentionSetting
java.lang.Object
org.exoplatform.documents.service.RecycleBinRetentionSetting
The number of days an item stays in a Recycle Bin, one value for the whole
platform. Whatever its source, a value outside the bounds is never handed
out: the purge removes items for good with it.
-
Constructor Summary
ConstructorsConstructorDescriptionRecycleBinRetentionSetting(org.exoplatform.commons.api.settings.SettingService settingService, String formerLifetime) -
Method Summary
-
Constructor Details
-
RecycleBinRetentionSetting
public RecycleBinRetentionSetting(org.exoplatform.commons.api.settings.SettingService settingService, @Value("${exo.trashcleaner.lifetime:}") String formerLifetime)
-
-
Method Details
-
get
public long get()- Returns:
- the period in force: the one an administrator set, else the one the platform is configured with
-
set
public void set(long days) - Parameters:
days- the period an administrator sets- Throws:
IllegalArgumentException- with the codeRecycleBinError.RETENTION_INVALIDwhen it is outside the bounds; nothing is stored then
-