added common module

This commit is contained in:
enricoottonello 2019-04-03 10:53:54 +02:00
parent 1a1ec7da8e
commit b316467608
13 changed files with 49 additions and 42 deletions

View File

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>eu.dnetlib</groupId>
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-mdstore-manager-app</artifactId>
<version>1.1.0-SNAPSHOT</version>
@ -55,6 +55,13 @@
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<!-- Common -->
<dependency>
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-common</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- Swagger -->
<dependency>

View File

@ -17,12 +17,12 @@ import org.springframework.web.bind.annotation.RestController;
import com.google.common.collect.Lists;
import eu.dnetlib.data.mdstore.manager.common.model.MDStore;
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreCurrentVersion;
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreVersion;
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreWithInfo;
import eu.dnetlib.data.mdstore.manager.exceptions.MDStoreManagerException;
import eu.dnetlib.data.mdstore.manager.exceptions.NoContentException;
import eu.dnetlib.data.mdstore.manager.model.MDStore;
import eu.dnetlib.data.mdstore.manager.model.MDStoreCurrentVersion;
import eu.dnetlib.data.mdstore.manager.model.MDStoreVersion;
import eu.dnetlib.data.mdstore.manager.model.MDStoreWithInfo;
import eu.dnetlib.data.mdstore.manager.repository.MDStoreCurrentVersionRepository;
import eu.dnetlib.data.mdstore.manager.repository.MDStoreRepository;
import eu.dnetlib.data.mdstore.manager.repository.MDStoreVersionRepository;
@ -72,7 +72,7 @@ public class MDStoreController {
}
@ApiOperation(value = "Create a new mdstore")
@RequestMapping(value = "/new/{format}/{layout}/{interpretation}", method = RequestMethod.PUT)
@RequestMapping(value = "/new/{format}/{layout}/{interpretation}", method = RequestMethod.GET)
public MDStoreWithInfo createMDStore(
@ApiParam("mdstore format") @PathVariable final String format,
@ApiParam("mdstore layout") @PathVariable final String layout,

View File

@ -3,7 +3,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import eu.dnetlib.data.mdstore.manager.model.MDStoreCurrentVersion;
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreCurrentVersion;
@Repository
public interface MDStoreCurrentVersionRepository extends JpaRepository<MDStoreCurrentVersion, String> {

View File

@ -3,7 +3,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import eu.dnetlib.data.mdstore.manager.model.MDStore;
import eu.dnetlib.data.mdstore.manager.common.model.MDStore;
@Repository
public interface MDStoreRepository extends JpaRepository<MDStore, String> {

View File

@ -3,7 +3,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import eu.dnetlib.data.mdstore.manager.model.MDStoreVersion;
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreVersion;
@Repository
public interface MDStoreVersionRepository extends JpaRepository<MDStoreVersion, String> {

View File

@ -2,7 +2,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
import org.springframework.stereotype.Repository;
import eu.dnetlib.data.mdstore.manager.model.MDStoreWithInfo;
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreWithInfo;
@Repository
public interface MDStoreWithInfoRepository extends ReadOnlyRepository<MDStoreWithInfo, String> {

View File

@ -21,7 +21,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
if (dsName || dsId || apiId) {
url += '?dsName=' + encodeURIComponent(dsName) + '&dsId=' + encodeURIComponent(dsId) + '&apiId=' + encodeURIComponent(apiId);
}
$http.put(url).success(function(data) {
$http.get(url).success(function(data) {
$scope.reload();
}).error(function() {
alert("error");

View File

@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<parent>
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>dhp-common</artifactId>
<packaging>jar</packaging>
<artifactId>dhp-common</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencies>
</project>

View File

@ -1,4 +1,4 @@
package eu.dnetlib.data.mdstore.manager.model;
package eu.dnetlib.data.mdstore.manager.common.model;
import java.io.Serializable;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.data.mdstore.manager.model;
package eu.dnetlib.data.mdstore.manager.common.model;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.data.mdstore.manager.model;
package eu.dnetlib.data.mdstore.manager.common.model;
import java.io.Serializable;
import java.util.Date;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.data.mdstore.manager.model;
package eu.dnetlib.data.mdstore.manager.common.model;
import java.io.Serializable;
import java.util.Date;

View File

@ -1,4 +1,4 @@
#Created by Apache Maven 3.5.2
#Created by Apache Maven 3.6.0
version=1.0.0
groupId=eu.dnetlib
artifactId=dhp-collector-worker