Added builder methods

This commit is contained in:
Fabio Sinibaldi 2022-01-31 10:46:14 +01:00
parent 2fc02e6411
commit f9fd75ed3e
1 changed files with 11 additions and 4 deletions

View File

@ -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 {