Feature #11376

Workspace Explorer Portlet: use StorageHub service as backend

Added by Massimiliano Assante almost 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:Mar 06, 2018
Priority:HighDue date:
Assignee:Massimiliano Assante% Done:

100%

Category:-
Sprint:zz - Unsprintable
Milestones:
Duration:

Description

@lucio.lelii@isti.cnr.it please provide the needed maven coordinates and an example of listing the children of the root of a given user.

History

#1 Updated by Massimiliano Assante almost 2 years ago

  • Priority changed from Normal to High

#4 Updated by Massimiliano Assante almost 2 years ago

  • Status changed from New to In Progress

#5 Updated by Massimiliano Assante almost 2 years ago

  • % Done changed from 0 to 80

#6 Updated by Massimiliano Assante almost 2 years ago

@lucio.lelii@isti.cnr.it can you provide a code snippet for exploiting the getItems by range? Thanks

#7 Updated by Lucio Lelii almost 2 years ago

The same as in the previous method but with start index and limit (the number of element requested)

ItemManagerClient client = AbstractPlugin.item().build();
client.childrenCount("07cd8d55-a35b-4445-9680-c98f158c55de")
List<Item> items = client.getChildren(parentId, start, limit,  excludes);

WorkspaceManagerClient client = AbstractPlugin.workspace().build();
client.childrenCount();
List<Item> items = client.getWorkspace(start, limit, excludes);

#8 Updated by Massimiliano Assante almost 2 years ago

  • % Done changed from 80 to 100

#10 Updated by Massimiliano Assante almost 2 years ago

Also, was wondering whether would make sense to "adopt" some "well known" interfaces for the API such as the one of Dropbox (https://www.dropbox.com/developers/documentation/java) or Google Drive (https://developers.google.com/api-client-library/java/google-api-java-client/dev-guide)

Here an example of the DropBox Java client (DbxClientV2) listing the root items follows:

        DbxClientV2 client = new DbxClientV2(config, ACCESS_TOKEN);
     // Get files and folder metadata from Dropbox root directory
        ListFolderResult result = client.files().listFolder("");
        while (true) {
            for (Metadata metadata : result.getEntries()) {
                System.out.println(metadata.getPathLower());
            }

            if (!result.getHasMore()) {
                break;
            }

            result = client.files().listFolderContinue(result.getCursor());
        }

        // Upload "test.txt" to Dropbox
        try (InputStream in = new FileInputStream("test.txt")) {
            FileMetadata metadata = client.files().uploadBuilder("/test.txt")
                .uploadAndFinish(in);
        }

#11 Updated by Lucio Lelii almost 2 years ago

regarding the last comment, a DSL can be implemented on top of the actual client library but is not the priority now.

I agree on point 2 and I'm going to change it.

For the point 1 I don't agree with you, the service must return everything, you have to decide to exclude something.

#12 Updated by Massimiliano Assante almost 2 years ago

  • Related to Release #11440: org.gcube.portal.google-login-hook.1-3-0 added

#13 Updated by Massimiliano Assante almost 2 years ago

  • Related to deleted (Release #11440: org.gcube.portal.google-login-hook.1-3-0)

#14 Updated by Massimiliano Assante almost 2 years ago

  • Status changed from In Progress to Closed

I consider this task completed. We now have the proof of concept working and is faster than HL. I suggest now to start porting real apps, e.g. WS Folder Links webapp

#15 Updated by Massimiliano Assante almost 2 years ago

I meant workspace-explorer-app, that's the name for the webapp displaying Workspace Folder Links

#16 Updated by Massimiliano Assante almost 2 years ago

In the context of SoBigData there is going to be a workspace widget deployed in the gateway's home or gateway's Exploratories. It is almost ready and , since it uses AJAX and storageHub native pagination it is a good example of the performance we're going to have in the future.

https://next.d4science.org/group/next/storage-hub

Also available in: Atom PDF