1
|
package eu.dnetlib.msro.workflows.nodes.mdstore;
|
2
|
|
3
|
import org.apache.commons.logging.Log;
|
4
|
import org.apache.commons.logging.LogFactory;
|
5
|
import org.springframework.beans.factory.annotation.Autowired;
|
6
|
import org.springframework.context.annotation.Scope;
|
7
|
import org.springframework.stereotype.Component;
|
8
|
|
9
|
import eu.dnetlib.data.mdstore.MDStoreService;
|
10
|
import eu.dnetlib.msro.annotations.ProcessNode;
|
11
|
import eu.dnetlib.msro.workflows.Arc;
|
12
|
import eu.dnetlib.msro.workflows.nodes.SimpleParallelProcessNode;
|
13
|
|
14
|
@Component
|
15
|
@Scope("prototype")
|
16
|
@ProcessNode("DeleteMDStore")
|
17
|
public class DeleteMDStoreJobNode extends SimpleParallelProcessNode {
|
18
|
|
19
|
private static final Log log = LogFactory.getLog(DeleteMDStoreJobNode.class);
|
20
|
|
21
|
@Autowired
|
22
|
private MDStoreService mdstoreService;
|
23
|
|
24
|
private String mdId;
|
25
|
|
26
|
@Override
|
27
|
protected String execute() throws Exception {
|
28
|
mdstoreService.delete(mdId);
|
29
|
log.info("Mdstore deleted: " + mdId);
|
30
|
return Arc.DEFAULT_ARC;
|
31
|
}
|
32
|
|
33
|
public String getMdId() {
|
34
|
return mdId;
|
35
|
}
|
36
|
|
37
|
public void setMdId(final String mdId) {
|
38
|
this.mdId = mdId;
|
39
|
}
|
40
|
}
|