2021-11-26 17:49:35 +01:00
|
|
|
package org.gcube.data.access.storagehub.storage.backend.impl;
|
|
|
|
|
2021-12-03 16:55:54 +01:00
|
|
|
import javax.inject.Singleton;
|
|
|
|
|
2021-11-26 17:49:35 +01:00
|
|
|
import org.gcube.common.storagehub.model.Constants;
|
|
|
|
import org.gcube.common.storagehub.model.Metadata;
|
|
|
|
import org.gcube.common.storagehub.model.exceptions.InvalidCallParameters;
|
2021-12-03 16:55:54 +01:00
|
|
|
import org.gcube.common.storagehub.model.items.nodes.PayloadBackend;
|
2021-11-26 17:49:35 +01:00
|
|
|
import org.gcube.common.storagehub.model.storages.StorageBackend;
|
|
|
|
import org.gcube.common.storagehub.model.storages.StorageBackendFactory;
|
|
|
|
|
2021-12-03 16:55:54 +01:00
|
|
|
@Singleton
|
2021-11-26 17:49:35 +01:00
|
|
|
public class GCubeMongoStorageBackendFactory implements StorageBackendFactory {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getName() {
|
2021-12-03 16:55:54 +01:00
|
|
|
return Constants.MONGO_STORAGE;
|
2021-11-26 17:49:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2021-12-03 16:55:54 +01:00
|
|
|
public StorageBackend create(PayloadBackend payloadConfiguration) throws InvalidCallParameters {
|
|
|
|
return new GCubeMongoStorageBackend(payloadConfiguration);
|
2021-11-26 17:49:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|