This commit is contained in:
Lucio Lelii 2019-09-19 15:14:21 +00:00
parent 76bd21e063
commit cdb53b2bf6
4 changed files with 12 additions and 9 deletions

View File

@ -145,6 +145,8 @@ public class FolderContainer extends ItemContainer<FolderItem>{
return itemclient.getACL(this.itemId);
}
/**
*
* changes {@ACL} of the {FolderItem} represented by this FolderContainer for a user
@ -153,10 +155,10 @@ public class FolderContainer extends ItemContainer<FolderItem>{
* @throws {@InvalidItemException}
* @throws {@UserNotAuthorizedException} if user is not administrator of this folder
*/
public FolderContainer changeAcls(String user, AccessType accessType) throws StorageHubException {
/*public FolderContainer changeAcls(String user, AccessType accessType) throws StorageHubException {
itemclient.changeACL(this.itemId, user, accessType);
return this;
}
}*/
public boolean canWrite() throws Exception {
return itemclient.canWriteInto(this.itemId);

View File

@ -1006,7 +1006,7 @@ public class DefaultItemManager implements ItemManagerClient {
}
/*
@Override
public String removeSharedFolderAdmin(String id, String user) throws StorageHubException {
Call<GXWebTargetAdapterRequest, String> call = new Call<GXWebTargetAdapterRequest, String>() {
@ -1040,7 +1040,7 @@ public class DefaultItemManager implements ItemManagerClient {
}catch(Exception e1) {
throw new RuntimeException(e1);
}
}
}*/
@Override

View File

@ -49,7 +49,9 @@ public interface ItemManagerClient {
String changeACL(String id, String user, AccessType accessType) throws StorageHubException;
/*
String removeSharedFolderAdmin(String id, String user) throws StorageHubException;
*/
@Deprecated
void delete(String id) throws StorageHubException;

View File

@ -30,8 +30,8 @@ public class Items {
@BeforeClass
public static void setUp(){
SecurityTokenProvider.instance.set("257800d8-24bf-4bae-83cd-ea99369e7dd6-843339462");
ScopeProvider.instance.set("/d4science.research-infrastructures.eu");
SecurityTokenProvider.instance.set("b7c80297-e4ed-42ab-ab42-fdc0b8b0eabf-98187548");
ScopeProvider.instance.set("/gcube");
}
@ -59,8 +59,7 @@ public class Items {
StorageHubClient shc = new StorageHubClient();
shc.open("2ca7e04a-b461-4098-a8b9-a31ddb691a2d").asFolder().changeAcls("giancarlo.panichi", AccessType.READ_ONLY);
System.out.println(shc.open("65e502ff-92ef-46cc-afbd-3e91f4b680be").asFolder().canWrite());
}