From 9536379efb6475d8ce714eb528d1c64d9b2056fb Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Tue, 31 May 2022 13:37:53 +0200 Subject: [PATCH] Added policy to builder --- .../gcube/application/geoportal/common/utils/FileSets.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/FileSets.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/FileSets.java index 71b9f7c..baff9aa 100644 --- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/FileSets.java +++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/utils/FileSets.java @@ -1,6 +1,7 @@ package org.gcube.application.geoportal.common.utils; import org.bson.Document; +import org.gcube.application.geoportal.common.model.document.access.Access; import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor; import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest; import org.gcube.application.geoportal.common.model.rest.TempFile; @@ -69,6 +70,12 @@ public class FileSets { // default Clash Policy setClashPolicy(RegisterFileSetRequest.ClashOptions.REPLACE_EXISTING); return theRequest;} + + public RequestBuilder setAccess(Access access){ + theRequest.setToSetAccess(access); + return this; + } + }