Revision 57578
Added by Konstantina Galouni over 4 years ago
IndicatorPath.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.uoamonitorservice.entities; |
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 |
import java.util.Map; |
|
4 | 5 |
|
5 | 6 |
enum IndicatorPathType { |
6 | 7 |
// Do not rename or remove existring values. This may cause problems with already stored values in DB |
7 |
table, bar, column; |
|
8 |
table, bar, column, pie, line, image;
|
|
8 | 9 |
} |
9 | 10 |
|
10 | 11 |
public class IndicatorPath { |
... | ... | |
12 | 13 |
private String source; // for numbers is the service {statistics, search, metrics} for charts is the tool {stats-tool,old,metrics, fake} |
13 | 14 |
private String url; |
14 | 15 |
private List<String> jsonPath; |
16 |
private String chartObject; |
|
17 |
private Map<String, String> parameters; |
|
18 |
private Map<String, Map<String, String>> filters; |
|
15 | 19 |
|
16 | 20 |
public IndicatorPathType getType() { |
17 | 21 |
return type; |
... | ... | |
44 | 48 |
public void setJsonPath(List<String> jsonPath) { |
45 | 49 |
this.jsonPath = jsonPath; |
46 | 50 |
} |
51 |
|
|
52 |
public String getChartObject() { |
|
53 |
return chartObject; |
|
54 |
} |
|
55 |
|
|
56 |
public void setChartObject(String chartObject) { |
|
57 |
this.chartObject = chartObject; |
|
58 |
} |
|
59 |
|
|
60 |
public Map<String, String> getParameters() { |
|
61 |
return parameters; |
|
62 |
} |
|
63 |
|
|
64 |
public void setParameters(Map<String, String> parameters) { |
|
65 |
this.parameters = parameters; |
|
66 |
} |
|
67 |
|
|
68 |
public Map<String, Map<String, String>> getFilters() { |
|
69 |
return filters; |
|
70 |
} |
|
71 |
|
|
72 |
public void setFilters(Map<String, Map<String, String>> filters) { |
|
73 |
this.filters = filters; |
|
74 |
} |
|
47 | 75 |
} |
Also available in: Unified diff
1. Stakeholder.java: Create constructor and copy constructor & change getters-setters for 'isDeafult', 'isPublic' and 'isActive' fields.
2. Topic.java: Create constructor and copy constructor & change getters-setters for 'isPublic' and 'isActive' fields.
3. Category.java: Create constructor and copy constructor & change getters-setters for 'isOverview, 'isPublic' and 'isActive' fields & remove field 'description'.
4. SubCategory.java: Create constructor and copy constructor & change getters-setters for 'isPublic' and 'isActive' fields & remove field 'description' &
make charts and numbers (List) generic (String or Indicator).
5. Indicator.java: Change getters-setters for 'indicatorPaths', 'isPublic' and 'isActive' fields & create method: public boolean hasType(String str), to check if "chart" or "number".
6. IndicatorPath.java: Add fields in schema (chartObject, parameters, filters) & add in enum IndicatorPathType types: pie, line, image.
7. MongoDBStakeholderDAO.java & StakeholderDAO.java: Add method: Stakeholder findByAlias(String Alias)
8. StakeholderController.java:
a. Add method: public Stakeholder setIndicatorsForStakeholder(Stakeholder stakeholder) to replace indicator ids with Indicator objects
(used by: getAllStakeholders, getAllDefaultStakeholders, getAllRealStakeholders, getStakeholder (by alias))
b. Add method: public Stakeholder getStakeholder(@PathVariable("alias") String alias) - /stakeholder/{alias}
c. Add method: public Stakeholder saveStakeholder(@RequestBody Stakeholder stakeholder) - /stakeholder/save
d. Add method: public boolean deleteIndicator(...) - /{stakeholder}/{topic}/{category}/{subcategory}/indicator/{id}
e. Add method: public Indicator saveIndicator(...) - /{stakeholder}/{topic}/{category}/{subcategory}/indicator/save (in body send Indicator object)