1 |
58021
|
konstantin
|
package eu.dnetlib.uoaadmintoolslibrary.controllers;
|
2 |
|
|
|
3 |
58031
|
konstantin
|
import eu.dnetlib.uoaadmintoolslibrary.entities.DivHelpContent;
|
4 |
59376
|
konstantin
|
import eu.dnetlib.uoaadmintoolslibrary.entities.Portal;
|
5 |
58031
|
konstantin
|
import eu.dnetlib.uoaadmintoolslibrary.entities.fullEntities.DivHelpContentResponse;
|
6 |
59376
|
konstantin
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
7 |
58031
|
konstantin
|
import eu.dnetlib.uoaadmintoolslibrary.services.DivHelpContentService;
|
8 |
|
|
|
9 |
59376
|
konstantin
|
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
10 |
58021
|
konstantin
|
import org.apache.log4j.Logger;
|
11 |
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
12 |
|
|
import org.springframework.web.bind.annotation.*;
|
13 |
|
|
|
14 |
|
|
import java.util.List;
|
15 |
|
|
|
16 |
|
|
@RestController
|
17 |
|
|
@CrossOrigin(origins = "*")
|
18 |
|
|
public class DivHelpContentController {
|
19 |
|
|
private final Logger log = Logger.getLogger(this.getClass());
|
20 |
|
|
|
21 |
|
|
@Autowired
|
22 |
58031
|
konstantin
|
private DivHelpContentService divHelpContentService;
|
23 |
58021
|
konstantin
|
|
24 |
59376
|
konstantin
|
@Autowired
|
25 |
|
|
private PortalService portalService;
|
26 |
58021
|
konstantin
|
|
27 |
59376
|
konstantin
|
// // not used by portals
|
28 |
|
|
// @RequestMapping(value = "/divhelpcontent", method = RequestMethod.GET)
|
29 |
|
|
// public List<DivHelpContentResponse> getDivHelpContents(@RequestParam(value = "portal", required = false) String pid,
|
30 |
|
|
// @RequestParam(value = "page", required = false) String page_route,
|
31 |
|
|
// @RequestParam(value = "divId", required = false) String divIdId,
|
32 |
|
|
// @RequestParam(required = false) String active) {
|
33 |
|
|
// return divHelpContentService.getDivHelpContents(pid, page_route, divIdId, active);
|
34 |
|
|
// }
|
35 |
|
|
//
|
36 |
|
|
// // not used by portals
|
37 |
|
|
// @RequestMapping(value = "/divhelpcontent/{id}", method = RequestMethod.GET)
|
38 |
|
|
// public DivHelpContent getDivHelpContent(@PathVariable(value = "id") String id) {
|
39 |
|
|
// return divHelpContentService.getDivHelpContent(id);
|
40 |
|
|
// }
|
41 |
|
|
//
|
42 |
|
|
// // not used by portals
|
43 |
|
|
// @RequestMapping(value = "/divhelpcontent", method = RequestMethod.POST)
|
44 |
|
|
// public DivHelpContent insertOrUpdateDivHelpContent(@RequestBody DivHelpContent divHelpContent) {
|
45 |
|
|
//
|
46 |
|
|
// return divHelpContentService.insertOrUpdateDivHelpContent(divHelpContent);
|
47 |
|
|
// }
|
48 |
|
|
//
|
49 |
|
|
// // not used by portals
|
50 |
|
|
// @RequestMapping(value = "/divhelpcontent/delete", method = RequestMethod.POST)
|
51 |
|
|
// public Boolean deleteDivHelpContents(@RequestBody List<String> divHelpContents) throws Exception {
|
52 |
|
|
// return divHelpContentService.deleteDivHelpContents(divHelpContents);
|
53 |
|
|
// }
|
54 |
|
|
//
|
55 |
|
|
// // not used by portals
|
56 |
|
|
// @RequestMapping(value = "/divhelpcontent/toggle", method = RequestMethod.POST)
|
57 |
|
|
// public List<String> toggleDivHelpContent(@RequestBody List<String> divHelpContents, @RequestParam String status) throws Exception {
|
58 |
|
|
// return divHelpContentService.toggleDivHelpContent(divHelpContents, status);
|
59 |
|
|
// }
|
60 |
|
|
//
|
61 |
|
|
// // not used by portals
|
62 |
|
|
// @RequestMapping(value = "/divhelpcontent/{id}", method = RequestMethod.DELETE)
|
63 |
|
|
// public void deleteDivHelpContent(@PathVariable(value = "id") String id) {
|
64 |
|
|
// divHelpContentService.deleteDivHelpContent(id);
|
65 |
|
|
// }
|
66 |
58021
|
konstantin
|
|
67 |
|
|
}
|