git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/Common/storagehub-client@181775 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
76bd21e063
commit
cdb53b2bf6
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -49,8 +49,10 @@ 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;
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue