Task #16688

Task #12909: Workspace to StorageHub

Evaluate list of methods to add/migrate from HL to SHUB

Added by Francesco Mangiacrapa 7 months ago. Updated about 1 month ago.

Status:FeedbackStart date:Jul 16, 2019
Priority:NormalDue date:
Assignee:Lucio Lelii% Done:

100%

Category:common
Sprint:Data Storage and Transfer
Milestones:
Duration:

Description

Evaluate which of the following methods have to be migrated from HL to SHUB:

externalFile.removeVersion("version")

workspaceFolder.setPublic("boolean")

gCubeItem.getProperties().addProperty("key", "value");

workspace.getTotalItems();

workspace.getDiskUsage();

List<AccountingEntry> accoutings = workspaceItem.getAccounting();

List<AccountingEntryRead> readers = workspaceItem.getReaders();

workspaceItem.getLastModificationTime();

workspaceItem.getCreationTime();

workspace.getUrlWebDav();

workspace.getHome().listScopes() ???

ExternalUrl ext = workspace.createExternalUrl(name, description, url, parentId);

#### SMART FOLDER?

WorkspaceSmartFolder wsSmartFolder = workspace.getSmartFolder(folderId);

List<? extends SearchItem> searchItems = wsSmartFolder.getSearchItems();

listWorkspaceFolder = workspace.getAllSmartFolders(); // create

WorkspaceSmartFolder wsSmartFolder = workspace.createSmartFolder(name, description, query, parentId);

Some of the above methods may already be implemented in SHUB with a different name/interface to access them.


Subtasks

Task #17226: Workspace and Workspace Tree: migrate HL remaining method...CompletedFrancesco Mangiacrapa


Related issues

Related to gCube - Feature #12499: StorageHub - Support the update of all components New Sep 17, 2018

History

#1 Updated by Giancarlo Panichi 7 months ago

We need to have methods that allow us to add and remove administrators ACL on folder. So, some functions like:

addAdministratorsByFolderId (String itemId, List <String> logins)
removeAdministratorsByFolderId (String itemId, List <String> logins)

In addition, a method is needed that gives the possibility of knowing through SH which groups a user belongs to in order to correctly manage the ACLs.

getUserGroups(login)

ACL example:

{
  "acls": [
    {
      "pricipal": "lucio.lelii",
      "accessTypes": [
        "ADMINISTRATOR"
      ]
    },
    {
      "pricipal": "gcube-devNext-NextNext",
      "accessTypes": [
        "WRITE_OWNER"
      ]
    }
  ]
}

#2 Updated by Giancarlo Panichi 7 months ago

  • Related to Feature #12499: StorageHub - Support the update of all components added

#3 Updated by Lucio Lelii 5 months ago

Francesco Mangiacrapa wrote:

Evaluate which of the following methods have to be migrated from HL to SHUB:

externalFile.removeVersion("version")

workspaceFolder.setPublic("boolean")



--- added in storageHub

gCubeItem.getProperties().addProperty("key", "value");

workspace.getTotalItems();

workspace.getDiskUsage();


List accoutings = workspaceItem.getAccounting();

List readers = workspaceItem.getReaders();

Already in the item bean

workspaceItem.getLastModificationTime();

workspaceItem.getCreationTime();

workspace.getUrlWebDav(); It is needed ?

workspace.getHome().listScopes() ??? Doesn make sense anymore

ExternalUrl ext = workspace.createExternalUrl(name, description, url, parentId);

Smart folder are not used anymore

SMART FOLDER?

WorkspaceSmartFolder wsSmartFolder = workspace.getSmartFolder(folderId);

List<? extends SearchItem> searchItems = wsSmartFolder.getSearchItems();

listWorkspaceFolder = workspace.getAllSmartFolders(); // create

WorkspaceSmartFolder wsSmartFolder = workspace.createSmartFolder(name, description, query, parentId);

Some of the above methods may already be implemented in SHUB with a different name/interface to access them.

#4 Updated by Francesco Mangiacrapa 5 months ago

@lucio.lelii@isti.cnr.it
I'm not able to find some methods (getReaders, getDiskUsage, getTotalItems) by accessing through the dsl API to StorageHubClient.getWSRoot().. is it a wrong way?
I've also forced a maven update...
Have you deployed on nexus the latest methods added to SHUB?

#5 Updated by Lucio Lelii 5 months ago

I am never going to implement workspace.getReaders(), you have to retrieve it from the accounting.
regarding getDiskUsage, getTotalItems probably I didn't deploy the new client

#6 Updated by Lucio Lelii 5 months ago

the new client deployed is 1.0.5-SNAPSHOT

#7 Updated by Francesco Mangiacrapa 4 months ago

  • Status changed from New to In Progress

Hi @lucio.lelii@isti.cnr.it,

the following methods still seem to be missing in SHUB:

[WORKSPACE_FOLDER].setPublic("boolean")
[WORKSPACE_FILE].removeVersion("version")
[WORKSPACE].createExternalUrl(name, description, url, parentId);

Let me know if and when they will be available...

#8 Updated by Francesco Mangiacrapa 4 months ago

  • Status changed from In Progress to Feedback

#9 Updated by Giancarlo Panichi 3 months ago

The changeACL() method must allow an VRE administrator to be able to add and remove another VRE administrator.

org.gcube.common.storagehub.model.exceptions.InvalidCallParameters: acls in vreFolder cannot be changed, only new admin can be set

#10 Updated by Pasquale Pagano 3 months ago

  • Sprint changed from zz - Workspace to StorageHub to Data Storage and Transfer

#11 Updated by Francesco Mangiacrapa about 1 month ago

@g.panichi@isti.cnr.it and/or @lucio.lelii@isti.cnr.it can be this ticket closed?

Also available in: Atom PDF