2018-06-27 12:29:21 +02:00
|
|
|
package eu.eudat.logic.services.operations;
|
2018-03-05 17:18:45 +01:00
|
|
|
|
2018-07-11 15:47:36 +02:00
|
|
|
import eu.eudat.elastic.repository.DatasetRepository;
|
2020-04-01 17:16:06 +02:00
|
|
|
import eu.eudat.elastic.repository.DmpRepository;
|
2018-06-27 12:29:21 +02:00
|
|
|
import eu.eudat.logic.builders.BuilderFactory;
|
|
|
|
import eu.eudat.logic.proxy.fetching.RemoteFetcher;
|
2018-03-05 17:18:45 +01:00
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by ikalyvas on 3/1/2018.
|
|
|
|
*/
|
|
|
|
@Service("operationsContext")
|
|
|
|
public class OperationsContextImpl implements OperationsContext {
|
|
|
|
|
2020-04-01 17:16:06 +02:00
|
|
|
private final DatabaseRepository databaseRepository;
|
|
|
|
private final ApplicationContext applicationContext;
|
|
|
|
private final RemoteFetcher remoteFetcher;
|
|
|
|
private final BuilderFactory builderFactory;
|
2020-05-29 10:57:21 +02:00
|
|
|
// private final FileStorageService fileStorageService;
|
2020-04-01 17:16:06 +02:00
|
|
|
private final ElasticRepository elasticRepository;
|
2018-03-05 17:18:45 +01:00
|
|
|
|
|
|
|
@Autowired
|
2018-03-19 13:40:04 +01:00
|
|
|
public OperationsContextImpl(DatabaseRepository databaseRepository, ApplicationContext applicationContext, RemoteFetcher remoteFetcher
|
2020-05-29 10:57:21 +02:00
|
|
|
, BuilderFactory builderFactory, /*FileStorageService fileStorageService,*/ ElasticRepository elasticRepository) {
|
2018-03-05 17:18:45 +01:00
|
|
|
this.databaseRepository = databaseRepository;
|
|
|
|
this.applicationContext = applicationContext;
|
|
|
|
this.remoteFetcher = remoteFetcher;
|
|
|
|
this.builderFactory = builderFactory;
|
2020-05-29 10:57:21 +02:00
|
|
|
// this.fileStorageService = fileStorageService;
|
2020-04-01 17:16:06 +02:00
|
|
|
this.elasticRepository = elasticRepository;
|
2018-03-05 17:18:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public DatabaseRepository getDatabaseRepository() {
|
|
|
|
return databaseRepository;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ApplicationContext getApplicationContext() {
|
|
|
|
return applicationContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public RemoteFetcher getRemoteFetcher() {
|
|
|
|
return remoteFetcher;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public BuilderFactory getBuilderFactory() {
|
|
|
|
return builderFactory;
|
|
|
|
}
|
|
|
|
|
2020-05-29 10:57:21 +02:00
|
|
|
// @Override
|
|
|
|
// public FileStorageService getFileStorageService() {
|
|
|
|
// return fileStorageService;
|
|
|
|
// }
|
2018-07-11 15:47:36 +02:00
|
|
|
|
|
|
|
@Override
|
2020-04-01 17:16:06 +02:00
|
|
|
public ElasticRepository getElasticRepository() {
|
|
|
|
return elasticRepository;
|
2018-07-11 15:47:36 +02:00
|
|
|
}
|
2018-03-05 17:18:45 +01:00
|
|
|
}
|