Revision 42621
Added by Sandro La Bruzzo almost 8 years ago
webapps/dnet-efg-container/trunk/pom.xml | ||
---|---|---|
18 | 18 |
<dependency> |
19 | 19 |
<groupId>org.springframework.security</groupId> |
20 | 20 |
<artifactId>spring-security-web</artifactId> |
21 |
<version>4.0.4.RELEASE</version>
|
|
21 |
<version>4.1.0.RELEASE</version>
|
|
22 | 22 |
</dependency> |
23 | 23 |
|
24 | 24 |
<dependency> |
25 | 25 |
<groupId>org.springframework.security</groupId> |
26 | 26 |
<artifactId>spring-security-config</artifactId> |
27 |
<version>4.0.4.RELEASE</version>
|
|
27 |
<version>4.1.0.RELEASE</version>
|
|
28 | 28 |
</dependency> |
29 | 29 |
|
30 | 30 |
|
modules/dnet-core-services/trunk/src/main/java/eu/dnetlib/enabling/hcm/sn/HCMSubscriberImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.hcm.sn; |
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 |
|
|
5 | 4 |
import javax.annotation.PostConstruct; |
6 |
import javax.annotation.Resource; |
|
7 | 5 |
|
6 |
import eu.dnetlib.enabling.actions.SubscriptionAction; |
|
7 |
import eu.dnetlib.enabling.hcm.HostingContextManagerServiceImpl; |
|
8 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
8 | 9 |
import org.apache.commons.logging.Log; |
9 | 10 |
import org.apache.commons.logging.LogFactory; |
10 | 11 |
import org.springframework.beans.factory.annotation.Autowired; |
11 | 12 |
import org.springframework.beans.factory.annotation.Required; |
12 | 13 |
|
13 |
import eu.dnetlib.enabling.actions.SubscriptionAction; |
|
14 |
import eu.dnetlib.enabling.hcm.HostingContextManagerServiceImpl; |
|
15 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
16 |
|
|
17 | 14 |
/** |
18 | 15 |
* This component takes care of subscribing the SubscriptionAction(s) to interesting events. |
19 | 16 |
* |
... | ... | |
30 | 27 |
/** |
31 | 28 |
* service locator. |
32 | 29 |
*/ |
33 |
@Resource
|
|
30 |
@Autowired
|
|
34 | 31 |
private UniqueServiceLocator serviceLocator; |
35 | 32 |
|
36 | 33 |
/** |
modules/dnet-core-services/trunk/src/main/java/eu/dnetlib/enabling/resultset/ResultSetController.java | ||
---|---|---|
3 | 3 |
import java.util.ArrayList; |
4 | 4 |
import java.util.List; |
5 | 5 |
|
6 |
import javax.annotation.Resource; |
|
7 |
|
|
6 |
import com.google.gson.Gson; |
|
7 |
import eu.dnetlib.enabling.resultset.listener.ResultSetListener; |
|
8 |
import eu.dnetlib.enabling.resultset.registry.ResultSetRegistry; |
|
9 |
import eu.dnetlib.rmi.common.ResultSetException; |
|
10 |
import org.springframework.beans.factory.annotation.Autowired; |
|
8 | 11 |
import org.springframework.stereotype.Controller; |
9 | 12 |
import org.springframework.web.bind.annotation.PathVariable; |
10 | 13 |
import org.springframework.web.bind.annotation.RequestMapping; |
11 | 14 |
import org.springframework.web.bind.annotation.RequestMethod; |
12 | 15 |
import org.springframework.web.bind.annotation.ResponseBody; |
13 | 16 |
|
14 |
import com.google.gson.Gson; |
|
15 |
|
|
16 |
import eu.dnetlib.enabling.resultset.listener.ResultSetListener; |
|
17 |
import eu.dnetlib.enabling.resultset.registry.ResultSetRegistry; |
|
18 |
import eu.dnetlib.rmi.common.ResultSetException; |
|
19 |
|
|
20 | 17 |
@Controller |
21 | 18 |
public class ResultSetController { |
22 | 19 |
|
23 |
@Resource
|
|
20 |
@Autowired
|
|
24 | 21 |
private ResultSetRegistry resultSetRegistry; |
25 | 22 |
|
26 | 23 |
@RequestMapping(value = "/rs/{rsId}/next/{n}", method = RequestMethod.GET) |
modules/dnet-core-services/trunk/src/main/java/eu/dnetlib/enabling/datasources/DatasourceManagerServiceImpl.java | ||
---|---|---|
4 | 4 |
import java.text.ParseException; |
5 | 5 |
import java.util.*; |
6 | 6 |
import java.util.stream.Collectors; |
7 |
import javax.annotation.Resource; |
|
8 | 7 |
|
9 | 8 |
import com.google.common.collect.Sets; |
10 | 9 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
... | ... | |
23 | 22 |
import org.dom4j.Node; |
24 | 23 |
import org.dom4j.io.SAXReader; |
25 | 24 |
import org.quartz.CronExpression; |
25 |
import org.springframework.beans.factory.annotation.Autowired; |
|
26 | 26 |
import org.springframework.beans.factory.annotation.Required; |
27 | 27 |
import org.springframework.core.io.ClassPathResource; |
28 | 28 |
|
... | ... | |
41 | 41 |
private ClassPathResource findReposMapQuery = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/findReposMap.xquery"); |
42 | 42 |
private ClassPathResource simpleFindReposQueryTmpl = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/simpleFindRepos.xquery.st"); |
43 | 43 |
|
44 |
@Resource
|
|
44 |
@Autowired
|
|
45 | 45 |
private UniqueServiceLocator serviceLocator; |
46 | 46 |
|
47 | 47 |
private String fixDsId(final String dsId) throws DatasourceManagerServiceException { |
modules/dnet-data-services/trunk/src/test/java/eu/dnetlib/enabling/tools/blackboard/BlackboardServerActionExecutorTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.tools.blackboard; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 | 3 |
import eu.dnetlib.data.mdstore.modular.action.MDStoreActions; |
6 | 4 |
import org.junit.Before; |
7 | 5 |
import org.junit.Test; |
8 | 6 |
import org.junit.runner.RunWith; |
7 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 | 8 |
import org.springframework.test.context.ContextConfiguration; |
10 | 9 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
11 | 10 |
|
... | ... | |
18 | 17 |
@ContextConfiguration |
19 | 18 |
public class BlackboardServerActionExecutorTest { |
20 | 19 |
|
21 |
@Resource
|
|
20 |
@Autowired
|
|
22 | 21 |
public BlackboardServerHandler blackboardHandler; |
23 | 22 |
|
24 |
@Resource
|
|
23 |
@Autowired
|
|
25 | 24 |
public transient BlackboardServerActionExecutor<MDStoreActions> executor; |
26 | 25 |
|
27 | 26 |
@Before |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/objectstore/DownloadServiceFeeder.java | ||
---|---|---|
6 | 6 |
import java.util.concurrent.Executors; |
7 | 7 |
import java.util.concurrent.Future; |
8 | 8 |
import java.util.function.Function; |
9 |
import javax.annotation.Resource; |
|
10 | 9 |
|
11 | 10 |
import com.google.common.base.Joiner; |
12 | 11 |
import com.google.common.collect.Lists; |
... | ... | |
37 | 36 |
/** |
38 | 37 |
* The download plugin enumerator. |
39 | 38 |
*/ |
40 |
@Resource
|
|
39 |
@Autowired
|
|
41 | 40 |
DownloadPluginEnumeratorImpl downloadPluginEnumerator; |
42 | 41 |
|
43 | 42 |
/** |
44 | 43 |
* The result set client factory. |
45 | 44 |
*/ |
46 |
@Resource
|
|
45 |
@Autowired
|
|
47 | 46 |
private ResultSetClient resultSetClient; |
48 | 47 |
|
49 | 48 |
/** |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/objectstore/DownloadIntoObjectStoreAction.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.data.objectstore; |
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 |
import javax.annotation.Resource; |
|
5 | 4 |
|
6 | 5 |
import com.google.gson.Gson; |
7 | 6 |
import com.google.gson.reflect.TypeToken; |
... | ... | |
13 | 12 |
import org.apache.commons.lang3.StringUtils; |
14 | 13 |
import org.apache.commons.logging.Log; |
15 | 14 |
import org.apache.commons.logging.LogFactory; |
15 |
import org.springframework.beans.factory.annotation.Autowired; |
|
16 | 16 |
|
17 | 17 |
/** |
18 | 18 |
* Created by sandro on 4/6/16. |
... | ... | |
24 | 24 |
private static final Log log = LogFactory.getLog(DownloadIntoObjectStoreAction.class); |
25 | 25 |
private static String DEFAULT_NUMBER_OF_THREAD = "5"; |
26 | 26 |
private static int DEFAULT_TIMEOUT_MS = 5000; |
27 |
@Resource
|
|
27 |
@Autowired
|
|
28 | 28 |
private DownloadServiceFeeder downloadServiceFeeder; |
29 | 29 |
|
30 | 30 |
@Override |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/objectstore/ModularObjectStoreRESTService.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.IOException; |
4 | 4 |
import java.io.InputStream; |
5 |
import javax.annotation.Resource; |
|
6 | 5 |
import javax.servlet.ServletOutputStream; |
7 | 6 |
import javax.servlet.http.HttpServletResponse; |
8 | 7 |
|
... | ... | |
12 | 11 |
import org.apache.commons.io.IOUtils; |
13 | 12 |
import org.apache.commons.logging.Log; |
14 | 13 |
import org.apache.commons.logging.LogFactory; |
14 |
import org.springframework.beans.factory.annotation.Autowired; |
|
15 | 15 |
import org.springframework.stereotype.Controller; |
16 | 16 |
import org.springframework.web.bind.annotation.RequestMapping; |
17 | 17 |
import org.springframework.web.bind.annotation.RequestParam; |
... | ... | |
28 | 28 |
/** |
29 | 29 |
* The object store deliver. |
30 | 30 |
*/ |
31 |
@Resource
|
|
31 |
@Autowired
|
|
32 | 32 |
ModularObjectStoreDeliver objectStoreDeliver; |
33 | 33 |
|
34 | 34 |
/** |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/collector/CollectorServiceImpl.java | ||
---|---|---|
5 | 5 |
import java.util.Map; |
6 | 6 |
import java.util.Set; |
7 | 7 |
import java.util.stream.Collectors; |
8 |
import javax.annotation.Resource; |
|
9 | 8 |
|
10 | 9 |
import com.google.common.collect.Sets; |
11 | 10 |
import eu.dnetlib.enabling.resultset.factory.ResultSetFactory; |
... | ... | |
17 | 16 |
|
18 | 17 |
public class CollectorServiceImpl extends AbstractBaseService implements CollectorService { |
19 | 18 |
|
20 |
@Resource
|
|
19 |
@Autowired
|
|
21 | 20 |
private CollectorPluginEnumerator collectorPluginEnumerator; |
22 | 21 |
|
23 | 22 |
@Autowired |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/transformation/service/TransformationServiceImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.data.transformation.service; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 | 3 |
import eu.dnetlib.enabling.resultset.factory.ResultSetFactory; |
6 | 4 |
import eu.dnetlib.enabling.tools.AbstractBaseService; |
7 | 5 |
import eu.dnetlib.rmi.common.ResultSet; |
... | ... | |
19 | 17 |
private static final Log log = LogFactory.getLog(TransformationServiceImpl.class); |
20 | 18 |
@Autowired |
21 | 19 |
private ResultSetFactory resultSetFactory; |
22 |
@Resource
|
|
20 |
@Autowired
|
|
23 | 21 |
private DataTransformerFactory dataTransformerFactory; |
24 | 22 |
|
25 | 23 |
@Override |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/transformation/inspector/DataTransformationController.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.data.transformation.inspector; |
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 |
import javax.annotation.Resource; |
|
5 | 4 |
|
6 | 5 |
import com.google.common.base.Function; |
7 | 6 |
import com.google.common.collect.Lists; |
... | ... | |
11 | 10 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
12 | 11 |
import eu.dnetlib.rmi.enabling.ISLookUpException; |
13 | 12 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
14 | 14 |
import org.springframework.stereotype.Controller; |
15 | 15 |
import org.springframework.ui.Model; |
16 | 16 |
import org.springframework.web.bind.annotation.RequestMapping; |
... | ... | |
19 | 19 |
@Controller |
20 | 20 |
public class DataTransformationController extends AbstractInspectorController { |
21 | 21 |
|
22 |
@Resource
|
|
22 |
@Autowired
|
|
23 | 23 |
private DataTransformerFactory dataTransformerFactory; |
24 | 24 |
|
25 |
@Resource
|
|
25 |
@Autowired
|
|
26 | 26 |
private UniqueServiceLocator serviceLocator; |
27 | 27 |
|
28 | 28 |
@RequestMapping(value = "/inspector/transform.do") |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/cleaner/inspector/CleanerInspector.java | ||
---|---|---|
3 | 3 |
import java.util.List; |
4 | 4 |
import java.util.stream.Collectors; |
5 | 5 |
|
6 |
import javax.annotation.Resource; |
|
7 |
|
|
8 |
import org.springframework.stereotype.Controller; |
|
9 |
import org.springframework.ui.Model; |
|
10 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
11 |
import org.springframework.web.bind.annotation.RequestParam; |
|
12 |
|
|
13 | 6 |
import com.google.common.collect.Lists; |
14 |
|
|
15 | 7 |
import eu.dnetlib.data.cleaner.CleaningRule; |
16 | 8 |
import eu.dnetlib.data.cleaner.CleaningRuleFactory; |
17 | 9 |
import eu.dnetlib.enabling.inspector.AbstractInspectorController; |
18 | 10 |
import eu.dnetlib.rmi.data.CleanerException; |
11 |
import org.springframework.beans.factory.annotation.Autowired; |
|
12 |
import org.springframework.stereotype.Controller; |
|
13 |
import org.springframework.ui.Model; |
|
14 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
15 |
import org.springframework.web.bind.annotation.RequestParam; |
|
19 | 16 |
|
20 | 17 |
@Controller |
21 | 18 |
public class CleanerInspector extends AbstractInspectorController { |
22 | 19 |
|
23 |
@Resource
|
|
20 |
@Autowired
|
|
24 | 21 |
private CleaningRuleFactory cleaningRuleFactory; |
25 | 22 |
|
26 |
public static class SelectOption { |
|
27 |
|
|
28 |
private String value; |
|
29 |
private boolean selected; |
|
30 |
|
|
31 |
public SelectOption(final String value, final boolean selected) { |
|
32 |
super(); |
|
33 |
this.value = value; |
|
34 |
this.selected = selected; |
|
35 |
} |
|
36 |
|
|
37 |
public String getValue() { |
|
38 |
return this.value; |
|
39 |
} |
|
40 |
|
|
41 |
public void setValue(final String value) { |
|
42 |
this.value = value; |
|
43 |
} |
|
44 |
|
|
45 |
public boolean isSelected() { |
|
46 |
return this.selected; |
|
47 |
} |
|
48 |
|
|
49 |
public void setSelected(final boolean selected) { |
|
50 |
this.selected = selected; |
|
51 |
} |
|
52 |
} |
|
53 |
|
|
54 | 23 |
@RequestMapping(value = "/inspector/cleaner.do") |
55 | 24 |
public void cleaner(final Model model, |
56 | 25 |
@RequestParam(value = "rule", required = false) final String ruleId, |
... | ... | |
82 | 51 |
.collect(Collectors.toList()); |
83 | 52 |
} |
84 | 53 |
|
54 |
public static class SelectOption { |
|
55 |
|
|
56 |
private String value; |
|
57 |
private boolean selected; |
|
58 |
|
|
59 |
public SelectOption(final String value, final boolean selected) { |
|
60 |
super(); |
|
61 |
this.value = value; |
|
62 |
this.selected = selected; |
|
63 |
} |
|
64 |
|
|
65 |
public String getValue() { |
|
66 |
return this.value; |
|
67 |
} |
|
68 |
|
|
69 |
public void setValue(final String value) { |
|
70 |
this.value = value; |
|
71 |
} |
|
72 |
|
|
73 |
public boolean isSelected() { |
|
74 |
return this.selected; |
|
75 |
} |
|
76 |
|
|
77 |
public void setSelected(final boolean selected) { |
|
78 |
this.selected = selected; |
|
79 |
} |
|
80 |
} |
|
81 |
|
|
85 | 82 |
} |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/collective/transformation/VocabularyRegistry.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.data.collective.transformation; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 | 3 |
import eu.dnetlib.data.collective.transformation.engine.functions.DateVocabulary; |
6 | 4 |
import eu.dnetlib.data.collective.transformation.engine.functions.IVocabulary; |
7 | 5 |
import eu.dnetlib.data.collective.transformation.engine.functions.PersonVocabulary; |
... | ... | |
12 | 10 |
import org.apache.commons.logging.Log; |
13 | 11 |
import org.apache.commons.logging.LogFactory; |
14 | 12 |
import org.dom4j.DocumentException; |
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
15 | 14 |
|
16 | 15 |
/** |
17 | 16 |
* @author jochen |
... | ... | |
23 | 22 |
// private static final String pmcVocabularyName = "PMC"; |
24 | 23 |
private static final String personVocabularyName = "Person"; |
25 | 24 |
|
26 |
@Resource
|
|
25 |
@Autowired
|
|
27 | 26 |
private DefaultUniqueServiceLocator uniqueServiceLocator; |
28 | 27 |
private VocabularyMap vocabularies; |
29 | 28 |
private boolean isInitialized = false; |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/collective/transformation/engine/functions/Convert.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.LinkedList; |
4 | 4 |
import java.util.List; |
5 |
import javax.annotation.Resource; |
|
6 | 5 |
|
7 | 6 |
import eu.dnetlib.data.collective.transformation.VocabularyRegistry; |
7 |
import org.springframework.beans.factory.annotation.Autowired; |
|
8 | 8 |
|
9 | 9 |
/** |
10 | 10 |
* @author jochen |
... | ... | |
16 | 16 |
public static final String paramDefaultPattern = "defaultPattern"; |
17 | 17 |
public static final String paramFunction = "function"; |
18 | 18 |
|
19 |
@Resource
|
|
19 |
@Autowired
|
|
20 | 20 |
private VocabularyRegistry vocabularyRegistry; |
21 | 21 |
|
22 | 22 |
/** |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/mdstore/modular/inspector/MDStoreInspector.java | ||
---|---|---|
51 | 51 |
@Autowired |
52 | 52 |
private MDStoreTransactionManager transactionManager; |
53 | 53 |
|
54 |
@Resource
|
|
54 |
@Autowired
|
|
55 | 55 |
private MDStoreFeeder feeder; |
56 | 56 |
|
57 | 57 |
@RequestMapping(value = "/inspector/mdstores.do") |
modules/dnet-data-services/trunk/src/main/java/eu/dnetlib/data/mdstore/modular/action/AbstractMDStoreAction.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.concurrent.Executor; |
4 | 4 |
import java.util.concurrent.Executors; |
5 |
import javax.annotation.Resource; |
|
6 | 5 |
|
7 | 6 |
import eu.dnetlib.data.mdstore.modular.connector.MDStoreDao; |
8 | 7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
... | ... | |
15 | 14 |
import org.apache.commons.io.IOUtils; |
16 | 15 |
import org.apache.commons.logging.Log; |
17 | 16 |
import org.apache.commons.logging.LogFactory; |
17 |
import org.springframework.beans.factory.annotation.Autowired; |
|
18 | 18 |
import org.springframework.core.io.ClassPathResource; |
19 | 19 |
|
20 | 20 |
/** |
... | ... | |
32 | 32 |
* The executor. |
33 | 33 |
*/ |
34 | 34 |
private final Executor executor = Executors.newCachedThreadPool(); |
35 |
@Resource
|
|
35 |
@Autowired
|
|
36 | 36 |
private UniqueServiceLocator serviceLocator; |
37 | 37 |
/** |
38 | 38 |
* The dao. |
modules/dnet-core-components/trunk/src/test/java/eu/dnetlib/enabling/tools/blackboard/NotificationHandlerChainTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.tools.blackboard; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 | 3 |
import org.junit.Test; |
6 | 4 |
import org.junit.runner.RunWith; |
5 |
import org.springframework.beans.factory.annotation.Autowired; |
|
7 | 6 |
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
8 | 7 |
import org.springframework.test.context.ContextConfiguration; |
9 | 8 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
... | ... | |
12 | 11 |
@ContextConfiguration |
13 | 12 |
public class NotificationHandlerChainTest { |
14 | 13 |
|
15 |
@Resource
|
|
14 |
@Autowired
|
|
16 | 15 |
private transient ThreadPoolTaskExecutor executor; |
17 | 16 |
|
18 | 17 |
@Test |
modules/dnet-core-components/trunk/src/test/java/eu/dnetlib/springutils/stringtemplate/StringTemplateFactoryTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.springutils.stringtemplate; |
2 | 2 |
|
3 |
|
|
4 |
import static org.junit.Assert.*; |
|
5 |
|
|
6 |
import javax.annotation.Resource; |
|
7 |
|
|
8 | 3 |
import org.antlr.stringtemplate.StringTemplate; |
9 | 4 |
import org.junit.Test; |
10 | 5 |
import org.junit.runner.RunWith; |
6 |
import org.springframework.beans.factory.annotation.Autowired; |
|
11 | 7 |
import org.springframework.test.context.ContextConfiguration; |
12 | 8 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
13 | 9 |
|
10 |
import static org.junit.Assert.assertEquals; |
|
11 |
|
|
14 | 12 |
/** |
15 | 13 |
* Test a string template factory bean. |
16 | 14 |
* @author marko |
... | ... | |
20 | 18 |
@ContextConfiguration |
21 | 19 |
public class StringTemplateFactoryTest { |
22 | 20 |
|
23 |
@Resource
|
|
21 |
@Autowired
|
|
24 | 22 |
private StringTemplate template; |
25 | 23 |
|
26 | 24 |
@Test |
modules/dnet-core-components/trunk/src/main/java/eu/dnetlib/enabling/tools/blackboard/NotificationHandlerChainImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.tools.blackboard; |
2 | 2 |
|
3 | 3 |
import java.util.Collection; |
4 |
import javax.annotation.Resource; |
|
5 | 4 |
|
6 | 5 |
import org.apache.commons.logging.Log; |
7 | 6 |
import org.apache.commons.logging.LogFactory; |
7 |
import org.springframework.beans.factory.annotation.Autowired; |
|
8 | 8 |
import org.springframework.beans.factory.annotation.Required; |
9 | 9 |
import org.springframework.core.task.TaskExecutor; |
10 | 10 |
|
... | ... | |
27 | 27 |
*/ |
28 | 28 |
private TaskExecutor handlerExecutor; |
29 | 29 |
|
30 |
@Resource
|
|
30 |
@Autowired
|
|
31 | 31 |
private NotificationHistory notificationHistory; |
32 | 32 |
|
33 | 33 |
|
modules/dnet-core-components/trunk/src/main/java/eu/dnetlib/enabling/tools/registration/ServiceRegistrationManager.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.tools.registration; |
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 |
import javax.annotation.Resource; |
|
5 | 4 |
import javax.xml.ws.Endpoint; |
6 | 5 |
|
7 | 6 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
... | ... | |
11 | 10 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
12 | 11 |
import org.apache.commons.logging.Log; |
13 | 12 |
import org.apache.commons.logging.LogFactory; |
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
14 | 14 |
import org.springframework.beans.factory.annotation.Required; |
15 | 15 |
|
16 | 16 |
public class ServiceRegistrationManager { |
17 | 17 |
|
18 | 18 |
private static final Log log = LogFactory.getLog(ServiceRegistrationManager.class); |
19 | 19 |
|
20 |
@Resource
|
|
20 |
@Autowired
|
|
21 | 21 |
private UniqueServiceLocator serviceLocator; |
22 | 22 |
|
23 | 23 |
private ServiceRegistrator registrator; |
24 | 24 |
|
25 | 25 |
private boolean disabled = false; |
26 | 26 |
|
27 |
@Resource
|
|
27 |
@Autowired
|
|
28 | 28 |
private List<Endpoint> services; |
29 | 29 |
|
30 | 30 |
public void registerAllServices() { |
modules/dnet-core-components/trunk/src/main/java/eu/dnetlib/enabling/inspector/AbstractInspectorController.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.inspector; |
2 | 2 |
|
3 | 3 |
import java.util.Collections; |
4 |
import java.util.Comparator; |
|
5 | 4 |
import java.util.List; |
6 | 5 |
import java.util.stream.Collectors; |
7 | 6 |
import javax.annotation.PostConstruct; |
8 |
import javax.annotation.Resource; |
|
9 | 7 |
import javax.servlet.http.HttpServletRequest; |
10 | 8 |
|
9 |
import org.springframework.beans.factory.annotation.Autowired; |
|
11 | 10 |
import org.springframework.web.bind.annotation.ModelAttribute; |
12 | 11 |
|
13 | 12 |
|
... | ... | |
22 | 21 |
/** |
23 | 22 |
* entry point groups |
24 | 23 |
*/ |
25 |
@Resource
|
|
24 |
@Autowired
|
|
26 | 25 |
List<EntryPointDescriptorGroup> entryPointsGroups; |
27 | 26 |
|
28 | 27 |
/** |
modules/dnet-core-components/trunk/src/main/java/eu/dnetlib/enabling/locators/DefaultUniqueServiceLocator.java | ||
---|---|---|
4 | 4 |
import java.io.StringWriter; |
5 | 5 |
import java.util.*; |
6 | 6 |
import java.util.stream.Collectors; |
7 |
import javax.annotation.Resource; |
|
8 | 7 |
|
9 | 8 |
import eu.dnetlib.enabling.tools.BaseServiceUtils; |
10 | 9 |
import eu.dnetlib.rmi.common.BaseService; |
... | ... | |
20 | 19 |
import org.dom4j.Element; |
21 | 20 |
import org.dom4j.io.SAXReader; |
22 | 21 |
import org.springframework.beans.BeansException; |
22 |
import org.springframework.beans.factory.annotation.Autowired; |
|
23 | 23 |
import org.springframework.beans.factory.annotation.Required; |
24 | 24 |
import org.springframework.context.ApplicationContext; |
25 | 25 |
import org.springframework.context.ApplicationContextAware; |
... | ... | |
40 | 40 |
/** |
41 | 41 |
* An instance of isLookupService (local or stub) |
42 | 42 |
*/ |
43 |
@Resource
|
|
43 |
@Autowired
|
|
44 | 44 |
private ISLookUpService isLookupService; |
45 | 45 |
/** |
46 | 46 |
* build epr. |
47 | 47 |
*/ |
48 |
@Resource
|
|
48 |
@Autowired
|
|
49 | 49 |
private StandaloneCxfEndpointReferenceBuilder eprBuilder; |
50 | 50 |
|
51 | 51 |
@Override |
modules/dnet-core-components/trunk/src/main/java/eu/dnetlib/clients/index/utils/ServiceTools.java | ||
---|---|---|
3 | 3 |
import java.util.HashMap; |
4 | 4 |
import java.util.List; |
5 | 5 |
import java.util.Map; |
6 |
import javax.annotation.Resource; |
|
7 | 6 |
|
8 | 7 |
import com.google.common.collect.Iterables; |
9 | 8 |
import com.google.common.collect.Lists; |
... | ... | |
14 | 13 |
import org.apache.commons.lang3.StringUtils; |
15 | 14 |
import org.apache.commons.logging.Log; |
16 | 15 |
import org.apache.commons.logging.LogFactory; |
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
17 | 17 |
|
18 | 18 |
public class ServiceTools { |
19 | 19 |
|
20 | 20 |
private static final Log log = LogFactory.getLog(ServiceTools.class); |
21 | 21 |
|
22 |
@Resource
|
|
22 |
@Autowired
|
|
23 | 23 |
private UniqueServiceLocator serviceLocator; |
24 | 24 |
|
25 |
@Resource
|
|
25 |
@Autowired
|
|
26 | 26 |
private MetadataReferenceFactory mdFactory; |
27 | 27 |
|
28 | 28 |
public List<MetadataReference> listMDRefs() throws IndexClientException { |
modules/dnet-core-components/trunk/src/main/java/eu/dnetlib/clients/index/client/ResolvingIndexClientFactory.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.clients.index.client; |
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 |
import javax.annotation.Resource; |
|
5 | 4 |
|
5 |
import org.springframework.beans.factory.annotation.Autowired; |
|
6 |
|
|
6 | 7 |
/** |
7 | 8 |
* The Class GlobalIndexClientFactory. |
8 | 9 |
*/ |
... | ... | |
15 | 16 |
/** |
16 | 17 |
* The index client factories. |
17 | 18 |
*/ |
18 |
@Resource
|
|
19 |
@Autowired
|
|
19 | 20 |
private List<IndexClientFactory> indexClientFactories; |
20 | 21 |
|
21 | 22 |
/** |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/cron/ScheduledWorkflowLauncher.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.Date; |
4 | 4 |
|
5 |
import javax.annotation.Resource; |
|
6 |
|
|
7 |
import org.apache.commons.lang3.StringUtils; |
|
8 |
import org.apache.commons.lang3.math.NumberUtils; |
|
9 |
import org.apache.commons.logging.Log; |
|
10 |
import org.apache.commons.logging.LogFactory; |
|
11 |
import org.quartz.CronExpression; |
|
12 |
import org.springframework.beans.factory.annotation.Required; |
|
13 |
|
|
14 | 5 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
15 | 6 |
import eu.dnetlib.miscutils.datetime.DateUtils; |
16 | 7 |
import eu.dnetlib.msro.workflows.procs.ProcessRegistry; |
... | ... | |
18 | 9 |
import eu.dnetlib.msro.workflows.procs.WorkflowProcess; |
19 | 10 |
import eu.dnetlib.rmi.enabling.ISLookUpException; |
20 | 11 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
12 |
import org.apache.commons.lang3.StringUtils; |
|
13 |
import org.apache.commons.lang3.math.NumberUtils; |
|
14 |
import org.apache.commons.logging.Log; |
|
15 |
import org.apache.commons.logging.LogFactory; |
|
16 |
import org.quartz.CronExpression; |
|
17 |
import org.springframework.beans.factory.annotation.Autowired; |
|
18 |
import org.springframework.beans.factory.annotation.Required; |
|
21 | 19 |
|
22 | 20 |
public class ScheduledWorkflowLauncher { |
23 | 21 |
|
... | ... | |
31 | 29 |
|
32 | 30 |
private int windowSize = 7200000; // 2 hours |
33 | 31 |
|
34 |
@Resource
|
|
32 |
@Autowired
|
|
35 | 33 |
private UniqueServiceLocator serviceLocator; |
36 | 34 |
|
37 | 35 |
public void verifySheduledWorkflows() { |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/notification/EmailDispatcher.java | ||
---|---|---|
7 | 7 |
import java.util.Properties; |
8 | 8 |
import java.util.concurrent.BlockingQueue; |
9 | 9 |
import java.util.concurrent.LinkedBlockingQueue; |
10 |
|
|
11 |
import javax.annotation.Resource; |
|
12 |
import javax.mail.Authenticator; |
|
13 |
import javax.mail.Message; |
|
14 |
import javax.mail.MessagingException; |
|
15 |
import javax.mail.PasswordAuthentication; |
|
16 |
import javax.mail.Session; |
|
17 |
import javax.mail.Transport; |
|
10 |
import javax.mail.*; |
|
18 | 11 |
import javax.mail.internet.InternetAddress; |
19 | 12 |
import javax.mail.internet.MimeMessage; |
20 | 13 |
|
14 |
import com.google.common.base.Splitter; |
|
15 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
16 |
import eu.dnetlib.msro.workflows.procs.WorkflowProcess; |
|
17 |
import eu.dnetlib.msro.workflows.procs.WorkflowProcess.Status; |
|
18 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
|
21 | 19 |
import org.antlr.stringtemplate.StringTemplate; |
22 | 20 |
import org.apache.commons.lang3.StringUtils; |
23 | 21 |
import org.apache.commons.logging.Log; |
24 | 22 |
import org.apache.commons.logging.LogFactory; |
25 | 23 |
import org.dom4j.Document; |
26 | 24 |
import org.dom4j.io.SAXReader; |
25 |
import org.springframework.beans.factory.annotation.Autowired; |
|
27 | 26 |
import org.springframework.beans.factory.annotation.Required; |
28 | 27 |
|
29 |
import com.google.common.base.Splitter; |
|
30 |
|
|
31 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
32 |
import eu.dnetlib.msro.workflows.procs.WorkflowProcess; |
|
33 |
import eu.dnetlib.msro.workflows.procs.WorkflowProcess.Status; |
|
34 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
|
35 |
|
|
36 | 28 |
public class EmailDispatcher { |
37 | 29 |
|
30 |
private static final Log log = LogFactory.getLog(EmailDispatcher.class); |
|
31 |
private final BlockingQueue<Message> queue = new LinkedBlockingQueue<Message>(); |
|
38 | 32 |
private String from; |
39 | 33 |
private String fromName; |
40 | 34 |
private String cc; |
... | ... | |
44 | 38 |
private String smtpPassword; |
45 | 39 |
private String baseUrl; |
46 | 40 |
private String infrastructure; |
47 |
|
|
48 |
private static final Log log = LogFactory.getLog(EmailDispatcher.class); |
|
49 |
|
|
50 |
@Resource |
|
41 |
@Autowired |
|
51 | 42 |
private UniqueServiceLocator serviceLocator; |
52 | 43 |
|
53 |
private final BlockingQueue<Message> queue = new LinkedBlockingQueue<Message>(); |
|
54 |
|
|
55 | 44 |
public void sendMail(final String to, final String subject, final String message) { |
56 | 45 |
try { |
57 | 46 |
final Session session = Session.getInstance(obtainProperties(), obtainAuthenticator()); |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/procs/ProcessEngine.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.workflows.procs; |
2 | 2 |
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.Arrays; |
|
5 |
import java.util.HashMap; |
|
6 |
import java.util.List; |
|
7 |
import java.util.Map; |
|
3 |
import java.util.*; |
|
8 | 4 |
import java.util.stream.Collectors; |
9 | 5 |
|
10 |
import javax.annotation.Resource; |
|
11 |
|
|
12 |
import org.antlr.stringtemplate.StringTemplate; |
|
13 |
import org.apache.commons.io.IOUtils; |
|
14 |
import org.apache.commons.lang3.StringEscapeUtils; |
|
15 |
import org.apache.commons.lang3.StringUtils; |
|
16 |
import org.apache.commons.logging.Log; |
|
17 |
import org.apache.commons.logging.LogFactory; |
|
18 |
import org.springframework.beans.factory.annotation.Required; |
|
19 |
|
|
20 | 6 |
import com.google.common.base.Throwables; |
21 |
|
|
22 | 7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
23 | 8 |
import eu.dnetlib.miscutils.datetime.DateUtils; |
24 | 9 |
import eu.dnetlib.msro.logging.DnetLogger; |
... | ... | |
30 | 15 |
import eu.dnetlib.msro.workflows.util.NodeTokenCallback; |
31 | 16 |
import eu.dnetlib.msro.workflows.util.WorkflowsConstants; |
32 | 17 |
import eu.dnetlib.rmi.enabling.ISRegistryService; |
18 |
import org.antlr.stringtemplate.StringTemplate; |
|
19 |
import org.apache.commons.io.IOUtils; |
|
20 |
import org.apache.commons.lang3.StringEscapeUtils; |
|
21 |
import org.apache.commons.lang3.StringUtils; |
|
22 |
import org.apache.commons.logging.Log; |
|
23 |
import org.apache.commons.logging.LogFactory; |
|
24 |
import org.springframework.beans.factory.annotation.Autowired; |
|
25 |
import org.springframework.beans.factory.annotation.Required; |
|
33 | 26 |
|
34 | 27 |
/** |
35 | 28 |
* Created by michele on 26/11/15. |
... | ... | |
38 | 31 |
|
39 | 32 |
private static final Log log = LogFactory.getLog(ProcessEngine.class); |
40 | 33 |
|
41 |
@Resource
|
|
34 |
@Autowired
|
|
42 | 35 |
private UniqueServiceLocator serviceLocator; |
43 | 36 |
|
44 | 37 |
private NodeHelper nodeHelper; |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/procs/ProcessFactory.java | ||
---|---|---|
4 | 4 |
import java.util.Date; |
5 | 5 |
import java.util.Map; |
6 | 6 |
|
7 |
import javax.annotation.Resource; |
|
8 |
|
|
9 |
import org.apache.commons.lang3.StringUtils; |
|
10 |
import org.apache.commons.logging.Log; |
|
11 |
import org.apache.commons.logging.LogFactory; |
|
12 |
|
|
13 | 7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
14 | 8 |
import eu.dnetlib.msro.workflows.graph.Graph; |
15 | 9 |
import eu.dnetlib.msro.workflows.util.ProcessCallback; |
16 | 10 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
17 | 11 |
import eu.dnetlib.rmi.manager.MSROException; |
12 |
import org.apache.commons.lang3.StringUtils; |
|
13 |
import org.apache.commons.logging.Log; |
|
14 |
import org.apache.commons.logging.LogFactory; |
|
15 |
import org.springframework.beans.factory.annotation.Autowired; |
|
18 | 16 |
|
19 | 17 |
/** |
20 | 18 |
* Created by michele on 25/11/15. |
... | ... | |
25 | 23 |
|
26 | 24 |
private String oldGeneratedId = ""; |
27 | 25 |
|
28 |
@Resource
|
|
26 |
@Autowired
|
|
29 | 27 |
private UniqueServiceLocator serviceLocator; |
30 | 28 |
|
31 | 29 |
public WorkflowProcess newProcess(final String name, |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/procs/WorkflowExecutor.java | ||
---|---|---|
6 | 6 |
import java.util.concurrent.Executors; |
7 | 7 |
import java.util.concurrent.TimeUnit; |
8 | 8 |
|
9 |
import javax.annotation.Resource; |
|
10 |
|
|
11 |
import org.apache.commons.lang3.StringUtils; |
|
12 |
import org.apache.commons.lang3.math.NumberUtils; |
|
13 |
import org.apache.commons.logging.Log; |
|
14 |
import org.apache.commons.logging.LogFactory; |
|
15 |
import org.dom4j.Document; |
|
16 |
import org.dom4j.Element; |
|
17 |
import org.dom4j.io.SAXReader; |
|
18 |
import org.springframework.beans.factory.annotation.Required; |
|
19 |
|
|
20 | 9 |
import eu.dnetlib.enabling.common.Stoppable; |
21 | 10 |
import eu.dnetlib.enabling.common.StoppableDetails; |
22 | 11 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
... | ... | |
26 | 15 |
import eu.dnetlib.msro.workflows.util.WorkflowsConstants; |
27 | 16 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
28 | 17 |
import eu.dnetlib.rmi.manager.MSROException; |
18 |
import org.apache.commons.lang3.StringUtils; |
|
19 |
import org.apache.commons.lang3.math.NumberUtils; |
|
20 |
import org.apache.commons.logging.Log; |
|
21 |
import org.apache.commons.logging.LogFactory; |
|
22 |
import org.dom4j.Document; |
|
23 |
import org.dom4j.Element; |
|
24 |
import org.dom4j.io.SAXReader; |
|
25 |
import org.springframework.beans.factory.annotation.Autowired; |
|
26 |
import org.springframework.beans.factory.annotation.Required; |
|
29 | 27 |
|
30 | 28 |
/** |
31 | 29 |
* Created by michele on 20/11/15. |
... | ... | |
34 | 32 |
|
35 | 33 |
private static final Log log = LogFactory.getLog(WorkflowExecutor.class); |
36 | 34 |
|
37 |
@Resource
|
|
35 |
@Autowired
|
|
38 | 36 |
private UniqueServiceLocator serviceLocator; |
39 | 37 |
|
40 | 38 |
private GraphLoader graphLoader; |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/objectStore/RetrieveMdStoreId.java | ||
---|---|---|
4 | 4 |
import java.util.List; |
5 | 5 |
import java.util.Set; |
6 | 6 |
|
7 |
import javax.annotation.Resource; |
|
8 |
|
|
9 |
import org.springframework.beans.factory.annotation.Required; |
|
10 |
|
|
11 | 7 |
import com.google.common.collect.Lists; |
12 | 8 |
import com.google.common.collect.Sets; |
13 | 9 |
import com.google.gson.Gson; |
14 | 10 |
import com.google.gson.GsonBuilder; |
15 |
|
|
16 | 11 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
17 | 12 |
import eu.dnetlib.msro.workflows.graph.Arc; |
18 | 13 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
19 | 14 |
import eu.dnetlib.msro.workflows.procs.Env; |
20 | 15 |
import eu.dnetlib.rmi.enabling.ISLookUpException; |
21 | 16 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
17 |
import org.springframework.beans.factory.annotation.Autowired; |
|
18 |
import org.springframework.beans.factory.annotation.Required; |
|
22 | 19 |
|
23 | 20 |
/** |
24 | 21 |
* The Class RetrieveMdStoreId is a job node used to retrieve the correct MDStore from which extract the url of the file to download. |
... | ... | |
44 | 41 |
/** |
45 | 42 |
* The service locator. |
46 | 43 |
*/ |
47 |
@Resource
|
|
44 |
@Autowired
|
|
48 | 45 |
private UniqueServiceLocator serviceLocator; |
49 | 46 |
|
50 | 47 |
@Override |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/objectStore/UpdateObjectStoreSizeJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.workflows.nodes.objectStore; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 | 3 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
6 | 4 |
import eu.dnetlib.miscutils.datetime.DateUtils; |
7 | 5 |
import eu.dnetlib.msro.workflows.graph.Arc; |
... | ... | |
9 | 7 |
import eu.dnetlib.msro.workflows.procs.Env; |
10 | 8 |
import eu.dnetlib.rmi.data.ObjectStoreService; |
11 | 9 |
import eu.dnetlib.rmi.enabling.ISRegistryService; |
10 |
import org.springframework.beans.factory.annotation.Autowired; |
|
12 | 11 |
|
13 | 12 |
// TODO: Auto-generated Javadoc |
14 | 13 |
|
... | ... | |
25 | 24 |
/** |
26 | 25 |
* The service locator. |
27 | 26 |
*/ |
28 |
@Resource
|
|
27 |
@Autowired
|
|
29 | 28 |
private UniqueServiceLocator serviceLocator; |
30 | 29 |
|
31 | 30 |
@Override |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/blackboard/BlackboardSubscriber.java | ||
---|---|---|
4 | 4 |
import javax.xml.ws.Endpoint; |
5 | 5 |
import javax.xml.ws.wsaddressing.W3CEndpointReference; |
6 | 6 |
|
7 |
import org.apache.commons.logging.Log; |
|
8 |
import org.apache.commons.logging.LogFactory; |
|
9 |
import org.springframework.beans.factory.annotation.Required; |
|
10 |
|
|
11 | 7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
12 | 8 |
import eu.dnetlib.rmi.enabling.ISSNException; |
13 | 9 |
import eu.dnetlib.rmi.enabling.ISSNService; |
14 | 10 |
import eu.dnetlib.soap.EndpointReferenceBuilder; |
11 |
import org.apache.commons.logging.Log; |
|
12 |
import org.apache.commons.logging.LogFactory; |
|
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
14 |
import org.springframework.beans.factory.annotation.Required; |
|
15 | 15 |
|
16 | 16 |
public class BlackboardSubscriber { |
17 | 17 |
|
... | ... | |
23 | 23 |
/** |
24 | 24 |
* service locator. |
25 | 25 |
*/ |
26 |
@Resource
|
|
26 |
@Autowired
|
|
27 | 27 |
private UniqueServiceLocator serviceLocator; |
28 | 28 |
|
29 | 29 |
/** |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/db/ExecuteSqlJobNode.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.IOException; |
4 | 4 |
|
5 |
import javax.annotation.Resource; |
|
6 |
|
|
7 |
import org.apache.commons.io.IOUtils; |
|
8 |
|
|
9 | 5 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
10 | 6 |
import eu.dnetlib.msro.workflows.graph.Arc; |
11 | 7 |
import eu.dnetlib.msro.workflows.nodes.AsyncJobNode; |
12 | 8 |
import eu.dnetlib.msro.workflows.procs.Env; |
13 | 9 |
import eu.dnetlib.rmi.data.DatabaseService; |
10 |
import org.apache.commons.io.IOUtils; |
|
11 |
import org.springframework.beans.factory.annotation.Autowired; |
|
14 | 12 |
|
15 | 13 |
public class ExecuteSqlJobNode extends AsyncJobNode { |
16 | 14 |
|
... | ... | |
19 | 17 |
|
20 | 18 |
private String sql; |
21 | 19 |
|
22 |
@Resource
|
|
20 |
@Autowired
|
|
23 | 21 |
private UniqueServiceLocator serviceLocator; |
24 | 22 |
|
25 | 23 |
@Override |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/db/QueryDbJobNode.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.IOException; |
4 | 4 |
|
5 |
import javax.annotation.Resource; |
|
6 |
|
|
7 |
import org.apache.commons.io.IOUtils; |
|
8 |
import org.apache.commons.lang3.StringUtils; |
|
9 |
|
|
10 | 5 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
11 | 6 |
import eu.dnetlib.msro.workflows.graph.Arc; |
12 | 7 |
import eu.dnetlib.msro.workflows.nodes.AsyncJobNode; |
13 | 8 |
import eu.dnetlib.msro.workflows.procs.Env; |
14 | 9 |
import eu.dnetlib.rmi.common.ResultSet; |
15 | 10 |
import eu.dnetlib.rmi.data.DatabaseService; |
11 |
import org.apache.commons.io.IOUtils; |
|
12 |
import org.apache.commons.lang3.StringUtils; |
|
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
16 | 14 |
|
17 | 15 |
public class QueryDbJobNode extends AsyncJobNode { |
18 | 16 |
|
... | ... | |
24 | 22 |
private String xslt; |
25 | 23 |
private String outputEprParam; |
26 | 24 |
|
27 |
@Resource
|
|
25 |
@Autowired
|
|
28 | 26 |
private UniqueServiceLocator serviceLocator; |
29 | 27 |
|
30 | 28 |
@Override |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/collect/DateRangeCollectRecordsJobNode.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.StringReader; |
4 | 4 |
|
5 |
import javax.annotation.Resource; |
|
6 |
|
|
7 |
import org.dom4j.Document; |
|
8 |
import org.dom4j.Node; |
|
9 |
import org.dom4j.io.SAXReader; |
|
10 |
|
|
11 | 5 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
12 | 6 |
import eu.dnetlib.msro.workflows.graph.Arc; |
13 | 7 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
... | ... | |
16 | 10 |
import eu.dnetlib.rmi.data.CollectorService; |
17 | 11 |
import eu.dnetlib.rmi.data.InterfaceDescriptor; |
18 | 12 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
13 |
import org.dom4j.Document; |
|
14 |
import org.dom4j.Node; |
|
15 |
import org.dom4j.io.SAXReader; |
|
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
19 | 17 |
|
20 | 18 |
public class DateRangeCollectRecordsJobNode extends SimpleJobNode { |
21 | 19 |
|
22 |
@Resource
|
|
20 |
@Autowired
|
|
23 | 21 |
private UniqueServiceLocator serviceLocator; |
24 | 22 |
|
25 | 23 |
private String datasourceId; |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/collect/CollectRecordsJobNode.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.StringReader; |
4 | 4 |
|
5 |
import javax.annotation.Resource; |
|
6 |
|
|
7 |
import org.dom4j.Document; |
|
8 |
import org.dom4j.Node; |
|
9 |
import org.dom4j.io.SAXReader; |
|
10 |
|
|
11 | 5 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
12 | 6 |
import eu.dnetlib.msro.workflows.graph.Arc; |
13 | 7 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
... | ... | |
16 | 10 |
import eu.dnetlib.rmi.data.CollectorService; |
17 | 11 |
import eu.dnetlib.rmi.data.InterfaceDescriptor; |
18 | 12 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
13 |
import org.dom4j.Document; |
|
14 |
import org.dom4j.Node; |
|
15 |
import org.dom4j.io.SAXReader; |
|
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
19 | 17 |
|
20 | 18 |
public class CollectRecordsJobNode extends SimpleJobNode { |
21 | 19 |
|
22 |
@Resource
|
|
20 |
@Autowired
|
|
23 | 21 |
private UniqueServiceLocator serviceLocator; |
24 | 22 |
|
25 | 23 |
private String datasourceId; |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/repohi/RegisterWorkflowFromTemplateJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.workflows.nodes.repohi; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 |
import org.antlr.stringtemplate.StringTemplate; |
|
6 |
import org.apache.commons.io.IOUtils; |
|
7 |
import org.apache.commons.lang3.StringEscapeUtils; |
|
8 |
import org.apache.commons.logging.Log; |
|
9 |
import org.apache.commons.logging.LogFactory; |
|
10 |
|
|
11 | 3 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
12 | 4 |
import eu.dnetlib.msro.workflows.graph.Arc; |
13 | 5 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
... | ... | |
16 | 8 |
import eu.dnetlib.msro.workflows.procs.WorkflowProcess; |
17 | 9 |
import eu.dnetlib.msro.workflows.util.WorkflowsConstants; |
18 | 10 |
import eu.dnetlib.rmi.enabling.ISRegistryService; |
11 |
import org.antlr.stringtemplate.StringTemplate; |
|
12 |
import org.apache.commons.io.IOUtils; |
|
13 |
import org.apache.commons.lang3.StringEscapeUtils; |
|
14 |
import org.apache.commons.logging.Log; |
|
15 |
import org.apache.commons.logging.LogFactory; |
|
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
19 | 17 |
|
20 | 18 |
public class RegisterWorkflowFromTemplateJobNode extends SimpleJobNode implements ProcessAware { |
21 | 19 |
|
20 |
private static final Log log = LogFactory.getLog(RegisterWorkflowFromTemplateJobNode.class); |
|
22 | 21 |
private String wfName; |
23 | 22 |
private String wfTemplate; |
24 | 23 |
private String description; |
25 | 24 |
private WorkflowProcess process; |
26 |
|
|
27 |
private static final Log log = LogFactory.getLog(RegisterWorkflowFromTemplateJobNode.class); |
|
28 |
|
|
29 |
@Resource |
|
25 |
@Autowired |
|
30 | 26 |
private UniqueServiceLocator serviceLocator; |
31 | 27 |
|
32 | 28 |
public String getWfName() { |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/repohi/UpdateWfParametersJobNode.java | ||
---|---|---|
4 | 4 |
import java.util.HashMap; |
5 | 5 |
import java.util.Map; |
6 | 6 |
|
7 |
import javax.annotation.Resource; |
|
8 |
|
|
9 |
import org.apache.commons.lang3.StringEscapeUtils; |
|
10 |
import org.apache.commons.logging.Log; |
|
11 |
import org.apache.commons.logging.LogFactory; |
|
12 |
import org.dom4j.Document; |
|
13 |
import org.dom4j.Element; |
|
14 |
import org.dom4j.Node; |
|
15 |
import org.dom4j.io.SAXReader; |
|
16 |
|
|
17 | 7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
18 | 8 |
import eu.dnetlib.msro.workflows.graph.Arc; |
19 | 9 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
... | ... | |
22 | 12 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
23 | 13 |
import eu.dnetlib.rmi.enabling.ISRegistryService; |
24 | 14 |
import eu.dnetlib.rmi.manager.MSROException; |
15 |
import org.apache.commons.lang3.StringEscapeUtils; |
|
16 |
import org.apache.commons.logging.Log; |
|
17 |
import org.apache.commons.logging.LogFactory; |
|
18 |
import org.dom4j.Document; |
|
19 |
import org.dom4j.Element; |
|
20 |
import org.dom4j.Node; |
|
21 |
import org.dom4j.io.SAXReader; |
|
22 |
import org.springframework.beans.factory.annotation.Autowired; |
|
25 | 23 |
|
26 | 24 |
public class UpdateWfParametersJobNode extends SimpleJobNode { |
27 | 25 |
|
26 |
private static final Log log = LogFactory.getLog(UpdateWfParametersJobNode.class); |
|
28 | 27 |
private Map<String, String> envParams; |
29 | 28 |
private Map<String, String> simpleParams; |
30 |
|
|
31 |
@Resource |
|
29 |
@Autowired |
|
32 | 30 |
private UniqueServiceLocator serviceLocator; |
33 | 31 |
|
34 |
private static final Log log = LogFactory.getLog(UpdateWfParametersJobNode.class); |
|
35 |
|
|
36 | 32 |
@Override |
37 | 33 |
protected String execute(final Env env) throws Exception { |
38 | 34 |
|
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/info/MDStoreToApiExtraFieldJobNode.java | ||
---|---|---|
4 | 4 |
import java.util.HashMap; |
5 | 5 |
import java.util.Map; |
6 | 6 |
|
7 |
import javax.annotation.Resource; |
|
8 |
|
|
9 |
import org.dom4j.Document; |
|
10 |
import org.dom4j.Node; |
|
11 |
import org.dom4j.io.SAXReader; |
|
12 |
|
|
13 | 7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
14 | 8 |
import eu.dnetlib.msro.workflows.graph.Arc; |
15 | 9 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
16 | 10 |
import eu.dnetlib.msro.workflows.procs.Env; |
17 | 11 |
import eu.dnetlib.rmi.datasource.DatasourceManagerService; |
18 | 12 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
13 |
import org.dom4j.Document; |
|
14 |
import org.dom4j.Node; |
|
15 |
import org.dom4j.io.SAXReader; |
|
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
19 | 17 |
|
20 | 18 |
public class MDStoreToApiExtraFieldJobNode extends SimpleJobNode { |
21 | 19 |
|
... | ... | |
26 | 24 |
private String extraFieldForDate; |
27 | 25 |
private String extraFieldForMdId; |
28 | 26 |
|
29 |
@Resource
|
|
27 |
@Autowired
|
|
30 | 28 |
private UniqueServiceLocator serviceLocator; |
31 | 29 |
|
32 | 30 |
@Override |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/info/RemoveApiExtraFieldsJobNode.java | ||
---|---|---|
7 | 7 |
import java.util.Set; |
8 | 8 |
import java.util.stream.Collectors; |
9 | 9 |
|
10 |
import javax.annotation.Resource; |
|
11 |
|
|
12 |
import org.dom4j.Document; |
|
13 |
import org.dom4j.Node; |
|
14 |
import org.dom4j.io.SAXReader; |
|
15 |
|
|
16 | 10 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
17 | 11 |
import eu.dnetlib.msro.workflows.graph.Arc; |
18 | 12 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
19 | 13 |
import eu.dnetlib.msro.workflows.procs.Env; |
20 | 14 |
import eu.dnetlib.rmi.datasource.DatasourceManagerService; |
21 | 15 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
16 |
import org.dom4j.Document; |
|
17 |
import org.dom4j.Node; |
|
18 |
import org.dom4j.io.SAXReader; |
|
19 |
import org.springframework.beans.factory.annotation.Autowired; |
|
22 | 20 |
|
23 | 21 |
public class RemoveApiExtraFieldsJobNode extends SimpleJobNode { |
24 | 22 |
|
... | ... | |
26 | 24 |
private String datasourceInterface; |
27 | 25 |
private List<String> fields; |
28 | 26 |
|
29 |
@Resource
|
|
27 |
@Autowired
|
|
30 | 28 |
private UniqueServiceLocator serviceLocator; |
31 | 29 |
|
32 | 30 |
@Override |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/info/ObjectStoreToApiExtraFieldJobNode.java | ||
---|---|---|
4 | 4 |
import java.util.HashMap; |
5 | 5 |
import java.util.Map; |
6 | 6 |
|
7 |
import javax.annotation.Resource; |
|
8 |
|
|
9 |
import org.dom4j.Document; |
|
10 |
import org.dom4j.Node; |
|
11 |
import org.dom4j.io.SAXReader; |
|
12 |
|
|
13 | 7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
14 | 8 |
import eu.dnetlib.msro.workflows.graph.Arc; |
15 | 9 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
16 | 10 |
import eu.dnetlib.msro.workflows.procs.Env; |
17 | 11 |
import eu.dnetlib.rmi.datasource.DatasourceManagerService; |
18 | 12 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
13 |
import org.dom4j.Document; |
|
14 |
import org.dom4j.Node; |
|
15 |
import org.dom4j.io.SAXReader; |
|
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
19 | 17 |
|
20 | 18 |
public class ObjectStoreToApiExtraFieldJobNode extends SimpleJobNode { |
21 | 19 |
|
... | ... | |
26 | 24 |
private String extraFieldForDate; |
27 | 25 |
private String extraFieldForObjId; |
28 | 26 |
|
29 |
@Resource
|
|
27 |
@Autowired
|
|
30 | 28 |
private UniqueServiceLocator serviceLocator; |
31 | 29 |
|
32 | 30 |
@Override |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/misc/VerifyDatasourceJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.workflows.nodes.misc; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 | 3 |
import com.google.common.base.Splitter; |
6 |
|
|
7 | 4 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
8 | 5 |
import eu.dnetlib.msro.workflows.graph.Arc; |
9 | 6 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
... | ... | |
15 | 12 |
import eu.dnetlib.rmi.enabling.ISLookUpException; |
16 | 13 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
17 | 14 |
import eu.dnetlib.rmi.manager.MSROException; |
15 |
import org.springframework.beans.factory.annotation.Autowired; |
|
18 | 16 |
|
19 | 17 |
public class VerifyDatasourceJobNode extends SimpleJobNode implements ProcessAware { |
20 | 18 |
|
21 |
@Resource
|
|
19 |
@Autowired
|
|
22 | 20 |
private UniqueServiceLocator serviceLocator; |
23 | 21 |
|
24 | 22 |
private String expectedInterfaceTypologyPrefixes; |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/misc/ValidateDatasourceJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.workflows.nodes.misc; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 |
import org.apache.commons.logging.Log; |
|
6 |
import org.apache.commons.logging.LogFactory; |
|
7 |
|
|
8 | 3 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
9 | 4 |
import eu.dnetlib.msro.workflows.graph.Arc; |
10 | 5 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
... | ... | |
13 | 8 |
import eu.dnetlib.msro.workflows.procs.WorkflowProcess; |
14 | 9 |
import eu.dnetlib.rmi.enabling.ISRegistryException; |
15 | 10 |
import eu.dnetlib.rmi.enabling.ISRegistryService; |
11 |
import org.apache.commons.logging.Log; |
|
12 |
import org.apache.commons.logging.LogFactory; |
|
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
16 | 14 |
|
17 | 15 |
public class ValidateDatasourceJobNode extends SimpleJobNode implements ProcessAware { |
18 | 16 |
|
19 | 17 |
private static final Log log = LogFactory.getLog(ValidateDatasourceJobNode.class); |
20 |
@Resource
|
|
18 |
@Autowired
|
|
21 | 19 |
private UniqueServiceLocator serviceLocator; |
22 | 20 |
|
23 | 21 |
private WorkflowProcess process; |
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/BlackboardJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.workflows.nodes; |
2 | 2 |
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 |
import org.apache.commons.lang3.StringUtils; |
|
6 |
import org.apache.commons.logging.Log; |
|
7 |
import org.apache.commons.logging.LogFactory; |
|
8 |
|
|
9 | 3 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
10 | 4 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardClientHandler; |
11 | 5 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob; |
... | ... | |
15 | 9 |
import eu.dnetlib.msro.workflows.procs.Env; |
16 | 10 |
import eu.dnetlib.msro.workflows.procs.Token; |
17 | 11 |
import eu.dnetlib.msro.workflows.util.WorkflowsConstants; |
12 |
import org.apache.commons.lang3.StringUtils; |
Also available in: Unified diff
Chnaged Resource to Autowired