Class StorageUtils
- java.lang.Object
-
- org.gcube.application.geoportal.common.utils.StorageUtils
-
public class StorageUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description StorageUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Filedownload(String id, String name)voidexists(String id)voidforceClose()static StringgetUniqueString()StringgetURL(String id)TempFile[]putOntoStorage(File... source)TempFileputOntoStorage(File source, String filename)TempFileputOntoStorage(InputStream source, String filename)TempFileputOntoStorage(String sourcePath, String filename)voidremoveById(String id)
-
-
-
Method Detail
-
forceClose
public void forceClose()
-
putOntoStorage
public TempFile putOntoStorage(InputStream source, String filename) throws org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException, FileNotFoundException
- Throws:
org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendExceptionFileNotFoundException
-
putOntoStorage
public TempFile putOntoStorage(File source, String filename) throws org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException, FileNotFoundException
- Throws:
org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendExceptionFileNotFoundException
-
putOntoStorage
public TempFile[] putOntoStorage(File... source) throws org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException, FileNotFoundException
- Throws:
org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendExceptionFileNotFoundException
-
putOntoStorage
public TempFile putOntoStorage(String sourcePath, String filename) throws org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException, FileNotFoundException
- Throws:
org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendExceptionFileNotFoundException
-
removeById
public void removeById(String id)
-
exists
public void exists(String id)
-
getUniqueString
public static final String getUniqueString()
-
download
public File download(String id, String name) throws IOException, StorageException
- Throws:
IOExceptionStorageException
-
-