1
|
package eu.dnetlib.efg.workflows.nodes;
|
2
|
|
3
|
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob;
|
4
|
import eu.dnetlib.msro.workflows.nodes.BlackboardJobNode;
|
5
|
import eu.dnetlib.msro.workflows.procs.Env;
|
6
|
import eu.dnetlib.msro.workflows.procs.Token;
|
7
|
import eu.dnetlib.rmi.data.MDStoreService;
|
8
|
|
9
|
/**
|
10
|
* Created by sandro on 2/22/16.
|
11
|
*/
|
12
|
public class ExecuteMDStorePluginJobNode extends BlackboardJobNode {
|
13
|
|
14
|
private String mdStoreId;
|
15
|
|
16
|
private String pluginName;
|
17
|
|
18
|
public String getPluginName() {
|
19
|
return this.pluginName;
|
20
|
}
|
21
|
|
22
|
public void setPluginName(final String pluginName) {
|
23
|
this.pluginName = pluginName;
|
24
|
}
|
25
|
|
26
|
public String getMdStoreId() {
|
27
|
return this.mdStoreId;
|
28
|
}
|
29
|
|
30
|
public void setMdStoreId(final String mdStoreId) {
|
31
|
this.mdStoreId = mdStoreId;
|
32
|
}
|
33
|
|
34
|
@Override
|
35
|
protected String obtainServiceId(final Env env) {
|
36
|
return getServiceLocator().getServiceId(MDStoreService.class, getMdStoreId());
|
37
|
}
|
38
|
|
39
|
@Override
|
40
|
protected void prepareJob(final BlackboardJob job, final Token token) throws Exception {
|
41
|
|
42
|
job.setAction("RUN_PLUGIN");
|
43
|
job.getParameters().put("plugin.name", getPluginName());
|
44
|
job.getParameters().put("mdStoreId", getMdStoreId());
|
45
|
|
46
|
}
|
47
|
}
|