Revert properties. Remove some comments. Remove mongodb DAOs. Move primitives classes and enums to new package primitives.
This commit is contained in:
parent
76c39d6eb3
commit
1158b676e4
|
@ -1,10 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.controllers;
|
||||
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ForbiddenException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||
import eu.dnetlib.uoamonitorservice.dao.*;
|
||||
import eu.dnetlib.uoamonitorservice.dao.CategoryDAO;
|
||||
import eu.dnetlib.uoamonitorservice.dao.StakeholderDAO;
|
||||
import eu.dnetlib.uoamonitorservice.dao.SubCategoryDAO;
|
||||
import eu.dnetlib.uoamonitorservice.dao.TopicDAO;
|
||||
import eu.dnetlib.uoamonitorservice.entities.*;
|
||||
import eu.dnetlib.uoamonitorservice.handlers.EntityNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ForbiddenException;
|
||||
import eu.dnetlib.uoamonitorservice.handlers.PathNotValidException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -152,9 +155,6 @@ public class CategoryController {
|
|||
|
||||
categoryFull.setId(category.getId());
|
||||
}
|
||||
|
||||
subCategories = null;
|
||||
category = null;
|
||||
} else {
|
||||
// EXCEPTION - Topic not found in Stakeholder: stakeholder.getAlias();
|
||||
throw new PathNotValidException("Save category: Topic with id: " + topicId + " not found in Stakeholder: " + stakeholderId);
|
||||
|
@ -211,12 +211,8 @@ public class CategoryController {
|
|||
}
|
||||
|
||||
if (!changed) {
|
||||
// break;
|
||||
continue;
|
||||
}
|
||||
|
||||
// categoryBasedOnDefault.setName(category.getName());
|
||||
// categoryBasedOnDefault.setDescription(category.getDescription());
|
||||
categoryBasedOnDefault.setUpdateDate(category.getUpdateDate());
|
||||
categoryDAO.save(categoryBasedOnDefault);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,10 @@ import org.apache.logging.log4j.Logger;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
package eu.dnetlib.uoamonitorservice.controllers;
|
||||
|
||||
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ForbiddenException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||
import eu.dnetlib.uoamonitorservice.dao.*;
|
||||
import eu.dnetlib.uoamonitorservice.entities.*;
|
||||
import eu.dnetlib.uoamonitorservice.handlers.EntityNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ForbiddenException;
|
||||
import eu.dnetlib.uoamonitorservice.handlers.PathNotValidException;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.IndicatorPath;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.ReorderEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -63,8 +65,6 @@ public class IndicatorController {
|
|||
Date date = new Date();
|
||||
|
||||
createSectionsAndSaveBulk(date, sections, stakeholder, topicId, categoryId, subcategoryId);
|
||||
// createSectionAndSaveBulk(date, "number", "Numbers imported from file", number_indicators, stakeholder, topicId, categoryId, subcategoryId);
|
||||
|
||||
return stakeholderController.setFullEntities(stakeholder);
|
||||
}
|
||||
|
||||
|
@ -126,10 +126,6 @@ public class IndicatorController {
|
|||
return section;
|
||||
}
|
||||
|
||||
// private void saveIndicatorAndAddInSection(Indicator indicator, Date date, Stakeholder stakeholder, Section section, List<String> indicators) throws UnsupportedEncodingException {
|
||||
// saveIndicatorAndAddInSection(indicator, date, stakeholder, section, indicators);
|
||||
// }
|
||||
|
||||
private void saveIndicatorAndAddInSection(Indicator indicator, Date date, Stakeholder stakeholder, String subcategoryId, Section section, List<String> indicators) throws UnsupportedEncodingException {
|
||||
// indicator does not exist in DB
|
||||
indicator.setCreationDate(date);
|
||||
|
@ -181,8 +177,7 @@ public class IndicatorController {
|
|||
if (indicatorId == null) {
|
||||
indicatorDAO.save(indicator);
|
||||
onSaveDefaultIndicator(indicator, section, subcategoryId);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
onUpdateDefaultIndicator(indicator, stakeholder, oldIndicator);
|
||||
indicatorDAO.save(indicator);
|
||||
}
|
||||
|
@ -240,9 +235,6 @@ public class IndicatorController {
|
|||
|
||||
for (Indicator indicatorBasedOnDefault : indicators) {
|
||||
changed = false;
|
||||
|
||||
// if(indicator.getName() != null && !indicator.getName().equals(indicatorBasedOnDefault.getName())
|
||||
// && (oldIndicator.getName() == null || oldIndicator.getName().equals(indicatorBasedOnDefault.getName()))) {
|
||||
if ((
|
||||
(indicator.getName() == null && oldIndicator.getName() != null)
|
||||
||
|
||||
|
@ -262,9 +254,6 @@ public class IndicatorController {
|
|||
indicatorBasedOnDefault.setDescription(indicator.getDescription());
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// if(indicator.getAdditionalDescription() != null && !indicator.getAdditionalDescription().equals(indicatorBasedOnDefault.getAdditionalDescription())
|
||||
// && (oldIndicator.getAdditionalDescription() == null || oldIndicator.getAdditionalDescription().equals(indicatorBasedOnDefault.getAdditionalDescription()))) {
|
||||
if ((
|
||||
(indicator.getAdditionalDescription() == null && oldIndicator.getAdditionalDescription() != null)
|
||||
||
|
||||
|
@ -300,10 +289,6 @@ public class IndicatorController {
|
|||
|
||||
// Check if there are changes in indicator path and update existing indicators if needed
|
||||
log.debug("update indicator path: " + i + " (indicator id: " + indicatorBasedOnDefault.getId() + ")");
|
||||
|
||||
// if(indicatorPath.getType() != null
|
||||
// && !indicatorPath.getType().equals(indicatorPathBasedOnDefault.getType())
|
||||
// && (oldIndicatorPath.getType().equals(indicatorPathBasedOnDefault.getType()))) {
|
||||
if ((
|
||||
(indicatorPath.getType() == null && oldIndicatorPath.getType() != null)
|
||||
||
|
||||
|
@ -331,10 +316,6 @@ public class IndicatorController {
|
|||
changed = true;
|
||||
}
|
||||
log.debug("After type check: " + changed);
|
||||
|
||||
// if(indicatorPath.getSource() != null
|
||||
// && !indicatorPath.getSource().equals(indicatorPathBasedOnDefault.getSource())
|
||||
// && (oldIndicatorPath.getSource().equals(indicatorPathBasedOnDefault.getSource()))) {
|
||||
if ((
|
||||
(indicatorPath.getSource() == null && oldIndicatorPath.getSource() != null)
|
||||
||
|
||||
|
@ -348,10 +329,6 @@ public class IndicatorController {
|
|||
changed = true;
|
||||
}
|
||||
log.debug("After source check: " + changed);
|
||||
|
||||
// if(indicatorPath.getUrl() != null
|
||||
// && !indicatorPath.getUrl().equals(indicatorPathBasedOnDefault.getUrl())
|
||||
// && (oldIndicatorPath.getUrl().equals(indicatorPathBasedOnDefault.getUrl()))) {
|
||||
if ((
|
||||
(indicatorPath.getUrl() == null && oldIndicatorPath.getUrl() != null)
|
||||
||
|
||||
|
@ -385,8 +362,6 @@ public class IndicatorController {
|
|||
if (indicatorPathBasedOnDefault.getParameters() == null) {
|
||||
indicatorPathBasedOnDefault.setParameters(new HashMap<>());
|
||||
}
|
||||
//if (indicatorPath.getParameters().size() != indicatorPathBasedOnDefault.getParameters().size()) {
|
||||
//log.debug("Different number of parameters");
|
||||
for (Map.Entry<String, String> parameter : indicatorPath.getParameters().entrySet()) {
|
||||
log.debug("\nindicatorPath: parameter.getKey(): " + parameter.getKey() + " - value: " + parameter.getValue()
|
||||
+ "\nindicatorPathBasedOnDefault:parameters:key: " + indicatorPathBasedOnDefault.getParameters().get(parameter.getKey())
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Category;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CategoryDAO {
|
||||
@Repository
|
||||
public interface CategoryDAO extends MongoRepository<Category, String> {
|
||||
List<Category> findAll();
|
||||
List<Category> findByDefaultId(String DefaultId);
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Indicator;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IndicatorDAO {
|
||||
@Repository
|
||||
public interface IndicatorDAO extends MongoRepository<Indicator, String> {
|
||||
List<Indicator> findAll();
|
||||
List<Indicator> findByDefaultId(String DefaultId);
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Category;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MongoDBCategoryDAO extends CategoryDAO, MongoRepository<Category, String> {
|
||||
List<Category> findAll();
|
||||
List<Category> findByDefaultId(String DefaultId);
|
||||
|
||||
Category findBySubCategoriesContaining(String subCategory);
|
||||
|
||||
Category findById(String Id);
|
||||
|
||||
void delete(String Id);
|
||||
|
||||
Category save(Category category);
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Indicator;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MongoDBIndicatorDAO extends IndicatorDAO, MongoRepository<Indicator, String> {
|
||||
List<Indicator> findAll();
|
||||
List<Indicator> findByDefaultId(String DefaultId);
|
||||
|
||||
Indicator findById(String Id);
|
||||
|
||||
void delete(String Id);
|
||||
|
||||
Indicator save(Indicator indicator);
|
||||
//List<Indicator> saveAll(List<Indicator> indicators);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Section;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MongoDBSectionDAO extends SectionDAO, MongoRepository<Section, String> {
|
||||
List<Section> findAll();
|
||||
List<Section> findByDefaultId(String DefaultId);
|
||||
|
||||
Section findById(String Id);
|
||||
|
||||
void delete(String Id);
|
||||
|
||||
Section save(Section indicator);
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Stakeholder;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MongoDBStakeholderDAO extends StakeholderDAO, MongoRepository<Stakeholder, String> {
|
||||
List<Stakeholder> findAll();
|
||||
List<Stakeholder> findByType(String Type);
|
||||
|
||||
List<Stakeholder> findByDefaultId(String DefaultId);
|
||||
List<Stakeholder> findByDefaultIdAndType(String DefaultId, String Type);
|
||||
|
||||
List<Stakeholder> findByDefaultIdNot(String DefaultId);
|
||||
List<Stakeholder> findByDefaultIdNotAndType(String DefaultId, String Type);
|
||||
|
||||
Stakeholder findByTopicsContaining(String topic);
|
||||
|
||||
Stakeholder findById(String Id);
|
||||
Stakeholder findByAlias(String Alias);
|
||||
|
||||
void delete(String Id);
|
||||
|
||||
Stakeholder save(Stakeholder stakeholder);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.SubCategory;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MongoDBSubCategoryDAO extends SubCategoryDAO, MongoRepository<SubCategory, String> {
|
||||
List<SubCategory> findAll();
|
||||
List<SubCategory> findByDefaultId(String DefaultId);
|
||||
|
||||
SubCategory findById(String Id);
|
||||
|
||||
void delete(String Id);
|
||||
|
||||
SubCategory save(SubCategory subCategory);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Topic;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MongoDBTopicDAO extends TopicDAO, MongoRepository<Topic, String> {
|
||||
List<Topic> findAll();
|
||||
List<Topic> findByDefaultId(String DefaultId);
|
||||
|
||||
Topic findByCategoriesContaining(String category);
|
||||
|
||||
Topic findById(String Id);
|
||||
|
||||
void delete(String Id);
|
||||
|
||||
Topic save(Topic topic);
|
||||
}
|
|
@ -1,10 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Section;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SectionDAO {
|
||||
@Repository
|
||||
public interface SectionDAO extends MongoRepository<Section, String> {
|
||||
List<Section> findAll();
|
||||
List<Section> findByDefaultId(String DefaultId);
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Stakeholder;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StakeholderDAO {
|
||||
@Repository
|
||||
public interface StakeholderDAO extends MongoRepository<Stakeholder, String> {
|
||||
List<Stakeholder> findAll();
|
||||
List<Stakeholder> findByType(String Type);
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.SubCategory;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SubCategoryDAO {
|
||||
@Repository
|
||||
public interface SubCategoryDAO extends MongoRepository<SubCategory, String> {
|
||||
List<SubCategory> findAll();
|
||||
List<SubCategory> findByDefaultId(String DefaultId);
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.dao;
|
||||
|
||||
import eu.dnetlib.uoamonitorservice.entities.Topic;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TopicDAO {
|
||||
@Repository
|
||||
public interface TopicDAO extends MongoRepository<Topic, String> {
|
||||
List<Topic> findAll();
|
||||
List<Topic> findByDefaultId(String DefaultId);
|
||||
|
||||
|
|
|
@ -1,23 +1,14 @@
|
|||
package eu.dnetlib.uoamonitorservice.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.IndicatorPath;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.IndicatorSize;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.IndicatorType;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
enum IndicatorType {
|
||||
// Do not rename or remove existring values. This may cause problems with already stored values in DB
|
||||
number, chart,
|
||||
NUMBER, CHART;
|
||||
}
|
||||
|
||||
enum IndicatorSize {
|
||||
// Do not rename or remove existring values. This may cause problems with already stored values in DB
|
||||
small, medium, large,
|
||||
SMALL, MEDIUM, LARGE;
|
||||
}
|
||||
|
||||
public class Indicator {
|
||||
@Id
|
||||
@JsonProperty("_id")
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
package eu.dnetlib.uoamonitorservice.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.IndicatorType;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
enum SectionType {
|
||||
// Do not rename or remove existring values. This may cause problems with already stored values in DB
|
||||
number, chart,
|
||||
NUMBER, CHART;
|
||||
}
|
||||
|
||||
public class Section<StringOrIndicator> {
|
||||
@Id
|
||||
@JsonProperty("_id")
|
||||
|
@ -21,7 +16,7 @@ public class Section<StringOrIndicator> {
|
|||
private String title;
|
||||
private String defaultId;
|
||||
private String stakeholderAlias;
|
||||
private SectionType type;
|
||||
private IndicatorType type;
|
||||
private Date creationDate;
|
||||
private Date updateDate;
|
||||
private List<StringOrIndicator> indicators;
|
||||
|
@ -90,8 +85,7 @@ public class Section<StringOrIndicator> {
|
|||
if(type == null) {
|
||||
this.type = null;
|
||||
} else {
|
||||
SectionType sectionType = SectionType.valueOf(type);
|
||||
this.type = sectionType;
|
||||
this.type = IndicatorType.valueOf(type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,32 +1,14 @@
|
|||
package eu.dnetlib.uoamonitorservice.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.Locale;
|
||||
import eu.dnetlib.uoamonitorservice.primitives.StakeholderType;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
enum StakeholderType
|
||||
{
|
||||
// Do not rename or remove existing values. This may cause problems with already stored values in DB
|
||||
funder, ri, project, organization,
|
||||
country, researcher, datasource,
|
||||
FUNDER, RI, PROJECT, ORGANIZATION,
|
||||
COUNTRY, RESEARCHER, DATASOURCE;
|
||||
}
|
||||
|
||||
enum Locale {
|
||||
EN("en"), EU("eu");
|
||||
|
||||
public final String label;
|
||||
|
||||
Locale(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Stakeholder<StringOrTopic> {
|
||||
@Id
|
||||
@JsonProperty("_id")
|
||||
|
@ -84,14 +66,6 @@ public class Stakeholder<StringOrTopic> {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
// public StakeholderType getType() {
|
||||
// return type;
|
||||
// }
|
||||
//
|
||||
// public void setType(StakeholderType type) {
|
||||
// this.type = type;
|
||||
// }
|
||||
|
||||
public String getType() {
|
||||
if(type == null) {
|
||||
return null;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
public enum Format {
|
||||
NUMBER, PERCENTAGE
|
||||
}
|
|
@ -1,22 +1,8 @@
|
|||
package eu.dnetlib.uoamonitorservice.entities;
|
||||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
enum IndicatorPathType {
|
||||
// Do not rename or remove existring values. This may cause problems with already stored values in DB
|
||||
table, bar, column, pie, line, other,
|
||||
TABLE, BAR, COLUMN, PIE, LINE, OTHER;
|
||||
}
|
||||
|
||||
//enum SourceType {
|
||||
// STATISTICS, SEARCH, METRICS, STATS_TOOL,OLD,IMAGE;
|
||||
//}
|
||||
|
||||
enum Format {
|
||||
NUMBER, PERCENTAGE
|
||||
}
|
||||
|
||||
public class IndicatorPath {
|
||||
private IndicatorPathType type; // for charts is type of chart {table, bar, column, etc}
|
||||
private Format format = Format.NUMBER; // for numbers is if number is percentage or not
|
|
@ -0,0 +1,7 @@
|
|||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
public enum IndicatorPathType {
|
||||
// Do not rename or remove existing values. This may cause problems with already stored values in DB
|
||||
table, bar, column, pie, line, other,
|
||||
TABLE, BAR, COLUMN, PIE, LINE, OTHER;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
public enum IndicatorSize {
|
||||
// Do not rename or remove existring values. This may cause problems with already stored values in DB
|
||||
small, medium, large,
|
||||
SMALL, MEDIUM, LARGE;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
public enum IndicatorType {
|
||||
// Do not rename or remove existing values. This may cause problems with already stored values in DB
|
||||
number, chart,
|
||||
NUMBER, CHART;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
public enum Locale {
|
||||
EN("en"), EU("eu");
|
||||
|
||||
public final String label;
|
||||
|
||||
Locale(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.uoamonitorservice.entities;
|
||||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package eu.dnetlib.uoamonitorservice.primitives;
|
||||
|
||||
public enum StakeholderType {
|
||||
// Do not rename or remove existing values. This may cause problems with already stored values in DB
|
||||
funder, ri, project, organization,
|
||||
country, researcher, datasource,
|
||||
FUNDER, RI, PROJECT, ORGANIZATION,
|
||||
COUNTRY, RESEARCHER, DATASOURCE;
|
||||
}
|
|
@ -25,31 +25,3 @@ monitorservice.globalVars.version=@version@
|
|||
#production
|
||||
#monitorservice.userInfoUrl = https://services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=
|
||||
#monitorservice.originServer = .openaire.eu
|
||||
|
||||
# Monitor
|
||||
monitorservice.mongodb.host=localhost
|
||||
monitorservice.mongodb.port=27017
|
||||
monitorservice.mongodb.database=production
|
||||
|
||||
# Notification
|
||||
notification.mongodb.host = localhost
|
||||
notification.mongodb.port = 27017
|
||||
notification.mongodb.database = openaire_notification
|
||||
|
||||
# Admin Tools Library
|
||||
admintoolslibrary.mail.from = openaire.test@gmail.com
|
||||
admintoolslibrary.mail.username = openaire.test@gmail.com
|
||||
admintoolslibrary.mail.password = koujreltgjduicjp
|
||||
admintoolslibrary.mail.host = smtp.gmail.com
|
||||
admintoolslibrary.mail.port = 587
|
||||
admintoolslibrary.mail.auth = true
|
||||
admintoolslibrary.mail.sslProtocols = TLSv1.2
|
||||
admintoolslibrary.mail.defaultEncoding=UTF-8
|
||||
admintoolslibrary.mail.protocol=smtp
|
||||
admintoolslibrary.mail.testConnection=false
|
||||
admintoolslibrary.google.secret = 6LcVtFIUAAAAAIlEaz6Am2PBC3j5lHG7vBo6uW4_
|
||||
|
||||
# Authorization
|
||||
authorization.security.userInfoUrl = http://mpagasas.di.uoa.gr:19080/login-service/userInfo
|
||||
|
||||
server.port=8888
|
Loading…
Reference in New Issue