diff --git a/dmp-backend/pom.xml b/dmp-backend/pom.xml
index de4496fa1..0f003e93e 100644
--- a/dmp-backend/pom.xml
+++ b/dmp-backend/pom.xml
@@ -5,19 +5,19 @@
dmp-backend
dmp-backend
0.0.1-SNAPSHOT
-
-
- org.springframework.boot
- spring-boot-starter-parent
- 1.5.9.RELEASE
-
-
- 1.19.0
- 1.19.0
+ ${packaging.type}
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 1.5.9.RELEASE
+
+
+ 1.19.0
+ 1.19.0
- 0.0.1-SNAPSHOT
- 4.3.8.RELEASE
-
+ 0.0.1-SNAPSHOT
+ 4.3.8.RELEASE
+
4.2.3.RELEASE
1.19.1
7.0.35
@@ -179,7 +179,6 @@
1.1.2.RELEASE
-
org.apache.commons
@@ -187,11 +186,6 @@
3.5
-
@@ -203,9 +197,7 @@
-
-
org.apache.maven.plugins
maven-compiler-plugin
@@ -214,10 +206,32 @@
1.8
-
-
${project.artifactId}
-
+
+
+
+ devel
+
+ true
+
+
+ jar
+
+
+
+ production
+
+ war
+
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+ provided
+
+
+
+
\ No newline at end of file
diff --git a/dmp-backend/src/main/java/eu/eudat/configurations/DatabaseConfiguration.java b/dmp-backend/src/main/java/eu/eudat/configurations/DevelDatabaseConfiguration.java
similarity index 88%
rename from dmp-backend/src/main/java/eu/eudat/configurations/DatabaseConfiguration.java
rename to dmp-backend/src/main/java/eu/eudat/configurations/DevelDatabaseConfiguration.java
index 1e0f30662..e1f5bcbb8 100644
--- a/dmp-backend/src/main/java/eu/eudat/configurations/DatabaseConfiguration.java
+++ b/dmp-backend/src/main/java/eu/eudat/configurations/DevelDatabaseConfiguration.java
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
import org.springframework.core.env.Environment;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
@@ -20,8 +21,9 @@ import java.util.Properties;
@Configuration
@EnableTransactionManagement
+@Profile("devel")
@ComponentScan(basePackages = {"eu.eudat.entities"})
-public class DatabaseConfiguration {
+public class DevelDatabaseConfiguration {
@Autowired
private Environment env;
@@ -42,9 +44,9 @@ public class DatabaseConfiguration {
public DataSource dataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(env.getProperty("database.driver-class-name"));
- dataSource.setUrl(env.getProperty("database.url"));
- dataSource.setUsername(env.getProperty("database.username"));
- dataSource.setPassword(env.getProperty("database.password"));
+ dataSource.setUrl(env.getProperty("devel.database.url"));
+ dataSource.setUsername(env.getProperty("devel.database.username"));
+ dataSource.setPassword(env.getProperty("devel.database.password"));
return dataSource;
}
diff --git a/dmp-backend/src/main/java/eu/eudat/configurations/ProductionDatabaseConfiguration.java b/dmp-backend/src/main/java/eu/eudat/configurations/ProductionDatabaseConfiguration.java
new file mode 100644
index 000000000..82e29745a
--- /dev/null
+++ b/dmp-backend/src/main/java/eu/eudat/configurations/ProductionDatabaseConfiguration.java
@@ -0,0 +1,76 @@
+package eu.eudat.configurations;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.core.env.Environment;
+import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
+import org.springframework.jdbc.datasource.DriverManagerDataSource;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.JpaVendorAdapter;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManagerFactory;
+import javax.sql.DataSource;
+import java.util.Properties;
+
+/**
+ * Created by ikalyvas on 2/9/2018.
+ */
+@Configuration
+@EnableTransactionManagement
+@Profile("production")
+@ComponentScan(basePackages = {"eu.eudat.entities"})
+public class ProductionDatabaseConfiguration {
+
+ @Autowired
+ private Environment env;
+
+ @Bean
+ public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
+ LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
+ em.setDataSource(dataSource());
+ em.setPackagesToScan(new String[]{"eu.eudat.entities"});
+ JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
+ em.setJpaVendorAdapter(vendorAdapter);
+ em.setJpaProperties(additionalProperties());
+
+ return em;
+ }
+
+ @Bean
+ public DataSource dataSource() {
+ DriverManagerDataSource dataSource = new DriverManagerDataSource();
+ dataSource.setDriverClassName(env.getProperty("database.driver-class-name"));
+ dataSource.setUrl(env.getProperty("production.database.url"));
+ dataSource.setUsername(env.getProperty("production.database.username"));
+ dataSource.setPassword(env.getProperty("production.database.password"));
+ return dataSource;
+ }
+
+ @Bean
+ public PlatformTransactionManager transactionManager(EntityManagerFactory emf) {
+ JpaTransactionManager transactionManager = new JpaTransactionManager();
+ transactionManager.setEntityManagerFactory(emf);
+
+ return transactionManager;
+ }
+
+ @Bean
+ public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
+ return new PersistenceExceptionTranslationPostProcessor();
+ }
+
+ private Properties additionalProperties() {
+ Properties properties = new Properties();
+ properties.setProperty("hibernate.dialect", "org.hibernate.dialect.PostgreSQL92Dialect");
+ properties.setProperty("hibernate.show_sql", "true");
+ properties.setProperty("hibernate.temp.use_jdbc_metadata_defaults","false");
+ return properties;
+ }
+}
\ No newline at end of file
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Admin.java b/dmp-backend/src/main/java/eu/eudat/controllers/Admin.java
index 0519137c7..e14eb9d67 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Admin.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Admin.java
@@ -32,6 +32,7 @@ import static eu.eudat.types.Authorities.ADMIN;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class Admin extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/DMPs.java b/dmp-backend/src/main/java/eu/eudat/controllers/DMPs.java
index 71b9b3a36..caee7dee1 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/DMPs.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/DMPs.java
@@ -28,6 +28,7 @@ import eu.eudat.managers.DataManagementPlanManager;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class DMPs extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/DashBoardController.java b/dmp-backend/src/main/java/eu/eudat/controllers/DashBoardController.java
index 71cc178fc..f56cdb957 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/DashBoardController.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/DashBoardController.java
@@ -20,6 +20,7 @@ import eu.eudat.models.dashboard.DashBoardStatistics;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class DashBoardController extends BaseController{
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/DataRepositories.java b/dmp-backend/src/main/java/eu/eudat/controllers/DataRepositories.java
index 6c52724a2..f545ef855 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/DataRepositories.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/DataRepositories.java
@@ -22,6 +22,7 @@ import eu.eudat.proxy.config.exceptions.NoURLFound;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class DataRepositories extends BaseController{
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfileController.java b/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfileController.java
index 3c0b6c114..5450245ec 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfileController.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfileController.java
@@ -30,6 +30,7 @@ import eu.eudat.models.properties.PropertiesModel;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class DatasetProfileController extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfiles.java b/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfiles.java
index 6b249de2c..3dcdd92b6 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfiles.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/DatasetProfiles.java
@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class DatasetProfiles extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/DatasetWizardController.java b/dmp-backend/src/main/java/eu/eudat/controllers/DatasetWizardController.java
index 3cfbcbf09..d2fbcbcbf 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/DatasetWizardController.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/DatasetWizardController.java
@@ -23,7 +23,7 @@ import java.util.List;
@RestController
@CrossOrigin
-@RequestMapping(value = {"/datasetwizard"})
+@RequestMapping(value = {"api/datasetwizard"})
public class DatasetWizardController extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Datasets.java b/dmp-backend/src/main/java/eu/eudat/controllers/Datasets.java
index 5ea052fbb..76650fb9e 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Datasets.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Datasets.java
@@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class Datasets extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/ExternalDatasets.java b/dmp-backend/src/main/java/eu/eudat/controllers/ExternalDatasets.java
index 4488cf157..9b311dac1 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/ExternalDatasets.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/ExternalDatasets.java
@@ -19,6 +19,7 @@ import java.util.UUID;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class ExternalDatasets extends BaseController{
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Login.java b/dmp-backend/src/main/java/eu/eudat/controllers/Login.java
index 22bdf65f3..9480fb5fb 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Login.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Login.java
@@ -21,7 +21,7 @@ import javax.transaction.Transactional;
@RestController
@CrossOrigin
-@RequestMapping(value = "/auth")
+@RequestMapping(value = "api/auth")
public class Login {
private CustomAuthenticationProvider customAuthenticationProvider;
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Organisations.java b/dmp-backend/src/main/java/eu/eudat/controllers/Organisations.java
index 614c32608..400358dbf 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Organisations.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Organisations.java
@@ -23,6 +23,7 @@ import eu.eudat.proxy.config.exceptions.NoURLFound;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class Organisations extends BaseController{
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Projects.java b/dmp-backend/src/main/java/eu/eudat/controllers/Projects.java
index 1378c6169..47a0cac2c 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Projects.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Projects.java
@@ -40,6 +40,7 @@ import static eu.eudat.types.Authorities.USER;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class Projects extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Registries.java b/dmp-backend/src/main/java/eu/eudat/controllers/Registries.java
index df85b1a2a..884b16cad 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Registries.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Registries.java
@@ -23,6 +23,7 @@ import eu.eudat.proxy.config.exceptions.NoURLFound;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class Registries extends BaseController{
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Researchers.java b/dmp-backend/src/main/java/eu/eudat/controllers/Researchers.java
index 229c0d3cf..f9ac0b774 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Researchers.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Researchers.java
@@ -23,6 +23,8 @@ import eu.eudat.proxy.config.exceptions.NoURLFound;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
+
public class Researchers extends BaseController{
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Services.java b/dmp-backend/src/main/java/eu/eudat/controllers/Services.java
index 98e315b46..729547ed9 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Services.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Services.java
@@ -23,6 +23,7 @@ import eu.eudat.proxy.config.exceptions.NoURLFound;
@RestController
@CrossOrigin
+@RequestMapping(value = {"/api"})
public class Services extends BaseController{
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/UserInvitationController.java b/dmp-backend/src/main/java/eu/eudat/controllers/UserInvitationController.java
index 275c567e5..005c2fb5d 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/UserInvitationController.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/UserInvitationController.java
@@ -19,7 +19,7 @@ import java.util.List;
import java.util.UUID;
-@RequestMapping("invite/")
+@RequestMapping("api/invite/")
@RestController
@CrossOrigin
public class UserInvitationController extends BaseController{
diff --git a/dmp-backend/src/main/java/eu/eudat/controllers/Users.java b/dmp-backend/src/main/java/eu/eudat/controllers/Users.java
index 6ef6b17da..b0edbc7e2 100644
--- a/dmp-backend/src/main/java/eu/eudat/controllers/Users.java
+++ b/dmp-backend/src/main/java/eu/eudat/controllers/Users.java
@@ -26,7 +26,7 @@ import static eu.eudat.types.Authorities.USER;
@RestController
@CrossOrigin
-@RequestMapping(value = "user")
+@RequestMapping(value = "api/user")
public class Users extends BaseController {
@Autowired
diff --git a/dmp-backend/src/main/java/eu/eudat/entities/Dataset.java b/dmp-backend/src/main/java/eu/eudat/entities/Dataset.java
index b3319149a..015d0d6a3 100644
--- a/dmp-backend/src/main/java/eu/eudat/entities/Dataset.java
+++ b/dmp-backend/src/main/java/eu/eudat/entities/Dataset.java
@@ -20,7 +20,8 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
@NamedEntityGraph(
name = "datasetListingModel",
attributeNodes = {@NamedAttributeNode("services"), @NamedAttributeNode("dataRepositories"), @NamedAttributeNode("externalDatasets"), @NamedAttributeNode("registries"),
- @NamedAttributeNode("dmp"), @NamedAttributeNode("profile"), @NamedAttributeNode("creator")}),
+ @NamedAttributeNode(value = "dmp", subgraph = "dmp"), @NamedAttributeNode("profile"), @NamedAttributeNode("creator")},
+ subgraphs = @NamedSubgraph(name = "dmp", attributeNodes = {@NamedAttributeNode("creator"), @NamedAttributeNode("users")})),
@NamedEntityGraph(
name = "datasetWizardModel",
attributeNodes = {@NamedAttributeNode("services"), @NamedAttributeNode("dataRepositories"), @NamedAttributeNode("externalDatasets"), @NamedAttributeNode("registries"),
diff --git a/dmp-backend/src/main/java/eu/eudat/entities/Project.java b/dmp-backend/src/main/java/eu/eudat/entities/Project.java
index 181f2635b..8d9f6ea6f 100644
--- a/dmp-backend/src/main/java/eu/eudat/entities/Project.java
+++ b/dmp-backend/src/main/java/eu/eudat/entities/Project.java
@@ -97,7 +97,7 @@ public class Project implements DataEntity {
private Short status;
- @ManyToOne(fetch = FetchType.EAGER)
+ @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "\"CreationUser\"", nullable = true)
private UserInfo creationUser;
diff --git a/dmp-backend/src/main/java/eu/eudat/entities/UserInfo.java b/dmp-backend/src/main/java/eu/eudat/entities/UserInfo.java
index 7c01997d4..d577907f9 100644
--- a/dmp-backend/src/main/java/eu/eudat/entities/UserInfo.java
+++ b/dmp-backend/src/main/java/eu/eudat/entities/UserInfo.java
@@ -17,6 +17,11 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
@Entity
@Table(name="\"UserInfo\"")
+@NamedEntityGraphs({
+ @NamedEntityGraph(
+ name = "userInfo",
+ attributeNodes = {@NamedAttributeNode("userRoles"), @NamedAttributeNode("credentials")})
+})
public class UserInfo implements DataEntity{
@Id
@@ -64,7 +69,7 @@ public class UserInfo implements DataEntity{
@OneToMany(mappedBy="userInfo",fetch = FetchType.LAZY)
private Set credentials = new HashSet<>();
- @OneToMany(mappedBy="userInfo",fetch = FetchType.EAGER)
+ @OneToMany(mappedBy="userInfo",fetch = FetchType.LAZY)
private Set userRoles = new HashSet<>();
public Set getDmps() {
diff --git a/dmp-backend/src/main/java/eu/eudat/helpers/Transformers.java b/dmp-backend/src/main/java/eu/eudat/helpers/Transformers.java
deleted file mode 100644
index 3eb590cd7..000000000
--- a/dmp-backend/src/main/java/eu/eudat/helpers/Transformers.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package eu.eudat.helpers;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.UUID;
-
-import org.springframework.util.MultiValueMap;
-
-import eu.eudat.entities.DMP;
-import eu.eudat.entities.DMPProfile;
-import eu.eudat.entities.DataRepository;
-import eu.eudat.entities.Dataset;
-import eu.eudat.entities.DatasetProfile;
-import eu.eudat.entities.DatasetProfileRuleset;
-import eu.eudat.entities.DatasetProfileViewstyle;
-import eu.eudat.entities.Project;
-import eu.eudat.entities.Registry;
-import eu.eudat.entities.Service;
-
-public class Transformers {
-
-
- public static DMP createDMPfromMap(MultiValueMap formData) {
-
- DatasetProfileRuleset dpr = new DatasetProfileRuleset();
- dpr.setLabel(formData.getFirst("DatasetProfileRuleset.label"));
- dpr.setDefinition(formData.getFirst("DatasetProfileRuleset.definition"));
-
- DatasetProfileViewstyle dpv = new DatasetProfileViewstyle();
- dpv.setLabel(formData.getFirst("DatasetProfileViewStyle.label"));
- dpv.setDefinition(formData.getFirst("DatasetProfileViewStyle.definition"));
-
- DatasetProfile dp = new DatasetProfile();
- dp.setLabel(formData.getFirst("DatasetProfileListingModel.label"));
- dp.setDefinition(formData.getFirst("DatasetProfileListingModel.definition"));
-
-
- Project project = new Project();
- project.setDefinition(formData.getFirst("Project.definition"));
- project.setLabel(formData.getFirst("Project.label"));
- project.setReference(formData.getFirst("Project.reference"));
- project.setUri(formData.getFirst("Project.uri"));
-
-
- DMPProfile profile = new DMPProfile();
- profile.setLabel(formData.getFirst("DMPProfile.label"));
- profile.setDefinition(formData.getFirst("DMPProfile.definition"));
-
-
- DataRepository dr = new DataRepository();
- dr.setLabel(formData.getFirst("DataRepository.label"));
- dr.setDefinition(formData.getFirst("DataRepository.definition"));
- dr.setReference(formData.getFirst("DataRepository.reference"));
- dr.setAbbreviation(formData.getFirst("DataRepository.abbr"));
- dr.setUri(formData.getFirst("DataRepository.uri"));
-
- Registry reg = new Registry();
- reg.setLabel(formData.getFirst("Registry.label"));
- reg.setAbbreviation(formData.getFirst("Registry.abbr"));
- reg.setReference(formData.getFirst("Registry.reference"));
- reg.setUri(formData.getFirst("Registry.uri"));
- reg.setDefinition(formData.getFirst("Registry.definition"));
-
- Service ser = new Service();
- ser.setLabel(formData.getFirst("Service.label"));
- ser.setAbbreviation(formData.getFirst("Service.abbr"));
- ser.setReference(formData.getFirst("Service.reference"));
- ser.setUri(formData.getFirst("Service.uri"));
- ser.setDefinition(formData.getFirst("Service.definition"));
-
-
- Dataset ds = new Dataset();
- ds.setLabel(formData.getFirst("Dataset.label"));
- ds.setProperties(formData.getFirst("Dataset.props"));
- ds.setUri(formData.getFirst("Dataset.uri"));
- ds.setProfile(dp);
- ds.setDataRepositories(new HashSet(Arrays.asList(dr)));
- ds.setRegistries(new HashSet(Arrays.asList(reg)));
- ds.setServices(new HashSet(Arrays.asList(ser)));
-
- Set datasets = new HashSet();
- datasets.add(ds);
-
-
- DMP dmp = new DMP();
- dmp.setLabel(formData.getFirst("DMP.label"));
- try {
- //dmp.setPrevious(UUID.fromString(formData.getFirst("DMP.previous")));
- }catch(Exception ex) {/*do nothing*/}
- dmp.setProfile(profile);
- dmp.setAssociatedDmps(formData.getFirst("DMP.profileData"));
- dmp.setProject(project);
- dmp.setVersion(Integer.parseInt(formData.getFirst("DMP.version")));
- dmp.setDataset(datasets);
-
-
- System.out.println(dmp);
-
- return dmp;
-
- }
-
-
-}
diff --git a/dmp-backend/src/main/java/eu/eudat/managers/DataManagementPlanManager.java b/dmp-backend/src/main/java/eu/eudat/managers/DataManagementPlanManager.java
index 56af7ebca..5e12fe9b8 100644
--- a/dmp-backend/src/main/java/eu/eudat/managers/DataManagementPlanManager.java
+++ b/dmp-backend/src/main/java/eu/eudat/managers/DataManagementPlanManager.java
@@ -71,10 +71,11 @@ public class DataManagementPlanManager {
createProjectIfItDoesntExist(newDmp, apiContext.getDatabaseRepository().getProjectDao(), user);
newDmp.setCreator(user);
newDmp = apiContext.getDatabaseRepository().getDmpDao().createOrUpdate(newDmp);
- if (dataManagementPlan.getAssociatedUsers().stream().filter(item -> item.getId() == principal.getId()).collect(Collectors.toList()).size() == 0) assignUser(newDmp,user,apiContext);
+ if (dataManagementPlan.getAssociatedUsers().stream().filter(item -> item.getId() == principal.getId()).collect(Collectors.toList()).size() == 0)
+ assignUser(newDmp, user, apiContext);
}
- public static void assignUser(DMP dmp , UserInfo userInfo, ApiContext apiContext){
+ public static void assignUser(DMP dmp, UserInfo userInfo, ApiContext apiContext) {
UserDMP userDMP = new UserDMP();
userDMP.setDmp(dmp);
userDMP.setUser(userInfo);
@@ -163,46 +164,46 @@ public class DataManagementPlanManager {
private static void copyDatasets(DMP newDmp, DatasetDao datasetDao) {
List> futures = new LinkedList<>();
for (Dataset dataset : newDmp.getDataset()) {
- CompletableFuture.supplyAsync(() -> {
- Dataset entityDataset = datasetDao.find(dataset.getId(), HintedModelFactory.getHint(DatasetListingModel.class));
- Dataset newDataset = new Dataset();
- newDataset.update(entityDataset);
- newDataset.setDmp(newDmp);
- newDataset.setStatus(Dataset.Status.SAVED.getValue());
- if (newDataset.getDataRepositories() != null) {
- newDataset.setDataRepositories(newDataset.getDataRepositories().stream().map(item -> {
- DataRepository dataRepository = new DataRepository();
- dataRepository.setId(item.getId());
- return dataRepository;
- }).collect(Collectors.toSet()));
- }
+ datasetDao.asQueryable().withHint(HintedModelFactory.getHint(DatasetListingModel.class)).where((builder, root) -> builder.equal(root.get("id"), dataset.getId())).getSingleAsync()
+ .thenApplyAsync(entityDataset -> {
+ Dataset newDataset = new Dataset();
+ newDataset.update(entityDataset);
+ newDataset.setDmp(newDmp);
+ newDataset.setStatus(Dataset.Status.SAVED.getValue());
+ if (newDataset.getDataRepositories() != null) {
+ newDataset.setDataRepositories(newDataset.getDataRepositories().stream().map(item -> {
+ DataRepository dataRepository = new DataRepository();
+ dataRepository.setId(item.getId());
+ return dataRepository;
+ }).collect(Collectors.toSet()));
+ }
- if (newDataset.getExternalDatasets() != null) {
- newDataset.setExternalDatasets(newDataset.getExternalDatasets().stream().map(item -> {
- ExternalDataset externalDataset = new ExternalDataset();
- externalDataset.setId(item.getId());
- return externalDataset;
- }).collect(Collectors.toSet()));
- }
+ if (newDataset.getExternalDatasets() != null) {
+ newDataset.setExternalDatasets(newDataset.getExternalDatasets().stream().map(item -> {
+ ExternalDataset externalDataset = new ExternalDataset();
+ externalDataset.setId(item.getId());
+ return externalDataset;
+ }).collect(Collectors.toSet()));
+ }
- if (newDataset.getRegistries() != null) {
- newDataset.setRegistries(newDataset.getRegistries().stream().map(item -> {
- Registry registry = new Registry();
- registry.setId(item.getId());
- return registry;
- }).collect(Collectors.toSet()));
- }
+ if (newDataset.getRegistries() != null) {
+ newDataset.setRegistries(newDataset.getRegistries().stream().map(item -> {
+ Registry registry = new Registry();
+ registry.setId(item.getId());
+ return registry;
+ }).collect(Collectors.toSet()));
+ }
- if (newDataset.getServices() != null) {
- newDataset.setServices(newDataset.getServices().stream().map(item -> {
- Service service = new Service();
- service.setId(item.getId());
- return service;
- }).collect(Collectors.toSet()));
- }
- newDataset.setCreated(new Date());
- return newDataset;
- }).thenApplyAsync(item -> {
+ if (newDataset.getServices() != null) {
+ newDataset.setServices(newDataset.getServices().stream().map(item -> {
+ Service service = new Service();
+ service.setId(item.getId());
+ return service;
+ }).collect(Collectors.toSet()));
+ }
+ newDataset.setCreated(new Date());
+ return newDataset;
+ }).thenApplyAsync(item -> {
futures.add(datasetDao.createOrUpdateAsync(item));
return futures;
}).join();
diff --git a/dmp-backend/src/main/java/eu/eudat/managers/ProjectManager.java b/dmp-backend/src/main/java/eu/eudat/managers/ProjectManager.java
index 37fdf5d8a..275f4a31b 100644
--- a/dmp-backend/src/main/java/eu/eudat/managers/ProjectManager.java
+++ b/dmp-backend/src/main/java/eu/eudat/managers/ProjectManager.java
@@ -8,9 +8,11 @@ import java.util.concurrent.CompletableFuture;
import eu.eudat.dao.entities.ProjectDao;
import eu.eudat.dao.entities.UserInfoDao;
+import eu.eudat.models.HintedModelFactory;
import eu.eudat.models.external.ExternalSourcesItemModel;
import eu.eudat.models.external.ProjectsExternalSourcesModel;
import eu.eudat.models.helpers.common.DataTableData;
+import eu.eudat.models.listingmodels.DataManagementPlanListingModel;
import eu.eudat.models.project.Project;
import eu.eudat.models.project.ProjectCriteriaRequest;
import eu.eudat.models.project.ProjectListingModel;
@@ -29,7 +31,7 @@ public class ProjectManager {
QueryableList pagedItems = PaginationManager.applyPaging(items, projectTableRequest);
DataTableData dataTable = new DataTableData();
- CompletableFuture projectsFuture = pagedItems.toListAsync().whenComplete((results, throwable) -> {
+ CompletableFuture projectsFuture = pagedItems.withHint(HintedModelFactory.getHint(ProjectListingModel.class)).toListAsync().whenComplete((results, throwable) -> {
List projects = new DomainModelConverter().fromDataModel(results, eu.eudat.models.project.ProjectListingModel.class);
dataTable.setData(projects);
});
diff --git a/dmp-backend/src/main/java/eu/eudat/proxy/config/ConfigLoader.java b/dmp-backend/src/main/java/eu/eudat/proxy/config/ConfigLoader.java
deleted file mode 100644
index bc3040d86..000000000
--- a/dmp-backend/src/main/java/eu/eudat/proxy/config/ConfigLoader.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package eu.eudat.proxy.config;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Unmarshaller;
-
-@Service
-public class ConfigLoader {
-
- private ExternalUrls externalUrls;
-
- @Autowired
- private Environment environment;
-// public static void main(String [] args) {
-// ConfigLoader l = new ConfigLoader("file:///home/nikolas/git/OpenAIRE-EUDAT-DMP/dmp-backend/src/main/resources/ExternalUrls.xml");
-// }
-
- public ConfigLoader() {
- }
- private void setExternalUrls() {
- String fileUrl = this.environment.getProperty("configuration.externalUrls");
- System.out.println("Loaded also config file: " + fileUrl);
- String current=null;
- InputStream is = null;
- try {
- current = new java.io.File( "." ).getCanonicalPath();
-
- JAXBContext jaxbContext = JAXBContext.newInstance(ExternalUrls.class);
- Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
- //is = new URL("file:///"+System.getenv("CATALINA_HOME")+fileUrl).openStream();
- is = new URL("file:///C:/Users/ikalyvas/Documents/Projects/OpenAIRE-EUDAT-DMP-service-pilot/dmp-backend/src/main/resources/ExternalUrls.xml").openStream();
- externalUrls = (ExternalUrls) jaxbUnmarshaller.unmarshal(is);
-// System.out.println(new ObjectMapper().writeValueAsString(externalUrls));
- } catch (Exception ex) {
- //log the error and shutdown the system (that's a critical error)
- ex.printStackTrace();
- System.out.println("Cannot find in folder"+current);
- } finally {
- try {
- if (is != null) is.close();
- } catch (IOException e) {
- System.out.println("Warning: Could not close a stream after reading from file: " + fileUrl);
- }
- }
-
- }
-
-
- public ExternalUrls getExternalUrls() {
- this.setExternalUrls();
- return externalUrls;
- }
-
-
-
-}
diff --git a/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/ConfigLoader.java b/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/ConfigLoader.java
new file mode 100644
index 000000000..81c0237ee
--- /dev/null
+++ b/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/ConfigLoader.java
@@ -0,0 +1,10 @@
+package eu.eudat.proxy.config.configloaders;
+
+import eu.eudat.proxy.config.ExternalUrls;
+
+/**
+ * Created by ikalyvas on 2/9/2018.
+ */
+public interface ConfigLoader {
+ ExternalUrls getExternalUrls();
+}
diff --git a/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/DevelConfigLoader.java b/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/DevelConfigLoader.java
new file mode 100644
index 000000000..0415e94af
--- /dev/null
+++ b/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/DevelConfigLoader.java
@@ -0,0 +1,57 @@
+package eu.eudat.proxy.config.configloaders;
+
+import eu.eudat.proxy.config.ExternalUrls;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Profile;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+
+@Service("configLoader")
+@Profile("devel")
+public class DevelConfigLoader implements ConfigLoader{
+
+ private ExternalUrls externalUrls;
+
+ @Autowired
+ private Environment environment;
+
+ private void setExternalUrls() {
+ String fileUrl = this.environment.getProperty("configuration.externalUrls");
+ System.out.println("Loaded also config file: " + fileUrl);
+ String current = null;
+ InputStream is = null;
+ try {
+ current = new java.io.File(".").getCanonicalPath();
+
+ JAXBContext jaxbContext = JAXBContext.newInstance(ExternalUrls.class);
+ Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
+ is = new URL("file:///C:/Users/ikalyvas/Documents/Projects/OpenAIRE-EUDAT-DMP-service-pilot/dmp-backend/src/main/resources/ExternalUrls.xml").openStream();
+ externalUrls = (ExternalUrls) jaxbUnmarshaller.unmarshal(is);
+
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.out.println("Cannot find in folder" + current);
+ } finally {
+ try {
+ if (is != null) is.close();
+ } catch (IOException e) {
+ System.out.println("Warning: Could not close a stream after reading from file: " + fileUrl);
+ }
+ }
+
+ }
+
+
+ public ExternalUrls getExternalUrls() {
+ this.setExternalUrls();
+ return externalUrls;
+ }
+
+}
diff --git a/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/ProductionConfigLoader.java b/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/ProductionConfigLoader.java
new file mode 100644
index 000000000..feb1f763c
--- /dev/null
+++ b/dmp-backend/src/main/java/eu/eudat/proxy/config/configloaders/ProductionConfigLoader.java
@@ -0,0 +1,59 @@
+package eu.eudat.proxy.config.configloaders;
+
+import eu.eudat.proxy.config.ExternalUrls;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Profile;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Service;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Created by ikalyvas on 2/9/2018.
+ */
+@Service("configLoader")
+@Profile("production")
+public class ProductionConfigLoader implements ConfigLoader{
+
+ private ExternalUrls externalUrls;
+
+ @Autowired
+ private Environment environment;
+
+ private void setExternalUrls() {
+ String fileUrl = this.environment.getProperty("configuration.externalUrls");
+ System.out.println("Loaded also config file: " + fileUrl);
+ String current = null;
+ InputStream is = null;
+ try {
+ current = new java.io.File(".").getCanonicalPath();
+
+ JAXBContext jaxbContext = JAXBContext.newInstance(ExternalUrls.class);
+ Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
+ is = new URL("file:///"+System.getenv("CATALINA_HOME")+fileUrl).openStream();
+ externalUrls = (ExternalUrls) jaxbUnmarshaller.unmarshal(is);
+
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.out.println("Cannot find in folder" + current);
+ } finally {
+ try {
+ if (is != null) is.close();
+ } catch (IOException e) {
+ System.out.println("Warning: Could not close a stream after reading from file: " + fileUrl);
+ }
+ }
+
+ }
+
+
+ public ExternalUrls getExternalUrls() {
+ this.setExternalUrls();
+ return externalUrls;
+ }
+
+}
\ No newline at end of file
diff --git a/dmp-backend/src/main/java/eu/eudat/proxy/fetching/RemoteFetcher.java b/dmp-backend/src/main/java/eu/eudat/proxy/fetching/RemoteFetcher.java
index 6b2c47682..ad40365e8 100644
--- a/dmp-backend/src/main/java/eu/eudat/proxy/fetching/RemoteFetcher.java
+++ b/dmp-backend/src/main/java/eu/eudat/proxy/fetching/RemoteFetcher.java
@@ -5,9 +5,8 @@ import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
+import eu.eudat.proxy.config.configloaders.ConfigLoader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
@@ -15,7 +14,7 @@ import org.springframework.stereotype.Service;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
-import eu.eudat.proxy.config.ConfigLoader;
+import eu.eudat.proxy.config.configloaders.DevelConfigLoader;
import eu.eudat.proxy.config.FetchStrategy;
import eu.eudat.proxy.config.UrlConfig;
import eu.eudat.proxy.config.exceptions.HugeResultSet;
diff --git a/dmp-backend/src/main/java/eu/eudat/queryable/hibernatequeryablelist/QueryableHibernateList.java b/dmp-backend/src/main/java/eu/eudat/queryable/hibernatequeryablelist/QueryableHibernateList.java
index ca6f4da5b..a21d96e43 100644
--- a/dmp-backend/src/main/java/eu/eudat/queryable/hibernatequeryablelist/QueryableHibernateList.java
+++ b/dmp-backend/src/main/java/eu/eudat/queryable/hibernatequeryablelist/QueryableHibernateList.java
@@ -185,12 +185,13 @@ public class QueryableHibernateList> implements Queryabl
TypedQuery typedQuery = this.manager.createQuery(this.query);
if (this.offset != null) typedQuery.setFirstResult(this.offset);
if (this.length != null) typedQuery.setMaxResults(this.length);
- if (this.hint != null && this.hints.contains(hint)) {
- List ids = typedQuery.getResultList().stream().map(item -> item.getKeys()[0]).collect(Collectors.toList());
- if (ids != null && !ids.isEmpty()) typedQuery = queryWithHint(ids);
- }
- TypedQuery finalQuery = typedQuery;
- return CompletableFuture.supplyAsync(() -> finalQuery.getResultList());
+ return CompletableFuture.supplyAsync(() -> {
+ if (this.hint != null && this.hints.contains(hint)) {
+ List ids = typedQuery.getResultList().stream().map(item -> item.getKeys()[0]).collect(Collectors.toList());
+ if (ids != null && !ids.isEmpty()) return queryWithHint(ids).getResultList();
+ }
+ return typedQuery.getResultList();
+ });
}
public T getSingle() {
diff --git a/dmp-backend/src/main/java/eu/eudat/security/claims/ClaimedRights.java b/dmp-backend/src/main/java/eu/eudat/security/claims/ClaimedRights.java
new file mode 100644
index 000000000..14d0ec81d
--- /dev/null
+++ b/dmp-backend/src/main/java/eu/eudat/security/claims/ClaimedRights.java
@@ -0,0 +1,17 @@
+package eu.eudat.security.claims;
+
+import eu.eudat.types.Rights;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Created by ikalyvas on 2/8/2018.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.PARAMETER)
+public @interface ClaimedRights {
+ Rights[] claims() default {};
+}
diff --git a/dmp-backend/src/main/java/eu/eudat/services/AuthenticationService.java b/dmp-backend/src/main/java/eu/eudat/services/AuthenticationService.java
index 2ebf04dbc..544d0cf06 100644
--- a/dmp-backend/src/main/java/eu/eudat/services/AuthenticationService.java
+++ b/dmp-backend/src/main/java/eu/eudat/services/AuthenticationService.java
@@ -57,7 +57,7 @@ public class AuthenticationService {
principal.setExpiresAt(token.getExpiresAt());
principal.setName(user.getName());
- List userRoles = user.getUserRoles().stream().collect(Collectors.toList());
+ List userRoles = apiContext.getDatabaseRepository().getUserRoleDao().getUserRoles(user);
for (UserRole item : userRoles) {
if (principal.getAuthz() == null) principal.setAuthorities(new HashSet<>());
principal.getAuthz().add(Authorities.fromInteger(item.getRole()));
@@ -87,9 +87,8 @@ public class AuthenticationService {
public Principal Touch(LoginProviderUser profile) {
UserInfoCriteria criteria = new UserInfoCriteria();
criteria.setEmail(profile.getEmail());
- List users = apiContext.getDatabaseRepository().getUserInfoDao().getWithCriteria(criteria).toList();
- UserInfo userInfo = null;
- if (users.size() > 0) userInfo = users.get(0);
+ UserInfo userInfo = apiContext.getDatabaseRepository().getUserInfoDao().asQueryable().withHint("userInfo").where((builder, root) -> builder.equal(root.get("email"), profile.getEmail())).getSingleOrDefault();
+
final Credential credential = new Credential();
credential.setId(UUID.randomUUID());
credential.setCreationTime(new Date());
@@ -114,6 +113,7 @@ public class AuthenticationService {
UserRole role = new UserRole();
role.setRole(Authorities.USER.getValue());
role.setUserInfo(userInfo);
+ apiContext.getDatabaseRepository().getUserRoleDao().createOrUpdate(role);
} else {
userInfo.setLastloggedin(new Date());
diff --git a/dmp-backend/src/main/java/eu/eudat/types/Rights.java b/dmp-backend/src/main/java/eu/eudat/types/Rights.java
new file mode 100644
index 000000000..419f2a4e3
--- /dev/null
+++ b/dmp-backend/src/main/java/eu/eudat/types/Rights.java
@@ -0,0 +1,34 @@
+package eu.eudat.types;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Created by ikalyvas on 2/8/2018.
+ */
+public enum Rights {
+ CAN_EDIT_ROLES(0), CAN_INVITE_USERS(1), CAN_CREATE_DMP(2);
+
+ private Integer value;
+
+ private Rights(Integer value) {
+ this.value = value;
+ }
+
+ public Integer getValue() {
+ return value;
+ }
+
+ public static Rights fromInteger(Integer value) {
+ switch (value) {
+ case 0:
+ return CAN_EDIT_ROLES;
+ case 1:
+ return CAN_INVITE_USERS;
+ case 2:
+ return CAN_CREATE_DMP;
+ default:
+ throw new RuntimeException("Unsupported Rights Type");
+ }
+ }
+}
diff --git a/dmp-backend/src/main/resources/application.properties b/dmp-backend/src/main/resources/application.properties
index 592f11ea9..decd64dbd 100644
--- a/dmp-backend/src/main/resources/application.properties
+++ b/dmp-backend/src/main/resources/application.properties
@@ -6,9 +6,12 @@ server.port=8080
logging.file=/logs/spring-boot-logging.log
##########################Persistence##########################################
database.driver-class-name=org.postgresql.Driver
-database.url=jdbc:postgresql://dbserver02.local.cite.gr:5432/dmptool
-database.username=dmtadm
-database.password=t00L4DM@18!
+devel.database.url=jdbc:postgresql://dbserver02.local.cite.gr:5432/dmptool
+devel.database.username=dmtadm
+devel.database.password=t00L4DM@18!
+production.database.url=jdbc:postgresql://develdb1.madgik.di.uoa.gr:5432/dmptool
+production.database.username=dmptool
+production.database.password=dmpt00lu$r
##########################/Persistence##########################################
###################Allowed Proxy Service Host ############################
eu.eudat.proxy.allowed.host=https://eestore.paas2.uninett.no
@@ -42,26 +45,7 @@ twitter.login.clientId=HiR4hQH9HNubKC5iKQy0l4mAZ
twitter.login.clientSecret=9KZHgkqUO2QFnELSL14jeUvfUacWX23rqD8OW8X0xoRDXOSfKH
twitter.login.redirect_uri=http://dl043.madgik.di.uoa.gr:8080/login/twitter
########################Persistence/Hibernate/Batch##############################
-#persistence.hibernate.jdbc.batch_size = 30
-#persistence.hibernate.order_inserts = true
-#persistence.hibernate.order_updates = true
-#persistence.hibernate.batch_versioned_data = true
-#persistence.hibernate.jdbc.batch_versioned_data = DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTION
-########################Persistence/Hibernate/Batch##############################
-########################Persistence/Hibernate/Connection pool####################
-#persistence.hibernate.connectionpool.provider_class = org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider
-#persistence.hibernate.connectionpool.c3p0.min_size = 5
-#persistence.hibernate.connectionpool.c3p0.max_size = 100
-#persistence.hibernate.connectionpool.c3p0.timeout = 0
-#persistence.hibernate.connectionpool.c3p0.max_statements = 50
-#persistence.hibernate.connectionpool.c3p0.acquire_retry_attempts = 30
-#persistence.hibernate.connectionpool.c3p0.acquire_retry_delay = 1000
-#persistence.hibernate.connectionpool.c3p0.idle_test_period = 3000
-#persistence.hibernate.connectionpool.c3p0.break_after_acquire_failure = false
-#persistence.hibernate.connectionpool.c3p0.idle_connection_test_period = 3600
-#persistence.hibernate.connectionpool.c3p0.test_connection_on_checkin = true
-#persistence.hibernate.connectionpool.c3p0.test_connection_on_checkout = false
-#persistence.hibernate.connectionpool.c3p0.preferred_test_query = select 1
+spring.profiles.active=devel
########################Persistence/Hibernate/Connection pool####################
autouser.root.email = root@dmp.com
autouser.root.password = root
diff --git a/dmp-frontend/src/app/app-routing.module.ts b/dmp-frontend/src/app/app-routing.module.ts
index 05223d28e..1cfc342eb 100644
--- a/dmp-frontend/src/app/app-routing.module.ts
+++ b/dmp-frontend/src/app/app-routing.module.ts
@@ -8,16 +8,16 @@ import { LoginComponent } from './user-management/login/login.component';
import { WelcomepageComponent } from '@app/welcomepage/welcomepage.component';
const appRoutes: Routes = [
- { path: 'datasets', loadChildren: './datasets/dataset.module#DatasetModule' ,canActivate: [AuthGuard]},
- { path: 'projects', loadChildren: './projects/projects.module#ProjectsModule',canActivate: [AuthGuard] },
- { path: "dmps", loadChildren: './dmps/dmps.module#DataManagementPlanModule',canActivate: [AuthGuard] },
- { path: 'form', loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule', canActivate: [AuthGuard]},
+ { path: 'datasets', loadChildren: './datasets/dataset.module#DatasetModule', canActivate: [AuthGuard] },
+ { path: 'projects', loadChildren: './projects/projects.module#ProjectsModule', canActivate: [AuthGuard] },
+ { path: "dmps", loadChildren: './dmps/dmps.module#DataManagementPlanModule', canActivate: [AuthGuard] },
+ { path: 'form', loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule', canActivate: [AuthGuard] },
{ path: 'home', component: HomepageComponent, canActivate: [AuthGuard] },
{ path: '', redirectTo: '/welcome', pathMatch: 'full' },
- { path: "unauthorized", loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule' },
+ { path: "unauthorized", loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule' },
{ path: "users", loadChildren: './users/users.module#UsersModule' },
{ path: "datasetsProfiles", loadChildren: './datasets-admin-listing/dataset-admin.module#DatasetAdminModule' },
- { path: "welcome", component: WelcomepageComponent }
+ { path: "welcome", component: WelcomepageComponent }
];
@NgModule({
diff --git a/dmp-frontend/src/app/app.constants.ts b/dmp-frontend/src/app/app.constants.ts
index 06956ba9b..285e6ab15 100644
--- a/dmp-frontend/src/app/app.constants.ts
+++ b/dmp-frontend/src/app/app.constants.ts
@@ -1,6 +1,5 @@
+import { environment } from '../environments/environment.prod';
export const HostConfiguration = {
- Server: 'http://192.168.32.64:8080/', //'http://dl043.madgik.di.uoa.gr:8080/'
- App: 'localhost:4200/' // 'http://dl043.madgik.di.uoa.gr:8080/'
- //CASHost: 'https://login-devel.uoa.gr/login',
- //Service: 'http://elkefinman/login'
+ Server: environment.Server,
+ App: environment.App
}
\ No newline at end of file
diff --git a/dmp-frontend/src/app/dmps/dmps.routes.ts b/dmp-frontend/src/app/dmps/dmps.routes.ts
index b3dace2a8..7faf3d2a4 100644
--- a/dmp-frontend/src/app/dmps/dmps.routes.ts
+++ b/dmp-frontend/src/app/dmps/dmps.routes.ts
@@ -3,6 +3,7 @@ import { DataManagementPlanEditorComponent } from './editor/dmp-editor.component
import { DataManagementPlanListingComponent } from './listing/dmp-listing.component';
import { DatasetListingComponent } from '../datasets/listing/dataset-listing.component';
import { RouterModule, Routes } from '@angular/router';
+import { InvitationAcceptedComponent } from '../invitation-accepted/invitation-accepted.component';
const routes: Routes = [
{ path: '', component: DataManagementPlanListingComponent },
@@ -10,7 +11,8 @@ const routes: Routes = [
{ path: 'edit/:id', component: DataManagementPlanEditorComponent },
{ path: 'new', component: DataManagementPlanEditorComponent },
{ path: 'new_version/:id', component: DataManagementPlanWizardComponent, data: { clone: false } },
- { path: 'clone/:id', component: DataManagementPlanWizardComponent, data: { clone: true } }
+ { path: 'clone/:id', component: DataManagementPlanWizardComponent, data: { clone: true } },
+ { path: "invitation/:id", component: InvitationAcceptedComponent }
];
export const DataManagementPlanRoutes = RouterModule.forChild(routes);
diff --git a/dmp-frontend/src/app/dmps/wizard/dmp-wizard.component.ts b/dmp-frontend/src/app/dmps/wizard/dmp-wizard.component.ts
index c9266b487..5f4c8ec0d 100644
--- a/dmp-frontend/src/app/dmps/wizard/dmp-wizard.component.ts
+++ b/dmp-frontend/src/app/dmps/wizard/dmp-wizard.component.ts
@@ -34,7 +34,7 @@ export class DataManagementPlanWizardComponent implements OnInit {
this.dataManagementPlanService.getSingle(this.itemId).map(data => data as DataManagementPlanModel)
.subscribe(data => {
this.dataManagementPlan = JsonSerializer.fromJSONObject(data, DataManagementPlanModel);
- this.formGroup = this.dataManagementPlan.buildForm();
+ this.formGroup = this.dataManagementPlan.buildForm(null, !this.isClone);
this.isClone = this.route.snapshot.data.clone;
});
})
diff --git a/dmp-frontend/src/app/user-management/utilties/login-service.ts b/dmp-frontend/src/app/user-management/utilties/login-service.ts
index 7bbadb2ae..9aa4930c2 100644
--- a/dmp-frontend/src/app/user-management/utilties/login-service.ts
+++ b/dmp-frontend/src/app/user-management/utilties/login-service.ts
@@ -193,10 +193,9 @@ export class LoginService {
duration: 3000,
extraClasses: ['snackbar-success']
});
- this.route.queryParams.subscribe((params: Params) => {
- let redirectUrl = params['returnUrl'] ? params['returnUrl'] : '/';
- this.zone.run(() => this.router.navigate([redirectUrl]));
- })
+ let params = this.router["rawUrlTree"].queryParams;
+ let redirectUrl = params['returnUrl'] ? params['returnUrl'] : '/';
+ this.zone.run(() => this.router.navigate([redirectUrl]));
}
public onLogInError(errorMessage: string) {
diff --git a/dmp-frontend/src/environments/environment.prod.ts b/dmp-frontend/src/environments/environment.prod.ts
index ffe8aed76..117f8cec2 100644
--- a/dmp-frontend/src/environments/environment.prod.ts
+++ b/dmp-frontend/src/environments/environment.prod.ts
@@ -1,3 +1,5 @@
export const environment = {
- production: false
+ production: true,
+ Server: 'http://dl043.madgik.di.uoa.gr:8080/api/',
+ App: 'http://dl043.madgik.di.uoa.gr:8080/'
};
diff --git a/dmp-frontend/src/environments/environment.ts b/dmp-frontend/src/environments/environment.ts
index b7f639aec..d8975f998 100644
--- a/dmp-frontend/src/environments/environment.ts
+++ b/dmp-frontend/src/environments/environment.ts
@@ -4,5 +4,7 @@
// The list of which env maps to which file can be found in `.angular-cli.json`.
export const environment = {
- production: false
+ production: false,
+ Server: 'http://192.168.32.64:8080/api/',
+ App: 'localhost:4200/'
};
diff --git a/dmp-frontend/src/styles.scss b/dmp-frontend/src/styles.scss
index 5ba5c755b..401553fbd 100644
--- a/dmp-frontend/src/styles.scss
+++ b/dmp-frontend/src/styles.scss
@@ -13,3 +13,18 @@ $theme: mat-light-theme($primary, $accent);
// Include all theme styles for the components.
@include angular-material-theme($theme);
@include covalent-theme($theme);
+
+.snackbar-warning{
+ background-color: #F39010;
+ color: #F3EFEF;
+}
+
+.snackbar-success{
+ background-color: #109204;
+ color: #F3EFEF;
+}
+
+.snackbar-error{
+ background-color: #CF1407;
+ color: #111010;
+}
\ No newline at end of file
diff --git a/logs/spring-boot-logging.log b/logs/spring-boot-logging.log
deleted file mode 100644
index c81065af0..000000000
--- a/logs/spring-boot-logging.log
+++ /dev/null
@@ -1,111 +0,0 @@
-2018-01-15 11:01:38.149 INFO 13992 --- [restartedMain] eu.eudat.EuDatApplication : Starting EuDatApplication on DEVEL-21 with PID 13992 (C:\Users\ikalyvas\Documents\Projects\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\target\classes started by ikalyvas in C:\Users\ikalyvas\Documents\Projects\OpenAIRE-EUDAT-DMP-service-pilot)
-2018-01-15 11:01:38.151 INFO 13992 --- [restartedMain] eu.eudat.EuDatApplication : No active profile set, falling back to default profiles: default
-2018-01-15 11:01:38.267 INFO 13992 --- [restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7b427b87: startup date [Mon Jan 15 11:01:38 EET 2018]; root of context hierarchy
-2018-01-15 11:01:47.240 INFO 8908 --- [restartedMain] eu.eudat.EuDatApplication : Starting EuDatApplication on DEVEL-21 with PID 8908 (C:\Users\ikalyvas\Documents\Projects\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\target\classes started by ikalyvas in C:\Users\ikalyvas\Documents\Projects\OpenAIRE-EUDAT-DMP-service-pilot)
-2018-01-15 11:01:47.241 INFO 8908 --- [restartedMain] eu.eudat.EuDatApplication : No active profile set, falling back to default profiles: default
-2018-01-15 11:01:47.462 INFO 8908 --- [restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@64e61df8: startup date [Mon Jan 15 11:01:47 EET 2018]; root of context hierarchy
-2018-01-15 11:01:52.388 INFO 8908 --- [restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
-2018-01-15 11:01:52.603 INFO 8908 --- [restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'databaseConfiguration' of type [eu.eudat.configurations.DatabaseConfiguration$$EnhancerBySpringCGLIB$$74ee7d46] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
-2018-01-15 11:01:54.231 INFO 8908 --- [restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
-2018-01-15 11:01:54.262 INFO 8908 --- [restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
-2018-01-15 11:01:54.265 INFO 8908 --- [restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
-2018-01-15 11:01:54.727 INFO 8908 --- [localhost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
-2018-01-15 11:01:54.727 INFO 8908 --- [localhost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 7270 ms
-2018-01-15 11:01:55.184 INFO 8908 --- [localhost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
-2018-01-15 11:01:55.191 INFO 8908 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
-2018-01-15 11:01:55.192 INFO 8908 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
-2018-01-15 11:01:55.193 INFO 8908 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
-2018-01-15 11:01:55.193 INFO 8908 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
-2018-01-15 11:01:55.446 INFO 8908 --- [restartedMain] o.s.j.d.DriverManagerDataSource : Loaded JDBC driver: org.postgresql.Driver
-2018-01-15 11:01:55.805 INFO 8908 --- [restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
-2018-01-15 11:01:55.855 INFO 8908 --- [restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
- name: default
- ...]
-2018-01-15 11:01:56.119 INFO 8908 --- [restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.11.Final}
-2018-01-15 11:01:56.132 INFO 8908 --- [restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
-2018-01-15 11:01:56.305 INFO 8908 --- [restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
-2018-01-15 11:01:57.812 INFO 8908 --- [restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL92Dialect
-2018-01-15 11:01:57.842 INFO 8908 --- [restartedMain] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000422: Disabling contextual LOB creation as connection was null
-2018-01-15 11:01:57.845 INFO 8908 --- [restartedMain] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@5ad2fb6b
-2018-01-15 11:01:59.783 INFO 8908 --- [restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
-2018-01-15 11:02:03.615 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@64e61df8: startup date [Mon Jan 15 11:01:47 EET 2018]; root of context hierarchy
-2018-01-15 11:02:03.897 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin/get/{id}],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Admin.get(java.lang.String)
-2018-01-15 11:02:03.984 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin/addDmp],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Admin.addDmp(eu.eudat.models.admin.composite.DatasetProfile)
-2018-01-15 11:02:04.018 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin/addDmp/{id}],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Admin.updateDmp(java.lang.String,eu.eudat.models.admin.composite.DatasetProfile)
-2018-01-15 11:02:04.019 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login/twitter || /login/linkedin]}" onto public java.lang.String eu.eudat.controllers.AngularController.index()
-2018-01-15 11:02:04.054 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dashboard/getStatistics],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.DashBoardController.getStatistics(eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.063 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/external/datarepos],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity>> eu.eudat.controllers.DataRepositories.listExternalDataRepositories(java.lang.String)
-2018-01-15 11:02:04.071 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/search/autocomplete],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.DatasetProfileController.getDataForAutocomplete(eu.eudat.models.helpers.common.AutoCompleteLookupItem)
-2018-01-15 11:02:04.072 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasetwizard/get/{id}],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.DatasetProfileController.getSingle(java.lang.String)
-2018-01-15 11:02:04.074 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasetprofile/save/{id}],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.DatasetProfileController.updateDataset(java.lang.String,eu.eudat.models.properties.PropertiesModel)
-2018-01-15 11:02:04.083 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmps/datasetprofiles/get],methods=[POST],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.DatasetProfiles.get(eu.eudat.models.datasetprofile.DatasetProfileAutocompleteRequest)
-2018-01-15 11:02:04.085 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasetprofiles/getAll],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.DatasetProfiles.getAll()
-2018-01-15 11:02:04.091 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmps/datasetprofiles/getPaged],methods=[POST],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.DatasetProfiles.getPaged(eu.eudat.models.datasetprofile.DatasetProfileTableRequestItem)
-2018-01-15 11:02:04.093 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasets/getPaged],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.Datasets.getPaged(eu.eudat.models.dataset.DatasetTableRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.155 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasetwizard/getAvailableProfiles],methods=[POST],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.DatasetWizardController.getAvailableProfiles(eu.eudat.models.datasetwizard.DatasetProfileWizardAutocompleteRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.168 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasetwizard/userDmps],methods=[POST],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.DatasetWizardController.getUserDmps(eu.eudat.models.datasetwizard.DatasetWizardAutocompleteRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.169 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasetwizard/getSingle/{id}],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.DatasetWizardController.getPaged(java.lang.String,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.170 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/datasetwizard/createOrUpdate],methods=[POST],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.DatasetWizardController.createOrUpdate(eu.eudat.models.datasetwizard.DatasetWizardModel,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.187 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmpprofile/delete],methods=[POST],consumes=[application/json],produces=[text/plain]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.DmpProfiles.delete(eu.eudat.entities.DMPProfile)
-2018-01-15 11:02:04.188 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmpprofile/getAll],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.DmpProfiles.getAllDmpProfiles()
-2018-01-15 11:02:04.199 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmpprofiles/{id}],methods=[GET]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.DmpProfiles.getDmpProfile(java.lang.String)
-2018-01-15 11:02:04.200 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmpprofile/listAllLabelIDs],methods=[GET]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.DmpProfiles.listLabelIds()
-2018-01-15 11:02:04.201 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmpprofile/create],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.DmpProfiles.setDmpProfile(eu.eudat.entities.DMPProfile)
-2018-01-15 11:02:04.203 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmpprofiles],methods=[GET]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.DmpProfiles.listDmpProfiles()
-2018-01-15 11:02:04.206 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmps/getSingle/{id}],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.DMPs.getSingle(java.lang.String,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.216 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmps/get],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.DMPs.getWithCriteria(eu.eudat.models.dmp.DataManagementPlanCriteriaRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.217 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmps/getPaged],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.DMPs.getPaged(eu.eudat.models.dmp.DataManagementPlanTableRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.218 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dmps/createOrUpdate],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.DMPs.createOrUpdate(eu.eudat.models.dmp.DataManagementPlan,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.221 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/twitterRequestToken],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Login.twitterRequestToken()
-2018-01-15 11:02:04.221 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/me],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Login.authMe(eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.222 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/externallogin],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Login.googleLogin(eu.eudat.models.login.LoginInfo)
-2018-01-15 11:02:04.223 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/logout],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Login.logout(eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.224 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/organisation/delete],methods=[POST],consumes=[application/json],produces=[text/plain]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Organisations.delete(eu.eudat.entities.Organisation)
-2018-01-15 11:02:04.228 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/organisations],methods=[GET]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.Organisations.listOrganisations()
-2018-01-15 11:02:04.228 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/organisation/getAll],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Organisations.getAllOrganisations()
-2018-01-15 11:02:04.229 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/external/organisations],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Organisations.listExternalOrganisations(java.lang.String)
-2018-01-15 11:02:04.230 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/organisation/create],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Organisations.setOrganisation(eu.eudat.entities.Organisation)
-2018-01-15 11:02:04.230 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/organisations/{id}],methods=[GET]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Organisations.getOrganisations(java.lang.String)
-2018-01-15 11:02:04.232 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/projects/get],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.Projects.get(eu.eudat.models.project.ProjectCriteriaRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.233 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/external/projects],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Projects.listExternalProjects(java.lang.String,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.234 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/projects/inactivate/{id}],methods=[DELETE],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Projects.inactivate(java.lang.String,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.236 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/projects/createOrUpdate],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Projects.addProject(eu.eudat.models.project.Project,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.236 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/projects/getSingle/{id}],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Projects.getPaged(java.lang.String,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.237 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/projects/getPaged],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.Projects.getPaged(eu.eudat.models.project.ProjectTableRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.239 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/projects/getWithExternal],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.Projects.getWithExternal(eu.eudat.models.project.ProjectCriteriaRequest,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.240 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/registry/delete],methods=[POST],consumes=[application/json],produces=[text/plain]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Registries.delete(eu.eudat.entities.Registry)
-2018-01-15 11:02:04.242 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/registry/create],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Registries.setRegistry(eu.eudat.entities.Registry)
-2018-01-15 11:02:04.243 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/external/registries],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Registries.listExternalRegistries(java.lang.String)
-2018-01-15 11:02:04.244 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/registries],methods=[GET]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.Registries.listRegistries()
-2018-01-15 11:02:04.244 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/registries/listAllLabelIDs],methods=[GET]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.Registries.listLabelIds()
-2018-01-15 11:02:04.245 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/registries/{id}],methods=[GET]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Registries.getRegistries(java.lang.String)
-2018-01-15 11:02:04.246 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/registry/getAll],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Registries.getAllRegistries()
-2018-01-15 11:02:04.248 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/researcher/delete],methods=[POST],consumes=[application/json],produces=[text/plain]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Researchers.delete(eu.eudat.entities.Researcher)
-2018-01-15 11:02:04.249 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/researcher/getByEmail],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Researchers.getResearcherByEmail(java.lang.String)
-2018-01-15 11:02:04.249 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/researcher/getAll],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.Researchers.getAllResearchers()
-2018-01-15 11:02:04.250 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/external/researchers],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Researchers.listExternalResearchers(java.lang.String)
-2018-01-15 11:02:04.251 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/researcher/create],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Researchers.setResearcher(eu.eudat.entities.Researcher)
-2018-01-15 11:02:04.252 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/researchers/{id}],methods=[GET]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Researchers.getResearchers(java.lang.String)
-2018-01-15 11:02:04.252 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/researchers],methods=[GET]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.Researchers.listResearchers()
-2018-01-15 11:02:04.254 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/service/delete],methods=[POST],consumes=[application/json],produces=[text/plain]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Services.delete(eu.eudat.entities.Service)
-2018-01-15 11:02:04.255 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/service/create],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Services.setService(eu.eudat.entities.Service)
-2018-01-15 11:02:04.256 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/services],methods=[GET]}" onto public org.springframework.http.ResponseEntity> eu.eudat.controllers.Services.listServices()
-2018-01-15 11:02:04.257 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/services/{id}],methods=[GET]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Services.getServices(java.lang.String)
-2018-01-15 11:02:04.257 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/service/getAll],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Services.getAllServices()
-2018-01-15 11:02:04.259 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/external/services],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.Services.listExternalServices(java.lang.String)
-2018-01-15 11:02:04.262 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/invite/getUsers],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem> eu.eudat.controllers.UserInvitationController.getUsers(eu.eudat.models.userinfo.UserInfoRequestItem)
-2018-01-15 11:02:04.263 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/invite/users],methods=[POST],consumes=[application/json],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.UserInvitationController.users(eu.eudat.models.invitation.Invitation,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.264 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/invite/exchange/{invitationID}],methods=[GET],produces=[application/json]}" onto public eu.eudat.models.helpers.responses.ResponseItem eu.eudat.controllers.UserInvitationController.exchange(java.util.UUID,eu.eudat.models.security.Principal)
-2018-01-15 11:02:04.265 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/user/whoami],methods=[GET],produces=[application/json;charset=UTF-8]}" onto public org.springframework.http.ResponseEntity eu.eudat.controllers.Users.whoami()
-2018-01-15 11:02:04.266 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/eu/eudat/proxy],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity eu.eudat.proxy.Proxy.proxy(java.lang.String)
-2018-01-15 11:02:04.270 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
-2018-01-15 11:02:04.270 INFO 8908 --- [restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
-2018-01-15 11:02:04.542 INFO 8908 --- [restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
-2018-01-15 11:02:04.542 INFO 8908 --- [restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
-2018-01-15 11:02:04.617 INFO 8908 --- [restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : Detected @ExceptionHandler methods in controllerErrorHandler
-2018-01-15 11:02:04.745 INFO 8908 --- [restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
-2018-01-15 11:02:04.865 INFO 8908 --- [restartedMain] oConfiguration$WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
-2018-01-15 11:02:06.710 INFO 8908 --- [restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
-2018-01-15 11:02:07.143 INFO 8908 --- [restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
-2018-01-15 11:02:07.617 INFO 8908 --- [restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
-2018-01-15 11:02:07.705 INFO 8908 --- [restartedMain] eu.eudat.EuDatApplication : Started EuDatApplication in 21.453 seconds (JVM running for 23.191)