Revision 53534
Added by Michele Artini almost 6 years ago
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/consistency/FindInvalidRepoProfilesJobNode.java | ||
---|---|---|
14 | 14 |
import com.googlecode.sarasvati.Arc; |
15 | 15 |
import com.googlecode.sarasvati.NodeToken; |
16 | 16 |
|
17 |
import eu.dnetlib.enabling.datasources.LocalOpenaireDatasourceManagerImpl; |
|
17 |
import eu.dnetlib.enabling.datasources.DatasourceManagerClients; |
|
18 |
import eu.dnetlib.enabling.datasources.LocalOpenaireDatasourceManager; |
|
18 | 19 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
19 | 20 |
import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; |
20 | 21 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
... | ... | |
26 | 27 |
public class FindInvalidRepoProfilesJobNode extends SimpleJobNode implements ProgressJobNode { |
27 | 28 |
|
28 | 29 |
@Autowired |
29 |
private LocalOpenaireDatasourceManagerImpl dsManager;
|
|
30 |
private LocalOpenaireDatasourceManager dsManager; |
|
30 | 31 |
|
31 | 32 |
@Autowired |
33 |
private DatasourceManagerClients dsManagerClient; |
|
34 |
|
|
35 |
@Autowired |
|
32 | 36 |
private UniqueServiceLocator serviceLocator; |
33 | 37 |
|
34 | 38 |
private int current = 0; |
... | ... | |
42 | 46 |
@Override |
43 | 47 |
protected String execute(final NodeToken token) throws Exception { |
44 | 48 |
|
45 |
final Map<String, AtomicInteger> validIds = dsManager.getDatasourceManagerClients() |
|
46 |
.searchSQL("SELECT id FROM dsm_datasources", new HashMap<>()) |
|
49 |
final Map<String, AtomicInteger> validIds = dsManagerClient.searchSQL("SELECT id FROM dsm_datasources", new HashMap<>()) |
|
47 | 50 |
.stream() |
48 | 51 |
.map(m -> (String) m.get("id")) |
49 | 52 |
.collect(Collectors.toMap(s -> s, s -> new AtomicInteger(0))); |
Also available in: Unified diff