@Component public class StorageFileDaoHelper extends Object
| Constructor and Description |
|---|
StorageFileDaoHelper() |
| Modifier and Type | Method and Description |
|---|---|
List<StorageFileEntity> |
createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity,
List<StorageFile> storageFiles)
Creates storage file entities from the list of storage files.
|
StorageFileEntity |
getStorageFileEntity(StorageUnitEntity storageUnitEntity,
String filePath,
BusinessObjectDataKey businessObjectDataKey)
Retrieves storage file by storage unit entity and file path.
|
StorageFileEntity |
getStorageFileEntity(String storageName,
String filePath)
Retrieves storage file by storage name and file path.
|
void |
validateStorageFilesCount(String storageName,
BusinessObjectDataKey businessObjectDataKey,
String s3KeyPrefix,
int expectedStorageFilesCount)
Validates that storage does not have any other registered storage files that start with the specified S3 key prefix, but belong to some other business
object data instances.
|
public List<StorageFileEntity> createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
storageUnitEntity - the storage unit entitystorageFiles - the list of storage filespublic StorageFileEntity getStorageFileEntity(String storageName, String filePath) throws ObjectNotFoundException, IllegalArgumentException
storageName - the storage namefilePath - the file pathObjectNotFoundException - if the storage file doesn't existIllegalArgumentException - if more than one storage file matching the file path exist in the storagepublic StorageFileEntity getStorageFileEntity(StorageUnitEntity storageUnitEntity, String filePath, BusinessObjectDataKey businessObjectDataKey) throws ObjectNotFoundException, IllegalArgumentException
storageUnitEntity - the storage unit entityfilePath - the file pathbusinessObjectDataKey - the business object data keyObjectNotFoundException - if the storage file doesn't existIllegalArgumentException - if more than one storage file matching the file path exist in the storagepublic void validateStorageFilesCount(String storageName, BusinessObjectDataKey businessObjectDataKey, String s3KeyPrefix, int expectedStorageFilesCount)
storageName - the storage namebusinessObjectDataKey - the business object data keys3KeyPrefix - the S3 key prefixexpectedStorageFilesCount - the expected number of storage files that match the specified S3 key prefix in the storageCopyright © 2019. All rights reserved.