Rename project to developers-api
This commit is contained in:
parent
b0a4b3306f
commit
eb3ec60257
8
pom.xml
8
pom.xml
|
@ -6,12 +6,12 @@
|
|||
<artifactId>uoa-spring-boot-parent</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>client-management</artifactId>
|
||||
<artifactId>developers-api</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<name>client-management</name>
|
||||
<name>developers-api</name>
|
||||
<scm>
|
||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:MaDgIK/client-management.git</developerConnection>
|
||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:MaDgIK/developers-api.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
<dependencies>
|
||||
|
@ -60,7 +60,7 @@
|
|||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot-version}</version>
|
||||
<configuration>
|
||||
<mainClass>eu.dnetlib.clientmanagement.ClientManagementApplication</mainClass>
|
||||
<mainClass>eu.dnetlib.developers.ClientManagementApplication</mainClass>
|
||||
<executable>true</executable>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
|
|
@ -11,5 +11,4 @@ CREATE TABLE IF NOT EXISTS personal_info
|
|||
);
|
||||
|
||||
ALTER TABLE ONLY personal_info DROP CONSTRAINT IF EXISTS personal_info_pkey;
|
||||
|
||||
ALTER TABLE ONLY personal_info ADD CONSTRAINT personal_info_pkey PRIMARY KEY (id);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
ALTER TABLE ONLY personal_info ADD COLUMN affilation_type character varying(255);
|
||||
ALTER TABLE ONLY registered_service ADD COLUMN description character varying(255);
|
||||
ALTER TABLE ONLY registered_service ADD COLUMN frequency character varying(255);
|
||||
ALTER TABLE ONLY registered_service ADD COLUMN target text[];
|
|
@ -1,7 +1,7 @@
|
|||
package eu.dnetlib.clientmanagement;
|
||||
package eu.dnetlib.developers;
|
||||
|
||||
import eu.dnetlib.authentication.configuration.AuthenticationConfiguration;
|
||||
import eu.dnetlib.clientmanagement.configuration.Properties;
|
||||
import eu.dnetlib.developers.configuration.Properties;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
|
@ -9,10 +9,10 @@ import org.springframework.context.annotation.Import;
|
|||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.context.annotation.PropertySources;
|
||||
|
||||
@SpringBootApplication(scanBasePackages = {"eu.dnetlib.clientmanagement"})
|
||||
@SpringBootApplication(scanBasePackages = {"eu.dnetlib.developers"})
|
||||
@PropertySources({
|
||||
@PropertySource("classpath:authentication.properties"),
|
||||
@PropertySource("classpath:client-management.properties"),
|
||||
@PropertySource("classpath:developers.properties"),
|
||||
@PropertySource(value = "classpath:dnet-override.properties", ignoreResourceNotFound = true)
|
||||
})
|
||||
@Import({AuthenticationConfiguration.class})
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement;
|
||||
package eu.dnetlib.developers;
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.configuration;
|
||||
package eu.dnetlib.developers.configuration;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.configuration;
|
||||
package eu.dnetlib.developers.configuration;
|
||||
|
||||
public class Datasource {
|
||||
private String driver;
|
|
@ -1,8 +1,8 @@
|
|||
package eu.dnetlib.clientmanagement.configuration;
|
||||
package eu.dnetlib.developers.configuration;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@ConfigurationProperties("client-management")
|
||||
@ConfigurationProperties("developers")
|
||||
public class Properties {
|
||||
Datasource datasource;
|
||||
String issuer;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.configuration;
|
||||
package eu.dnetlib.developers.configuration;
|
||||
|
||||
import eu.dnetlib.authentication.configuration.APIProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,9 +1,9 @@
|
|||
package eu.dnetlib.clientmanagement.controllers;
|
||||
package eu.dnetlib.developers.controllers;
|
||||
|
||||
import eu.dnetlib.clientmanagement.dto.RegisteredAT;
|
||||
import eu.dnetlib.clientmanagement.dto.API;
|
||||
import eu.dnetlib.clientmanagement.dto.ServiceForm;
|
||||
import eu.dnetlib.clientmanagement.services.APIService;
|
||||
import eu.dnetlib.developers.dto.RegisteredAT;
|
||||
import eu.dnetlib.developers.dto.API;
|
||||
import eu.dnetlib.developers.dto.ServiceForm;
|
||||
import eu.dnetlib.developers.services.APIService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.controllers;
|
||||
package eu.dnetlib.developers.controllers;
|
||||
|
||||
import eu.dnetlib.authentication.configuration.AuthenticationConfiguration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
@ -23,8 +23,8 @@ public class HealthController {
|
|||
|
||||
@RequestMapping(value = {"", "/health_check"}, method = RequestMethod.GET)
|
||||
public String hello() {
|
||||
log.debug("Hello from Client Management service!");
|
||||
return "Hello from Client Management service!";
|
||||
log.debug("Hello from Developers API service!");
|
||||
return "Hello from Developers API service!";
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAnyAuthority('PORTAL_ADMINISTRATOR')")
|
|
@ -1,7 +1,7 @@
|
|||
package eu.dnetlib.clientmanagement.controllers;
|
||||
package eu.dnetlib.developers.controllers;
|
||||
|
||||
import eu.dnetlib.clientmanagement.entities.PersonalInfo;
|
||||
import eu.dnetlib.clientmanagement.services.PersonalInfoService;
|
||||
import eu.dnetlib.developers.entities.PersonalInfo;
|
||||
import eu.dnetlib.developers.services.PersonalInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@ -1,6 +1,6 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import eu.dnetlib.clientmanagement.entities.RegisteredService;
|
||||
import eu.dnetlib.developers.entities.RegisteredService;
|
||||
|
||||
public class API {
|
||||
private RegisteredService service;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import com.google.gson.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.dto;
|
||||
package eu.dnetlib.developers.dto;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.entities;
|
||||
package eu.dnetlib.developers.entities;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.entities;
|
||||
package eu.dnetlib.developers.entities;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.exceptions;
|
||||
package eu.dnetlib.developers.exceptions;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.exceptions;
|
||||
package eu.dnetlib.developers.exceptions;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
@ -1,4 +1,4 @@
|
|||
package eu.dnetlib.clientmanagement.exceptions;
|
||||
package eu.dnetlib.developers.exceptions;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
@ -1,8 +1,6 @@
|
|||
package eu.dnetlib.clientmanagement.repositories;
|
||||
package eu.dnetlib.developers.repositories;
|
||||
|
||||
import eu.dnetlib.clientmanagement.entities.PersonalInfo;
|
||||
import eu.dnetlib.clientmanagement.entities.RegisteredService;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import eu.dnetlib.developers.entities.PersonalInfo;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package eu.dnetlib.clientmanagement.repositories;
|
||||
package eu.dnetlib.developers.repositories;
|
||||
|
||||
import eu.dnetlib.clientmanagement.entities.RegisteredService;
|
||||
import eu.dnetlib.developers.entities.RegisteredService;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
package eu.dnetlib.clientmanagement.services;
|
||||
package eu.dnetlib.developers.services;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import eu.dnetlib.clientmanagement.configuration.Properties;
|
||||
import eu.dnetlib.clientmanagement.dto.*;
|
||||
import eu.dnetlib.clientmanagement.entities.RegisteredService;
|
||||
import eu.dnetlib.clientmanagement.exceptions.EntityMissingException;
|
||||
import eu.dnetlib.clientmanagement.exceptions.EntityNotFoundException;
|
||||
import eu.dnetlib.clientmanagement.exceptions.ForbiddenException;
|
||||
import eu.dnetlib.clientmanagement.repositories.RegisteredServiceDAO;
|
||||
import eu.dnetlib.developers.configuration.Properties;
|
||||
import eu.dnetlib.developers.dto.*;
|
||||
import eu.dnetlib.developers.entities.RegisteredService;
|
||||
import eu.dnetlib.developers.exceptions.EntityMissingException;
|
||||
import eu.dnetlib.developers.exceptions.EntityNotFoundException;
|
||||
import eu.dnetlib.developers.exceptions.ForbiddenException;
|
||||
import eu.dnetlib.developers.repositories.RegisteredServiceDAO;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.*;
|
|
@ -1,8 +1,8 @@
|
|||
package eu.dnetlib.clientmanagement.services;
|
||||
package eu.dnetlib.developers.services;
|
||||
|
||||
import eu.dnetlib.clientmanagement.entities.RegisteredService;
|
||||
import eu.dnetlib.clientmanagement.repositories.PersonalInfoDAO;
|
||||
import eu.dnetlib.clientmanagement.repositories.RegisteredServiceDAO;
|
||||
import eu.dnetlib.developers.entities.RegisteredService;
|
||||
import eu.dnetlib.developers.repositories.PersonalInfoDAO;
|
||||
import eu.dnetlib.developers.repositories.RegisteredServiceDAO;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
|
@ -1,10 +1,8 @@
|
|||
package eu.dnetlib.clientmanagement.services;
|
||||
package eu.dnetlib.developers.services;
|
||||
|
||||
import eu.dnetlib.clientmanagement.entities.PersonalInfo;
|
||||
import eu.dnetlib.clientmanagement.entities.RegisteredService;
|
||||
import eu.dnetlib.clientmanagement.exceptions.EntityNotFoundException;
|
||||
import eu.dnetlib.clientmanagement.repositories.PersonalInfoDAO;
|
||||
import eu.dnetlib.clientmanagement.repositories.RegisteredServiceDAO;
|
||||
import eu.dnetlib.developers.entities.PersonalInfo;
|
||||
import eu.dnetlib.developers.exceptions.EntityNotFoundException;
|
||||
import eu.dnetlib.developers.repositories.PersonalInfoDAO;
|
||||
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
|
@ -1,12 +0,0 @@
|
|||
client-management.datasource.driver=org.postgresql.Driver
|
||||
client-management.datasource.url=jdbc:postgresql://dl170.madgik.di.uoa.gr:5432/usersdb
|
||||
client-management.datasource.username=username
|
||||
client-management.datasource.password=pass
|
||||
client-management.issuer=issuer
|
||||
|
||||
spring.jpa.hibernate.ddl-auto=none
|
||||
|
||||
## API Documentation Properties
|
||||
api.title = Client Management
|
||||
api.description = Client Management includes authentication methods and provides functionalities to manage OpenAIRE Dynamic AAI Clients.
|
||||
api.version = ${project.version}
|
|
@ -0,0 +1,12 @@
|
|||
developers.datasource.driver=org.postgresql.Driver
|
||||
developers.datasource.url=jdbc:postgresql://dl170.madgik.di.uoa.gr:5432/usersdb
|
||||
developers.datasource.username=username
|
||||
developers.datasource.password=pass
|
||||
developers.issuer=issuer
|
||||
|
||||
spring.jpa.hibernate.ddl-auto=none
|
||||
|
||||
## API Documentation Properties
|
||||
api.title = Developers API
|
||||
api.description = Developers API includes authentication methods and provides functionalities to manage OpenAIRE Dynamic AAI APIs.
|
||||
api.version = ${project.version}
|
|
@ -7,8 +7,8 @@
|
|||
</Properties>
|
||||
<Appenders>
|
||||
<!-- Rolling File Appender -->
|
||||
<RollingFile name="R" fileName="/var/log/dnet/client-management/client-management.log"
|
||||
filePattern="/var/log/dnet/client-management/client-management-%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="R" fileName="/var/log/dnet/developers-api/developers-api.log"
|
||||
filePattern="/var/log/dnet/developers-api/developers-api-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout>
|
||||
<Pattern>${LOG_PATTERN}</Pattern>
|
||||
</PatternLayout>
|
||||
|
@ -17,8 +17,8 @@
|
|||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingFile>
|
||||
<RollingFile name="S" fileName="/var/log/dnet/client-management/client-management-spring.log"
|
||||
filePattern="/var/log/dnet/client-management/client-management-spring-%d{yyyy-MM-dd}-%i.log">
|
||||
<RollingFile name="S" fileName="/var/log/dnet/developers-api/developers-api-spring.log"
|
||||
filePattern="/var/log/dnet/developers-api/developers-api-spring-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout>
|
||||
<Pattern>${LOG_PATTERN}</Pattern>
|
||||
</PatternLayout>
|
||||
|
|
Loading…
Reference in New Issue