added possibility to use different bucket for vre folder

This commit is contained in:
lucio 2023-06-01 18:59:56 +02:00
parent aacaeea5da
commit b8b4c9bc23
3 changed files with 12 additions and 1 deletions

View File

@ -53,6 +53,10 @@ public class VREFolderManager {
groupClient.createGroup(vreTitle, accessType, folderOwner); groupClient.createGroup(vreTitle, accessType, folderOwner);
} }
public void createVRE(AccessType accessType, String folderOwner, boolean useDefaultStorage) throws StorageHubException{
groupClient.createGroup(vreTitle, accessType, folderOwner, useDefaultStorage);
}
public void removeVRE() throws StorageHubException{ public void removeVRE() throws StorageHubException{
groupClient.removeGroup(vreTitle); groupClient.removeGroup(vreTitle);
} }

View File

@ -160,6 +160,11 @@ public class DefaultGroupManager extends DefaultManagerClient implements GroupMa
@Override @Override
public void createGroup(String groupId, AccessType accessType, String folderOwner) throws StorageHubException { public void createGroup(String groupId, AccessType accessType, String folderOwner) throws StorageHubException {
this.createGroup(groupId, accessType, folderOwner, true);
}
@Override
public void createGroup(String groupId, AccessType accessType, String folderOwner, boolean useDefaultStorage) throws StorageHubException {
Call<GXWebTargetAdapterRequest, Void> call = new Call<GXWebTargetAdapterRequest, Void>() { Call<GXWebTargetAdapterRequest, Void> call = new Call<GXWebTargetAdapterRequest, Void>() {
@Override @Override
public Void call(GXWebTargetAdapterRequest manager) throws Exception { public Void call(GXWebTargetAdapterRequest manager) throws Exception {
@ -169,7 +174,7 @@ public class DefaultGroupManager extends DefaultManagerClient implements GroupMa
multipart.field("accessType", accessType, MediaType.APPLICATION_JSON_TYPE); multipart.field("accessType", accessType, MediaType.APPLICATION_JSON_TYPE);
multipart.field("group", groupId); multipart.field("group", groupId);
multipart.field("folderOwner", folderOwner); multipart.field("folderOwner", folderOwner);
multipart.field("useDefaultStorage", Boolean.toString(useDefaultStorage));
GXInboundResponse response = myManager.post(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE)); GXInboundResponse response = myManager.post(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE));

View File

@ -15,6 +15,8 @@ public interface GroupManagerClient extends ManagerClient{
void createGroup(String groupId, AccessType accessType, String folderOwner) throws StorageHubException; void createGroup(String groupId, AccessType accessType, String folderOwner) throws StorageHubException;
void createGroup(String groupId, AccessType accessType, String folderOwner, boolean useDefaultStorage) throws StorageHubException;
List<String> getUsersOfGroup(String groupId) throws StorageHubException; List<String> getUsersOfGroup(String groupId) throws StorageHubException;
List<String> getGroups() throws StorageHubException; List<String> getGroups() throws StorageHubException;