From f9fd75ed3ee22e680a106cd6d6dcfd6675af191d Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Mon, 31 Jan 2022 10:46:14 +0100 Subject: [PATCH] Added builder methods --- .../geoportal/common/utils/FileSets.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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 b7fd726..44773e9 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 @@ -30,13 +30,20 @@ public class FileSets { return this; } - public RequestBuilder setPath(String path){ + public RequestBuilder setFieldPath(String path){ theRequest.setDestinationPath(path); return this; } + public RequestBuilder setFieldDescriptionPath(String path){ + theRequest.setFieldPath(path); + return this; + } - + public RequestBuilder setClashPolicy(RegisterFileSetRequest.ClashOptions path){ + theRequest.setClashOption(path); + return this; + } public RegisterFileSetRequest getTheRequest(){return theRequest;} @@ -44,11 +51,11 @@ public class FileSets { public static RequestBuilder build(String path) { - return new RequestBuilder().setPath(path); + return new RequestBuilder().setFieldPath(path); } public static RequestBuilder build(String path, TempFile...files) { - return new RequestBuilder().setPath(path).add(files); + return new RequestBuilder().setFieldPath(path).add(files); } public static TempFile asTemp(StorageUtils storage,InputStreamDescriptor descriptor) throws RemoteBackendException, FileNotFoundException {