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 Summary
ConstructorsConstructorDescriptionRecycleBinServiceImpl(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, boolean administratorAccessEnabled) -
Method Summary
Modifier and TypeMethodDescriptionorg.exoplatform.documents.model.RecycleBinItemcheckCanView(String itemId, String username) org.exoplatform.documents.model.RecycleBinItemcheckCanViewDocument(String documentId, String username) longcountDrives(String username) intcountItems(org.exoplatform.documents.model.RecycleBinScope scope, org.exoplatform.documents.model.RecycleBinFilter filter, String username) voiddeleteItem(String itemId, org.exoplatform.documents.model.RecycleBinScope scope, String username) voiddeleteItems(String actionId, List<String> itemIds, org.exoplatform.documents.model.RecycleBinScope scope, String username) voidList<org.exoplatform.documents.model.RecycleBinDrive> io.meeds.portal.thumbnail.model.FileContentgetItemContent(String itemId, String username) List<org.exoplatform.documents.model.RecycleBinItem> getItems(org.exoplatform.documents.model.RecycleBinScope scope, org.exoplatform.documents.model.RecycleBinFilter filter, String username) longbooleanvoiditemTrashed(long ownerId, long size) intvoidvoidpurgeExpired(String requester) voidvoidrestoreItem(String itemId, org.exoplatform.documents.model.RecycleBinScope scope, String username) voidrestoreItems(String actionId, List<String> itemIds, org.exoplatform.documents.model.RecycleBinScope scope, String username) voidsetRetentionDays(long retentionDays, String username) voidundoDelete(String documentId, String username)
-
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:
getItemsin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
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:
countItemsin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
restoreItem
public void restoreItem(String itemId, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
restoreItemin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
deleteItem
public void deleteItem(String itemId, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
deleteItemin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
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:
restoreItemsin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
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:
deleteItemsin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
emptyBin
public void emptyBin(String actionId, org.exoplatform.documents.model.RecycleBinScope scope, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
emptyBinin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
checkCanView
public org.exoplatform.documents.model.RecycleBinItem checkCanView(String itemId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
checkCanViewin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getItemContent
public io.meeds.portal.thumbnail.model.FileContent getItemContent(String itemId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
getItemContentin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
checkCanViewDocument
public org.exoplatform.documents.model.RecycleBinItem checkCanViewDocument(String documentId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
checkCanViewDocumentin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
undoDelete
public void undoDelete(String documentId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
undoDeletein interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getDrives
public List<org.exoplatform.documents.model.RecycleBinDrive> getDrives(long offset, int limit, String username) throws IllegalAccessException - Specified by:
getDrivesin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
IllegalAccessException
-
countDrives
- Specified by:
countDrivesin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
IllegalAccessException
-
isAdministratorAccessEnabled
public boolean isAdministratorAccessEnabled()- Specified by:
isAdministratorAccessEnabledin interfaceorg.exoplatform.documents.service.RecycleBinService
-
itemTrashed
public void itemTrashed(long ownerId, long size) - Specified by:
itemTrashedin interfaceorg.exoplatform.documents.service.RecycleBinService
-
getRetentionDays
public long getRetentionDays()- Specified by:
getRetentionDaysin interfaceorg.exoplatform.documents.service.RecycleBinService
-
setRetentionDays
- Specified by:
setRetentionDaysin interfaceorg.exoplatform.documents.service.RecycleBinService- Throws:
IllegalAccessException
-
purgeExpired
public void purgeExpired()- Specified by:
purgeExpiredin interfaceorg.exoplatform.documents.service.RecycleBinService
-
purgeExpired
- Specified by:
purgeExpiredin interfaceorg.exoplatform.documents.service.RecycleBinService
-
normalizeItems
public int normalizeItems()- Specified by:
normalizeItemsin interfaceorg.exoplatform.documents.service.RecycleBinService
-
recountDrives
public void recountDrives()- Specified by:
recountDrivesin interfaceorg.exoplatform.documents.service.RecycleBinService
-