Commit d9d19738 authored by dietricf's avatar dietricf
Browse files

Initial Commit

parent 74a1ba4a
......@@ -12,23 +12,111 @@
<artifactId>grid-failure-Information</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>grid-failure-Information</name>
<description>Demo project for Spring Boot</description>
<description>Grid-Failure-Information Project for openKONSEQUENZ</description>
<properties>
<skip.asciidoc>false</skip.asciidoc>
<maven.test.skip>false</maven.test.skip>
<flyway.sqlMigrationSeparator>__</flyway.sqlMigrationSeparator>
<flyway.url>jdbc:postgresql://entopticadirx:5432/GridFailureInfoDevServer</flyway.url>
<flyway.user>cbd_service</flyway.user>
<flyway.password>gfi_service</flyway.password>
<flyway.schemas>public</flyway.schemas>
<flyway.locations>filesystem:src/main/resources/db/migration/</flyway.locations>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
<springfox.version>2.9.2</springfox.version>
<spring-security-test.version>5.2.1.RELEASE</spring-security-test.version>
<powerMockReflect.version>2.0.0</powerMockReflect.version>
<sonar-maven-plugin.version>3.2</sonar-maven-plugin.version>
<asciidoctor-maven-plugin-version>1.5.3</asciidoctor-maven-plugin-version>
<asciidoctorj-pdf-version>1.5.0-alpha.11</asciidoctorj-pdf-version>
<asciidoctorj-version>1.5.4</asciidoctorj-version>
<asciidoctorj-diagram-versions>1.5.4.1</asciidoctorj-diagram-versions>
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
<jruby-complete-version>9.0.0.0</jruby-complete-version>
<mapstruct.version>1.2.0.Final</mapstruct.version>
<flyway-core.version>6.0.8</flyway-core.version>
<postgresql.version>42.2.8</postgresql.version>
<lombock.version>1.18.10</lombock.version>
<h2.version>1.4.200</h2.version>
<jsonwebtoken.version>0.9.1</jsonwebtoken.version>
<openfeign.version>2.2.0.RELEASE</openfeign.version>
<keycloak-core.version>3.4.2.Final</keycloak-core.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway-core.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>${openfeign.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
<version>${openfeign.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${keycloak-core.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jsonwebtoken.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
......@@ -40,14 +128,158 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<version>${spring-security-test.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-reflect</artifactId>
<version>${powerMockReflect.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<configuration>
<skip>${maven.test.skip}</skip>
<output>file</output>
<append>true</append>
<excludes>
<exclude>**/Globals.*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor-maven-plugin-version}</version>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>${jruby-complete-version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-pdf</artifactId>
<version>${asciidoctorj-pdf-version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>${asciidoctorj-version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-diagram</artifactId>
<version>${asciidoctorj-diagram-versions}</version>
</dependency>
</dependencies>
<configuration>
<sourceDirectory>src/main/asciidoc</sourceDirectory>
<requires>
<require>asciidoctor-diagram</require>
</requires>
<attributes>
<imagesoutdir>${project.build.directory}/generated-docs/img</imagesoutdir>
<imagesDir>${project.build.directory}/generated-docs/img</imagesDir>
</attributes>
</configuration>
<executions>
<execution>
<id>output-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<skip>${skip.asciidoc}</skip>
<imagesDir>./img</imagesDir>
<requires>
<require>asciidoctor-diagram</require>
</requires>
<sourceHighlighter>coderay</sourceHighlighter>
<backend>html</backend>
<doctype>book</doctype>
</configuration>
</execution>
<execution>
<id>output-pdf</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<skip>${skip.asciidoc}</skip>
<imagesDir>${project.build.directory}/generated-docs/img</imagesDir>
<requires>
<require>asciidoctor-diagram</require>
</requires>
<sourceHighlighter>coderay</sourceHighlighter>
<backend>pdf</backend>
<doctype>book</doctype>
<attributes>
<icons>font</icons>
<pagenums />
<toc />
<idprefix />
<idseparator>-</idseparator>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
////
*******************************************************************************
* Copyright (c) 2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************
////
openKonsequenz - Architecture of the module 'Contact Base Data'
===============================================================
:Author: Frank Dietrich
:Email: frank.dietrich@pta.de
:Date: 2019-12-17
:Revision: 1
:icons:
:source-highlighter: highlightjs
:highlightjs-theme: solarized_dark
This documentation is based on the ARC42-Template (v7.0):
== Introduction and Goals
=== Requirements Overview
Many user modules of an openKONSEQUENZ installion need contact datas for their
daily business. Furthermore they have to fulfil the regulatory requirement
of the General Data Protection Regulation (GDPR).
This core module 'Contact Base Data' provides a central component for managing contact
datas including the crucial functionality of GDPR.
The full requirements of the module 'Contact Base Data' (in German: Modul 'Kontaktstammdaten') is described in the document
* "Anforderungsspezifikation Modul Kontaktstammdaten" version 1.2 / 07-11-2019.
=== Quality Goals
The module 'Contact Base Data' represents a core module that is based on the architecture platform of openKONSEQUENZ. The main quality
goals of the platform are:
* *Flexibility* The reference platform shall grant that different systems and modules from different vendors/developers can interact and interoperate, and may be exchanged or recombined.
* *Availability* All platform modules that are running on the platform can only be as available as the platform same for user modules that are based on platform modules.
* *Maintainability* (and testability as part of maintainability) The platform and its platform modules shall be used longer than 15 years.
* *Integration performance* New implemented functionality of oK own modules and external modules shall be included fast / automatically.
* *Security* The platform and its modules need to underly security-by-design
The main quality goals of the core module Contact Base Data are:
* *Functionality* The core module must fulfil the functional requirements mentioned in the section before
* *Ergonomics* The web interface must be realized according to oK-GUI-Styleguide.
* *Good documentation* (i.e. code and architecture documentation) makes code changes easier and automatic
tests facilitate rigorous verification.
* *Modifiability* (and testability as part of modifiability)
* *Integration performance* The core module must be easy integratable in different production environments.
The following documents contain the quality goals in detail:
* Architecture Committee Handbook v1.6.0 from 10-07-2019
* Quality Committee Handbook v2.0.1 from 15-10-2018
The architecture is based on the AC-Handbook. The quality demands are described in the QC-Handbook.
Both specifications were fully complied with in the project, so that a high quality is given.
The code quality regarding static code analysis and unit test code coverage on the backend and fronend sides
are ensured by the use of sonarqube. The rule set and the qualtity gate are defined by the default, the
so called "sonar way".
The module 'Contact Base Data' is part of the Eclipse project 'Eclipse openK Core Modules'.
This project bases on the Eclipse Public Licence 2.0.
=== Stakeholders
.Stakeholders
[options="header,footer"]
|=========================================================
|Role/Name|Contact|Expectations
|Product Owner (represents the Distribution System Operators)|Gordon Pickfort, Rainer Fuhrmann|The software must fulfil their functional and nonfunctional requirements.
|Module Developer|Michel Alessandrini, Jonas Tewolde, Frank Dietrich|All relevant business and technical information must be available for implementing the software.
|External Reviewer (represents the AC/QC)|n.n.|The software and the documentation is realized according to the Quality and Architecture Handbook of openKONSEQUENZ.
|External Reviewer (represents the Eclipse-Requirements)|n.n.|The software is licensed under the EPL 2.0. It must be validated that all requirements are fulfilled.
|System Integrator|n.n.|A documentation for the integration of the module in the DSO specific environments must be available.
|=========================================================
== Architecture Constraints
The main architecture constraints are:
* *Public License* The module must be available under the “Eclipse Public License 2.0”.
* *Standardization* The module must use the reference platform.
* *Availability* The source code of the module must be accessible to any interested person/company.
Therefore the project is published under the following repositories:
* https://git.eclipse.org/r/openk-usermodules/org.eclipse.openk-usermodules.contactBaseData.backend
* https://git.eclipse.org/r/openk-usermodules/org.eclipse.openk-usermodules.contactBaseData.frontend
=== Technical Constraints
The following technical constraints are given:
.Technical Contraints
[options="header,footer"]
|========================================================
|Component|Constraints
|Base components of the reference platform
a|* Application Server Tomcat
* JPA EclipseLink
* Database PostgreSQL
|Enterprise service bus
a|* ESB Talend
* Communication via RESTful Webservices
|Programming language frontend
a|* Angular
* Bootstrap
* jQuery
* REST/JSON Interfaces
|GUI design
a|* According to oK-GUI-Styleguide
|Java QA environment
a| * Sonarqube 5.6.6
|Programming language
a|* Backend: Java 1.8
* Frontend: Angular 7+ (Javascript, Typescript, HTML5, CSS3)
|IDE
a|* Not restricted (Eclipse, IntelliJ, Microsoft Developer Studio, Microsoft Visual Code ...)
|Build system
a|* Backend: Maven
* Frontend: NodeJS + Angular/cli
|Libraries, frameworks, components
a|* Used Libraries/Frameworks have to be compatible to the Eclipse Public License
|Architecture Documentation
a|* According ARC42-Template
|========================================================
=== Technical Dependencies
==== Modules
The following modules are required to use the 'Contact Base Data':
.Modules
[options="header,footer"]
|=========================================================
|Name of the module|Purpose|Status of the module
|'Auth&Auth'|Authentification and Authorization|available
|=========================================================
==== Libraries
The following libraries are used:
.Libraries
[options="header,footer"]
|=========================================================
|Name of the library|Version|Artefact-id|Usage|License|Tier
|org.springframework.boot.spring-boot-starter-parent|2.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.springframework.boot.spring-boot-starter-data-jpa|2.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.springframework.boot.spring-boot-starter-oauth2-client|2.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.springframework.boot.spring-boot-starter-security|2.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.springframework.boot.spring-boot-starter-web|2.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.flywaydb.flyway-core|6.0.8
a|
||Apache License 2.0|Backend
|org.springframework.cloud.spring-cloud-starter-openfeign|2.2.0.RELEASE
a|
||Apache License 2.0|Backend
|org.springframework.cloud.spring-cloud-starter-netflix-ribbon|2.2.0.RELEASE
a|
||Apache License 2.0|Backend
|org.keycloak.keycloak-core|3.4.2_Final
a|
||Apache License 2.0|Backend
|org.postgresql.postgresql|42.2.8
a|
||New BSD License|Backend
|org.projectlombok.lombok|1.18.10
a|
||MIT|Backend
|org.mapstruct.mapstruct-processor|1.2.0.Final
a|
||Apache License 2.0|Backend
|io.jsonwebtoken.jjwt|0.9.1
a|
||Apache License 2.0|Backend
|io.springfox.springfox-swagger2|2.9.2
a|
||Apache License 2.0|Backend
|io.springfox.springfox-swagger-ui|2.9.2
a|
||Apache License 2.0|Backend
|org.springframework.boot.spring-boot-starter-test|2.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.springframework.security.spring-security-test|5.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.powermock.powermock-reflect|2.0.0
a|
||Apache License 2.0|Backend
|com.h2database.h2|1.4.200
a|
||EPL|Backend
|org.springframework.cloud.spring-cloud-dependencies|Hoxton.RELEASE
a|
||Apache License 2.0|Backend
|org.springframework.boot.spring-boot-maven-plugin|2.2.1.RELEASE
a|
||Apache License 2.0|Backend
|org.jacoco.jacoco-maven-plugin|0.7.9
a|
||EPL 2.0|Backend
|org.sonarsource.scanner.maven.sonar-maven-plugin|3.2
a|
||LGPL 3.0|Backend
|org.asciidoctor.asciidoctor-maven-plugin|1.5.3
a|
||Apache License 2.0|Backend
|org.jruby.jruby-complete|9.0.0.0
a|
||EPL 2.0|Backend
|org.asciidoctor.asciidoctorj-pdf|1.5.0-alpha.11
a|
||Apache 2.0|Backend
|org.asciidoctor.asciidoctorj|1.5.4
a|
||Apache 2.0|Backend
|org.asciidoctor.asciidoctorj-pdf|1.5.0-alpha.11
a|
||Apache 2.0|Backend
|org.asciidoctor.asciidoctorj-diagram|1.5.4.1
a|
||Apache 2.0|Backend
|Angular Font Awesome|3.1.2
a|
||MIT License|Frontend
|@auth0/angular-jwt|3.0.1
a|
||MIT License|Frontend
|font-awesome|4.7.0
a|
||MIT License|Frontend
|@ngrx/core|1.2.0
a|
||MIT License|Frontend
|@ngrx/effects|8-2-0
a|
||MIT License|Frontend
|@ngrx/store|8.3.0
a|
||MIT License|Frontend
|@ngrx/store-devtools|8.2.0
a|
||MIT License|Frontend
|@ngx-translate/core|11.0.1
a|
||MIT License|Frontend
|@ngx-translate/http-loader|4.0.0
a|
||MIT License|Frontend
|ag-grid-angular|21.2.1
a|
||MIT License|Frontend
|ag-grid-community|21.2.1
a|
||MIT License|Frontend