2018-11-20 15:46:18 +01:00
|
|
|
package org.gcube.common.storagehub.model.storages;
|
|
|
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
2021-04-15 20:34:43 +02:00
|
|
|
import org.gcube.common.storagehub.model.items.AbstractFileItem;
|
2021-04-28 16:29:43 +02:00
|
|
|
import org.gcube.common.storagehub.model.items.nodes.Content;
|
2021-04-15 20:34:43 +02:00
|
|
|
|
2018-11-20 15:46:18 +01:00
|
|
|
public interface StorageBackend {
|
|
|
|
|
|
|
|
String getName();
|
|
|
|
|
2021-04-15 20:34:43 +02:00
|
|
|
String onCopy(AbstractFileItem item);
|
2018-11-20 15:46:18 +01:00
|
|
|
|
2021-04-15 20:34:43 +02:00
|
|
|
String onMove(AbstractFileItem item);
|
2018-11-20 15:46:18 +01:00
|
|
|
|
2021-07-26 10:21:54 +02:00
|
|
|
void onDelete(Content id);
|
2018-11-20 15:46:18 +01:00
|
|
|
|
2021-04-28 16:29:43 +02:00
|
|
|
MetaInfo upload(InputStream stream, String relativePath, String name);
|
|
|
|
|
|
|
|
InputStream download(Content item);
|
2018-11-20 15:46:18 +01:00
|
|
|
|
2019-07-17 17:55:12 +02:00
|
|
|
@Deprecated
|
|
|
|
String getTotalSizeStored();
|
|
|
|
@Deprecated
|
|
|
|
String getTotalItemsCount();
|
|
|
|
|
2018-11-20 15:46:18 +01:00
|
|
|
}
|