Revision 59470
Added by Konstantina Galouni over 3 years ago
StatisticsController.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import eu.dnetlib.uoaadmintools.dao.*; |
4 | 4 |
import eu.dnetlib.uoaadmintools.entities.statistics.*; |
5 |
import eu.dnetlib.uoaadmintools.handlers.ContentNotFoundException; |
|
5 |
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
|
6 | 6 |
import org.apache.log4j.Logger; |
7 | 7 |
import org.springframework.beans.factory.annotation.Autowired; |
8 | 8 |
import org.springframework.web.bind.annotation.*; |
... | ... | |
70 | 70 |
public Statistics toggleCharts(@PathVariable(value = "pid") String pid, @PathVariable(value = "entity") String entity, @RequestBody String key, @RequestParam String status, @RequestParam String monitor) throws ContentNotFoundException { |
71 | 71 |
Statistics statistics = statisticsDAO.findByPid(pid); |
72 | 72 |
if(statistics == null){ |
73 |
throw new ContentNotFoundException("Statistics not found for community");
|
|
73 |
throw new ContentNotFoundException("Statistics not found for portal");
|
|
74 | 74 |
} |
75 | 75 |
StatisticsEntity statisticsEntity = statistics.getEntities().get(entity); |
76 | 76 |
if(statisticsEntity == null ){ |
... | ... | |
96 | 96 |
public Statistics toggleNumber(@PathVariable(value = "pid") String pid, @PathVariable(value = "entity") String entity, @RequestBody String key, @RequestParam String status, @RequestParam String monitor) throws ContentNotFoundException { |
97 | 97 |
Statistics statistics = statisticsDAO.findByPid(pid); |
98 | 98 |
if(statistics == null){ |
99 |
throw new ContentNotFoundException("Statistics not found for community");
|
|
99 |
throw new ContentNotFoundException("Statistics not found for portal");
|
|
100 | 100 |
} |
101 | 101 |
StatisticsEntity statisticsEntity = statistics.getEntities().get(entity); |
102 | 102 |
if(statisticsEntity == null ){ |
Also available in: Unified diff
[Trunk | Admin Tools]: Merging branch 'use-UoaAdminToolsLibrary' into trunk for revisions 58365:59468