Search in sources :

Example 6 with DataStorageFolder

use of com.epam.pipeline.entity.datastorage.DataStorageFolder in project cloud-pipeline by epam.

the class S3Helper method parseFolder.

private DataStorageFolder parseFolder(String requestPath, String name) {
    String relativePath = name;
    if (relativePath.endsWith(S3Constants.DELIMITER)) {
        relativePath = relativePath.substring(0, relativePath.length() - 1);
    }
    String folderName = relativePath.substring(requestPath.length());
    DataStorageFolder folder = new DataStorageFolder();
    folder.setName(folderName);
    folder.setPath(relativePath);
    return folder;
}
Also used : DataStorageFolder(com.epam.pipeline.entity.datastorage.DataStorageFolder)

Aggregations

DataStorageFolder (com.epam.pipeline.entity.datastorage.DataStorageFolder)6 DataStorageException (com.epam.pipeline.entity.datastorage.DataStorageException)4 DataStorageFile (com.epam.pipeline.entity.datastorage.DataStorageFile)4 ByteArrayInputStream (java.io.ByteArrayInputStream)3 File (java.io.File)3 IOException (java.io.IOException)3 Date (java.util.Date)3 SdkClientException (com.amazonaws.SdkClientException)2 AmazonS3 (com.amazonaws.services.s3.AmazonS3)2 ObjectMetadata (com.amazonaws.services.s3.model.ObjectMetadata)2 PutObjectRequest (com.amazonaws.services.s3.model.PutObjectRequest)2 AbstractDataStorage (com.epam.pipeline.entity.datastorage.AbstractDataStorage)2 AbstractDataStorageItem (com.epam.pipeline.entity.datastorage.AbstractDataStorageItem)2 DataStorageDownloadFileUrl (com.epam.pipeline.entity.datastorage.DataStorageDownloadFileUrl)2 DataStorageItemContent (com.epam.pipeline.entity.datastorage.DataStorageItemContent)2 DataStorageListing (com.epam.pipeline.entity.datastorage.DataStorageListing)2 DataStorageStreamingContent (com.epam.pipeline.entity.datastorage.DataStorageStreamingContent)2 NFSDataStorage (com.epam.pipeline.entity.datastorage.nfs.NFSDataStorage)2 FileContentUtils (com.epam.pipeline.utils.FileContentUtils)2 InputStream (java.io.InputStream)2