Revision 42621
Added by Sandro La Bruzzo almost 8 years ago
RepoInternalController.java | ||
---|---|---|
3 | 3 |
import java.util.Date; |
4 | 4 |
import java.util.List; |
5 | 5 |
import java.util.Map; |
6 |
|
|
7 | 6 |
import javax.annotation.Resource; |
8 | 7 |
|
9 |
import org.apache.commons.lang3.StringUtils; |
|
10 |
import org.apache.commons.logging.Log; |
|
11 |
import org.apache.commons.logging.LogFactory; |
|
12 |
import org.springframework.stereotype.Controller; |
|
13 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
14 |
import org.springframework.web.bind.annotation.RequestParam; |
|
15 |
import org.springframework.web.bind.annotation.ResponseBody; |
|
16 |
|
|
17 | 8 |
import com.google.gson.Gson; |
18 |
|
|
19 | 9 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
20 | 10 |
import eu.dnetlib.functionality.modular.ui.AbstractAjaxController; |
21 | 11 |
import eu.dnetlib.functionality.modular.ui.repositories.util.RepoUIUtils; |
... | ... | |
24 | 14 |
import eu.dnetlib.rmi.data.CollectorService; |
25 | 15 |
import eu.dnetlib.rmi.data.CollectorServiceException; |
26 | 16 |
import eu.dnetlib.rmi.data.ProtocolParameterValue; |
27 |
import eu.dnetlib.rmi.datasource.BrowseTerm; |
|
28 |
import eu.dnetlib.rmi.datasource.DatasourceDesc; |
|
29 |
import eu.dnetlib.rmi.datasource.DatasourceManagerService; |
|
30 |
import eu.dnetlib.rmi.datasource.DatasourceManagerServiceException; |
|
31 |
import eu.dnetlib.rmi.datasource.IfaceDesc; |
|
32 |
import eu.dnetlib.rmi.datasource.RepositoryMapEntry; |
|
33 |
import eu.dnetlib.rmi.datasource.SearchInterfacesEntry; |
|
34 |
import eu.dnetlib.rmi.datasource.SimpleDatasourceDesc; |
|
17 |
import eu.dnetlib.rmi.datasource.*; |
|
35 | 18 |
import net.sf.ehcache.Cache; |
36 | 19 |
import net.sf.ehcache.Element; |
20 |
import org.apache.commons.lang3.StringUtils; |
|
21 |
import org.apache.commons.logging.Log; |
|
22 |
import org.apache.commons.logging.LogFactory; |
|
23 |
import org.springframework.beans.factory.annotation.Autowired; |
|
24 |
import org.springframework.stereotype.Controller; |
|
25 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
26 |
import org.springframework.web.bind.annotation.RequestParam; |
|
27 |
import org.springframework.web.bind.annotation.ResponseBody; |
|
37 | 28 |
|
38 | 29 |
@Controller |
39 | 30 |
public class RepoInternalController extends AbstractAjaxController { |
40 | 31 |
|
41 |
@Resource |
|
32 |
private static final Log log = LogFactory.getLog(RepoInternalController.class); |
|
33 |
@Autowired |
|
42 | 34 |
private UniqueServiceLocator serviceLocator; |
43 |
|
|
44 |
@Resource |
|
35 |
@Autowired |
|
45 | 36 |
private WorkflowSectionGrouper workflowSectionGrouper; |
46 |
|
|
47 |
@Resource |
|
37 |
@Autowired |
|
48 | 38 |
private WorkflowExecutor workflowExecutor; |
49 |
|
|
50 |
@Resource |
|
39 |
@Autowired |
|
51 | 40 |
private RepoUIUtils repoUIUtils; |
52 |
|
|
53 | 41 |
@Resource(name = "repoUIJsonCache") |
54 | 42 |
private Cache repoUIJsonCache; |
55 | 43 |
|
56 |
private static final Log log = LogFactory.getLog(RepoInternalController.class); |
|
57 |
|
|
58 | 44 |
@RequestMapping(value = "/ui/browseRepoField.do") |
59 | 45 |
public @ResponseBody List<BrowseTerm> browseRepoField(@RequestParam(value = "field", required = true) final String field) throws Exception { |
60 | 46 |
return this.serviceLocator.getService(DatasourceManagerService.class).browseField(field); |
Also available in: Unified diff
Chnaged Resource to Autowired