changed class

This commit is contained in:
lucio 2024-08-16 15:02:47 +02:00
parent 4fd099c7cf
commit 4955cdcad6
1 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,7 @@ import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.context.application.ApplicationContext;
@Singleton
public class GcubeMinIOStorageBackendFactory implements StorageBackendFactory {
public class GcubeS3StorageBackendFactory implements StorageBackendFactory {
private static final String PROP_PREFIX = "default.";
@ -34,7 +34,7 @@ public class GcubeMinIOStorageBackendFactory implements StorageBackendFactory {
@Override
public String getName() {
return "gcube-minio";
return "gcube-s3";
}
@Override
@ -53,7 +53,10 @@ public class GcubeMinIOStorageBackendFactory implements StorageBackendFactory {
Metadata metadata = new Metadata(new HashMap<>(baseParameters.getMap()));
metadata.getMap().putAll(payloadConfiguration.getParameters());
return new S3Backend(new PayloadBackend(getName(), metadata), (String) -> UUID.randomUUID().toString());
S3Backend backend = new S3Backend(new PayloadBackend(getName(), metadata), (String) -> UUID.randomUUID().toString());
//Setting this only to show only the bucket name and not all the information on the item since it uses the default configuration
backend.setPayloadConfiguration(new PayloadBackend(getName(), new Metadata(payloadConfiguration.getParameters())));
return backend;
}
private Metadata getParameters(){