Class RecycleBinEntityBuilder
java.lang.Object
org.exoplatform.documents.rest.util.RecycleBinEntityBuilder
Builds what the screens of the Recycle Bin read from what the service
returns.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RecycleBinDriveEntitytoDriveEntity(org.exoplatform.documents.model.RecycleBinDrive drive, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService) static RecycleBinItemEntitytoItemEntity(org.exoplatform.documents.model.RecycleBinItem item, boolean viewable, org.exoplatform.social.core.manager.IdentityManager identityManager) static StringtoOriginalLocation(String restorePath) static StringtoOriginalLocation(String restorePath, List<String> folderTitles)
-
Method Details
-
toItemEntity
public static RecycleBinItemEntity toItemEntity(org.exoplatform.documents.model.RecycleBinItem item, boolean viewable, org.exoplatform.social.core.manager.IdentityManager identityManager) - Parameters:
item- an item of a binviewable- whether the bin is one its items are opened from: the caller's own or a space's, never the bin of a drive an administrator acts onidentityManager- reads the name of who deleted the item- Returns:
- the item as a screen lists it
-
toOriginalLocation
- Parameters:
restorePath- the path an item was deleted from- Returns:
- the folder it was in, from the root of its drive, "/" for the root itself, the public folder of a user and what it holds under "/Public"; the whole path of the folder when it is in no drive; null when no path was recorded
-
toOriginalLocation
- Parameters:
restorePath- the path an item was deleted fromfolderTitles- the names the documents show of the folders of that path, one for each of them from the root of the repository, or null when not known- Returns:
- the folder it was in, as
toOriginalLocation(String)gives it, each folder of its drive named as the documents show it when the names are known
-
toDriveEntity
public static RecycleBinDriveEntity toDriveEntity(org.exoplatform.documents.model.RecycleBinDrive drive, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService) - Parameters:
drive- the totals of the bin of a drive- Returns:
- the drive as the Bin Overview lists it, with what is known of its owner
-