2018-02-15 18:13:50 +01:00
|
|
|
package org.gcube.common.storagehub.client.proxies;
|
|
|
|
|
2018-03-29 18:19:01 +02:00
|
|
|
import java.io.InputStream;
|
2021-10-15 19:53:14 +02:00
|
|
|
import java.net.URI;
|
2018-06-22 16:27:21 +02:00
|
|
|
import java.net.URL;
|
2018-02-15 18:13:50 +01:00
|
|
|
import java.util.List;
|
2018-06-29 15:03:05 +02:00
|
|
|
import java.util.Set;
|
2018-02-15 18:13:50 +01:00
|
|
|
|
|
|
|
import org.gcube.common.storagehub.client.StreamDescriptor;
|
2018-10-15 15:39:02 +02:00
|
|
|
import org.gcube.common.storagehub.model.Metadata;
|
2018-05-25 18:05:44 +02:00
|
|
|
import org.gcube.common.storagehub.model.acls.ACL;
|
2018-06-29 15:03:05 +02:00
|
|
|
import org.gcube.common.storagehub.model.acls.AccessType;
|
2019-03-13 18:33:58 +01:00
|
|
|
import org.gcube.common.storagehub.model.exceptions.StorageHubException;
|
2018-10-15 16:43:53 +02:00
|
|
|
import org.gcube.common.storagehub.model.items.GCubeItem;
|
2018-02-15 18:13:50 +01:00
|
|
|
import org.gcube.common.storagehub.model.items.Item;
|
2018-10-11 18:36:21 +02:00
|
|
|
import org.gcube.common.storagehub.model.service.Version;
|
2018-02-15 18:13:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface ItemManagerClient {
|
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> getChildren(String id, boolean includeHidden, String ... excludeNodes) throws StorageHubException;
|
2018-03-07 18:45:58 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> getChildren(String id, Class<? extends Item> onlyOfType, boolean includeHidden, String ... excludeNodes) throws StorageHubException;
|
2018-09-26 15:24:21 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> getChildren(String id, int start, int limit, boolean includeHidden, Class<? extends Item> onlyOfType, String ... excludeNodes) throws StorageHubException;
|
2018-09-26 15:24:21 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> getChildren(String id, int start, int limit, boolean includeHidden, String ... excludeNodes) throws StorageHubException;
|
2018-03-14 16:21:13 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> getAnchestors(String id, String ... excludeNodes) throws StorageHubException;
|
2018-05-21 16:38:49 +02:00
|
|
|
|
2020-03-16 16:58:12 +01:00
|
|
|
List<? extends Item> search(String id, Class<? extends Item> onlyOfType, boolean includeHidden, boolean excludeTrashed, String nameToMatch, String ... excludeNodes) throws StorageHubException;
|
2020-01-24 11:56:40 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
Integer childrenCount(String id,boolean includeHidden) throws StorageHubException ;
|
2018-03-14 16:21:13 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
Integer childrenCount(String id, boolean includeHidden, Class<? extends Item> onlyOfType) throws StorageHubException;
|
2018-09-26 15:24:21 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
Item get(String id, String ... excludeNodes) throws StorageHubException;
|
2018-02-15 18:13:50 +01:00
|
|
|
|
2020-03-05 15:19:45 +01:00
|
|
|
Item getByRelativePath(String id, String path, String ... excludeNodes) throws StorageHubException;
|
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
StreamDescriptor download(String id, String... excludeNodes) throws StorageHubException;
|
2018-02-15 18:13:50 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String uploadFile(InputStream stream, String parentId, String fileName, String description) throws StorageHubException;
|
2018-05-23 18:26:06 +02:00
|
|
|
|
2021-10-15 19:53:14 +02:00
|
|
|
String uploadFile(URI uri, String parentId, String fileName, String description) throws StorageHubException;
|
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String createFolder(String parentId, String name, String description, boolean hidden) throws StorageHubException;
|
2018-05-25 18:05:44 +02:00
|
|
|
|
2019-07-29 16:25:52 +02:00
|
|
|
String createURL(String parentId, String name, String description, URL url) throws StorageHubException;
|
|
|
|
|
2018-12-18 16:24:08 +01:00
|
|
|
@Deprecated
|
2019-03-13 18:33:58 +01:00
|
|
|
String createFolder(String parentId, String name, String description) throws StorageHubException;
|
2018-12-18 16:24:08 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<ACL> getACL(String id) throws StorageHubException;
|
2019-05-22 17:12:47 +02:00
|
|
|
|
|
|
|
String changeACL(String id, String user, AccessType accessType) throws StorageHubException;
|
2019-09-11 18:12:46 +02:00
|
|
|
|
2020-01-15 19:10:33 +01:00
|
|
|
String removeAdmin(String id, String user) throws StorageHubException;
|
|
|
|
|
2019-05-22 17:12:47 +02:00
|
|
|
@Deprecated
|
2019-03-13 18:33:58 +01:00
|
|
|
void delete(String id) throws StorageHubException;
|
2018-06-22 16:27:21 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
URL getPublickLink(String id) throws StorageHubException;
|
2019-01-08 12:17:36 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
URL getPublickLink(String id, String version) throws StorageHubException;
|
2018-06-26 15:30:30 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> findChildrenByNamePattern(String id, String name, String ... excludeNodes) throws StorageHubException;
|
2018-06-27 15:36:50 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
Item getRootSharedFolder(String id) throws StorageHubException;
|
2018-06-29 15:03:05 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String shareFolder(String id, Set<String> users, AccessType accessType) throws StorageHubException;
|
2018-09-21 17:57:37 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String copy(String id, String destinationFolderId, String newFilename) throws StorageHubException;
|
2018-07-30 12:38:34 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String uploadArchive(InputStream stream, String parentId, String extractionFolderName) throws StorageHubException;
|
2018-09-07 17:42:04 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String unshareFolder(String id, Set<String> users) throws StorageHubException;
|
2018-09-26 15:24:21 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String move(String id, String destinationFolderId) throws StorageHubException;
|
2018-10-04 16:53:47 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String rename(String id, String newName) throws StorageHubException;
|
2018-10-04 17:41:01 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
List<Version> getFileVersions(String id) throws StorageHubException;
|
2018-10-12 13:02:35 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
StreamDescriptor downloadSpecificVersion(String id, String version) throws StorageHubException;
|
2018-03-29 18:19:01 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String setMetadata(String id,Metadata metadata) throws StorageHubException;
|
2020-03-16 16:58:12 +01:00
|
|
|
|
|
|
|
String setHidden(String id,Boolean value) throws StorageHubException;
|
2020-09-16 11:03:06 +02:00
|
|
|
|
|
|
|
String setDescription(String id,String description) throws StorageHubException;
|
2018-10-15 16:43:53 +02:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
String createGcubeItem(String parentId, GCubeItem item) throws StorageHubException;
|
2018-12-11 17:58:49 +01:00
|
|
|
|
2019-03-13 18:33:58 +01:00
|
|
|
StreamDescriptor resolvePublicLink(String identifier) throws StorageHubException;
|
2019-01-03 12:16:53 +01:00
|
|
|
|
|
|
|
@Deprecated
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> getChildren(String id, Class<? extends Item> onlyOfType, String... excludeNodes) throws StorageHubException;
|
2019-01-03 12:16:53 +01:00
|
|
|
|
|
|
|
@Deprecated
|
2019-03-13 18:33:58 +01:00
|
|
|
List<? extends Item> getChildren(String id, String ... excludeNodes) throws StorageHubException;
|
2019-01-03 12:16:53 +01:00
|
|
|
|
|
|
|
@Deprecated
|
2019-03-13 18:33:58 +01:00
|
|
|
Integer childrenCount(String id, Class<? extends Item> onlyOfType) throws StorageHubException;
|
2019-01-03 12:16:53 +01:00
|
|
|
|
|
|
|
@Deprecated
|
2019-03-13 18:33:58 +01:00
|
|
|
Integer childrenCount(String id) throws StorageHubException;
|
2019-01-08 12:17:36 +01:00
|
|
|
|
2019-05-22 17:12:47 +02:00
|
|
|
void delete(String id, boolean force) throws StorageHubException;
|
|
|
|
|
2019-06-05 18:10:28 +02:00
|
|
|
boolean canWriteInto(String id) throws StorageHubException;
|
|
|
|
|
2019-09-09 16:29:40 +02:00
|
|
|
String setPublic(String id, boolean publish) throws StorageHubException;
|
2018-10-15 15:39:02 +02:00
|
|
|
|
2018-02-15 18:13:50 +01:00
|
|
|
}
|