Class RecycleBinServiceImpl

java.lang.Object
org.exoplatform.documents.service.RecycleBinServiceImpl
All Implemented Interfaces:
org.exoplatform.documents.service.RecycleBinService

@Service public class RecycleBinServiceImpl extends Object implements org.exoplatform.documents.service.RecycleBinService
  • Constructor Details

    • RecycleBinServiceImpl

      @Autowired public RecycleBinServiceImpl(org.exoplatform.documents.storage.RecycleBinStorage recycleBinStorage, RecycleBinDriveStorage recycleBinDriveStorage, org.exoplatform.documents.storage.TrashStorage trashStorage, org.exoplatform.documents.storage.JCRDeleteFileStorage jcrDeleteFileStorage, RecycleBinRetentionSetting retentionSetting, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.portal.config.UserACL userAcl, org.exoplatform.services.listener.ListenerService listenerService, @Value("${exo.documents.recycleBin.administratorAccess.enabled:true}") boolean administratorAccessEnabled)
  • Method Details

    • getItems

      public List<org.exoplatform.documents.model.RecycleBinItem> getItems(org.exoplatform.documents.model.RecycleBinScope scope, org.exoplatform.documents.model.RecycleBinFilter filter, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      getItems in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • countItems

      public int countItems(org.exoplatform.documents.model.RecycleBinScope scope, org.exoplatform.documents.model.RecycleBinFilter filter, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      countItems in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • restoreItem

      public void restoreItem(String itemId, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      restoreItem in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • deleteItem

      public void deleteItem(String itemId, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      deleteItem in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • restoreItems

      public void restoreItems(String actionId, List<String> itemIds, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      restoreItems in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • deleteItems

      public void deleteItems(String actionId, List<String> itemIds, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      deleteItems in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • emptyBin

      public void emptyBin(String actionId, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      emptyBin in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • checkCanView

      public org.exoplatform.documents.model.RecycleBinItem checkCanView(String itemId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      checkCanView in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getItemContent

      public io.meeds.portal.thumbnail.model.FileContent getItemContent(String itemId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      getItemContent in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • checkCanViewDocument

      public org.exoplatform.documents.model.RecycleBinItem checkCanViewDocument(String documentId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      checkCanViewDocument in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • undoDelete

      public void undoDelete(String documentId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      undoDelete in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getDrives

      public List<org.exoplatform.documents.model.RecycleBinDrive> getDrives(long offset, int limit, String username) throws IllegalAccessException
      Specified by:
      getDrives in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      IllegalAccessException
    • countDrives

      public long countDrives(String username) throws IllegalAccessException
      Specified by:
      countDrives in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      IllegalAccessException
    • isAdministratorAccessEnabled

      public boolean isAdministratorAccessEnabled()
      Specified by:
      isAdministratorAccessEnabled in interface org.exoplatform.documents.service.RecycleBinService
    • itemTrashed

      public void itemTrashed(long ownerId, long size)
      Specified by:
      itemTrashed in interface org.exoplatform.documents.service.RecycleBinService
    • getRetentionDays

      public long getRetentionDays()
      Specified by:
      getRetentionDays in interface org.exoplatform.documents.service.RecycleBinService
    • setRetentionDays

      public void setRetentionDays(long retentionDays, String username) throws IllegalAccessException
      Specified by:
      setRetentionDays in interface org.exoplatform.documents.service.RecycleBinService
      Throws:
      IllegalAccessException
    • purgeExpired

      public void purgeExpired()
      Specified by:
      purgeExpired in interface org.exoplatform.documents.service.RecycleBinService
    • purgeExpired

      public void purgeExpired(String requester)
      Specified by:
      purgeExpired in interface org.exoplatform.documents.service.RecycleBinService
    • normalizeItems

      public int normalizeItems()
      Specified by:
      normalizeItems in interface org.exoplatform.documents.service.RecycleBinService
    • recountDrives

      public void recountDrives()
      Specified by:
      recountDrives in interface org.exoplatform.documents.service.RecycleBinService