Class RecycleBinRetentionSetting

java.lang.Object
org.exoplatform.documents.service.RecycleBinRetentionSetting

@Component public class RecycleBinRetentionSetting extends Object
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 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 code RecycleBinError.RETENTION_INVALID when it is outside the bounds; nothing is stored then