Revision 57923
Added by Konstantina Galouni over 4 years ago
Stakeholder.java | ||
---|---|---|
23 | 23 |
private String index_id; |
24 | 24 |
private String index_name; |
25 | 25 |
private String index_shortName; |
26 |
private String logoUrl; |
|
26 | 27 |
private String alias; |
27 |
private boolean isDefaultProfile;
|
|
28 |
private String defaultId = null;
|
|
28 | 29 |
private boolean isActive; |
29 | 30 |
private boolean isPublic; |
30 | 31 |
private Date creationDate; |
... | ... | |
33 | 34 |
|
34 | 35 |
private List<StringOrTopic> topics; |
35 | 36 |
|
36 |
public Stakeholder() {} |
|
37 |
public Stakeholder() { |
|
38 |
|
|
39 |
} |
|
37 | 40 |
public Stakeholder(Stakeholder stakeholder) { |
38 | 41 |
id = stakeholder.getId(); |
39 |
type = stakeholder.getType();
|
|
42 |
setType(stakeholder.getType());
|
|
40 | 43 |
index_id = stakeholder.getIndex_id(); |
41 | 44 |
index_name = stakeholder.getIndex_name(); |
42 | 45 |
index_shortName = stakeholder.getIndex_shortName(); |
46 |
logoUrl = stakeholder.getLogoUrl(); |
|
43 | 47 |
alias = stakeholder.getAlias(); |
44 |
isDefaultProfile = stakeholder.getIsDefaultProfile();
|
|
48 |
defaultId = stakeholder.getDefaultId();
|
|
45 | 49 |
isActive = stakeholder.getIsActive(); |
46 | 50 |
isPublic = stakeholder.getIsPublic(); |
47 | 51 |
creationDate = stakeholder.getCreationDate(); |
... | ... | |
57 | 61 |
this.id = id; |
58 | 62 |
} |
59 | 63 |
|
60 |
public StakeholderType getType() { |
|
61 |
return type; |
|
64 |
// public StakeholderType getType() { |
|
65 |
// return type; |
|
66 |
// } |
|
67 |
// |
|
68 |
// public void setType(StakeholderType type) { |
|
69 |
// this.type = type; |
|
70 |
// } |
|
71 |
|
|
72 |
public String getType() { |
|
73 |
if(type == null) { |
|
74 |
return null; |
|
75 |
} |
|
76 |
return type.name(); |
|
62 | 77 |
} |
63 | 78 |
|
64 |
public void setType(StakeholderType type) { |
|
65 |
this.type = type; |
|
79 |
public void setType(String type) { |
|
80 |
if(type == null) { |
|
81 |
this.type = null; |
|
82 |
} else { |
|
83 |
StakeholderType stakeholderType = StakeholderType.valueOf(type); |
|
84 |
this.type = stakeholderType; |
|
85 |
} |
|
66 | 86 |
} |
67 | 87 |
|
68 | 88 |
public String getIndex_id() { |
... | ... | |
89 | 109 |
this.index_shortName = index_shortName; |
90 | 110 |
} |
91 | 111 |
|
112 |
public String getLogoUrl() { |
|
113 |
return logoUrl; |
|
114 |
} |
|
115 |
|
|
116 |
public void setLogoUrl(String logoUrl) { |
|
117 |
this.logoUrl = logoUrl; |
|
118 |
} |
|
119 |
|
|
92 | 120 |
public String getAlias() { |
93 | 121 |
return alias; |
94 | 122 |
} |
... | ... | |
97 | 125 |
this.alias = alias; |
98 | 126 |
} |
99 | 127 |
|
100 |
public boolean getIsDefaultProfile() {
|
|
101 |
return isDefaultProfile;
|
|
128 |
public String getDefaultId() {
|
|
129 |
return defaultId;
|
|
102 | 130 |
} |
103 | 131 |
|
104 |
public void setIsDefaultProfile(boolean isDefaultProfile) {
|
|
105 |
this.isDefaultProfile = isDefaultProfile;
|
|
132 |
public void setDefaultId(String defaultId) {
|
|
133 |
this.defaultId = defaultId;
|
|
106 | 134 |
} |
107 | 135 |
|
108 | 136 |
public boolean getIsActive() { |
Also available in: Unified diff
1. pom.xml: Add dependency for "uoa-help-texts-library" (will be renamed).
2. UoaMonitorServiceApplication.java: Add @PropertySource path used in dl170.
3. MongoConnection.java: @EnableMongoRepositories not only from: eu.dnetlib.uoamonitorservice.dao, but also: eu.dnetlib.uoahelptexts.dao.
4. GoogleConfig.java & MailConfig.java: [Deleted]: Functionality available on library project.
5. EmailController.java: [New]: Used for contact-us page in portal.
6. ExceptionsHandler.java & /controllers/: Add more and detailed logs.
7. Stakeholder.java:
a. Field 'logoUrl' added.
b. Method 'getType()' returns type.name() and 'setType()' gets String and converts it into StakeholderType.
8. Topic.java & Category.java & SubCategory.java & Indicator.java:
a. Field 'boolean isDefault' changed to 'String defaultId'.
b. Method copyFromDefault() added to create a clone from default entity (topic, category, subcategory, indicator).
9. Category.java & SubCategory.java: Field 'String description' added.
10. SubCategory.java: Field 'String stakeholderId' added | method createOverviewSubCategory(Category) added.
11. Indicator.java & IndicatorPath.java: Method 'getType()' returns type.name() and 'setType()' gets String and converts it into IndicatorType / IndicatorPathType.
12. IndicatorPath.java: Constructor and copy constructor added.
13. StakeholderDAO.java & MongoDBStakeholderDAO.java:
a. Method findByIsDefaultProfile() changed to: findByDefaultId() & findByDefaultIdNot().
b. Method findByIsDefaultProfileAndType() changed to: findByDefaultIdAndType() & findByDefaultIdNotAndType().
14. SubCategoryDAO.java & MongoDBSubCategoryDAO.java & IndicatorDAO.java & MongoDBSubCategoryDAO.java: Method 'findByDefaultId()' added.
15. StakeholderController.java: Handle creationDate and updateDate | Add more exceptional cases.
16. TopicController.java:
a. Helper method 'onSaveDefaultTopic()' added (save cloned topic on stakeholders based on this default Stakeholder).
b. Helper method 'onUpdateDefaultTopic()' added (update cloned topics based on this default topic).
17. CategoryController.java:
a. Remove 'subCategory.setIsDefault(true);' when a category is created.
b. Helper method 'onSaveDefaultCategory()' added (save cloned category on topics based on this default Topic).
c. Helper method 'onUpdateDefaultCategory()' added (update cloned categories based on this default category).
18. SubCategoryController.java:
a. Helper method 'onSaveDefaultSubCategory()' added (save cloned subCategory on topics based on this default Category).
b. Helper method 'onUpdateDefaultSubCategory()' added (update cloned subCategories based on this default subCategory).
19. IndicatorController.java:
a. Helper method 'onSaveDefaultIndicator()' added (save cloned indicator on subCategories based on this default SubCategory).
b. Helper method 'onUpdateDefaultIndicator()' added (update cloned indicators based on this default indicator).
c. Helper method 'parameterMapping()' added to map correct parameter values on parameters depending on stakeholder info.
d. Method 'toggleIndicatorStatus()' added to toggle 'isActive' field.
e. Method 'toggleIndicatorAccess()' added to toggle 'isPublic' field.
f. Helper method 'toggleIndicator()' added to update indicator when a field is toggled.