Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.backend into SI-153-SARIS-Schnittstelle
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..99ae653
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectRootManager" version="2" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+</project>
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..f357e1f
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/org.eclipse.openk-usermodules.gridFailureInformation.backend.iml" filepath="$PROJECT_DIR$/.idea/org.eclipse.openk-usermodules.gridFailureInformation.backend.iml" />
+ </modules>
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/org.eclipse.openk-usermodules.gridFailureInformation.backend.iml b/.idea/org.eclipse.openk-usermodules.gridFailureInformation.backend.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/org.eclipse.openk-usermodules.gridFailureInformation.backend.iml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/3/4/34d646736ecacfcbb8cb9909b3cdaa5e74530360 b/.idea/sonarlint/issuestore/3/4/34d646736ecacfcbb8cb9909b3cdaa5e74530360
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.idea/sonarlint/issuestore/3/4/34d646736ecacfcbb8cb9909b3cdaa5e74530360
diff --git a/.idea/sonarlint/issuestore/b/2/b294790a0abf6e6345fdbe7b70e1480d994e4db9 b/.idea/sonarlint/issuestore/b/2/b294790a0abf6e6345fdbe7b70e1480d994e4db9
new file mode 100644
index 0000000..cf74629
--- /dev/null
+++ b/.idea/sonarlint/issuestore/b/2/b294790a0abf6e6345fdbe7b70e1480d994e4db9
@@ -0,0 +1,3 @@
+
+
+java:S1186"Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(ÈÊðÞ
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb
new file mode 100644
index 0000000..46f406e
--- /dev/null
+++ b/.idea/sonarlint/issuestore/index.pb
@@ -0,0 +1,5 @@
+
+
+mgfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/DmzExportSchedulerConfig.java,b\2\b294790a0abf6e6345fdbe7b70e1480d994e4db9
+d
+4gfsBackendService/src/main/resources/application.yml,3\4\34d646736ecacfcbb8cb9909b3cdaa5e74530360
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/SARIS-Interface/.gitignore b/SARIS-Interface/.gitignore
new file mode 100644
index 0000000..22921f0
--- /dev/null
+++ b/SARIS-Interface/.gitignore
@@ -0,0 +1,37 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**
+!**/src/test/**
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### Logs ###
+/logs
+
+### Sonar ###
+/.scannerwork
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+
+### VS Code ###
+.vscode/
diff --git a/SARIS-Interface/Dockerfile_DevServer b/SARIS-Interface/Dockerfile_DevServer
new file mode 100644
index 0000000..66c3eaa
--- /dev/null
+++ b/SARIS-Interface/Dockerfile_DevServer
@@ -0,0 +1,13 @@
+FROM openjdk:8-jre-alpine
+
+ENV JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
+ENV HTTP_PROXY http://webproxy3.pta.de:8080
+ENV HTTPS_PROXY http://webproxy3.pta.de:8080
+ENV TZ Europe/Berlin
+
+# install tzdata to set the right timezone
+RUN apk add --no-cache tzdata
+
+COPY /target/grid-failure-information.backend.stoerungsauskunft-interface.jar /usr/src/cbd/
+WORKDIR usr/src/cbd
+CMD ["java", "-jar", "-Dspring.profiles.active=devserver", "grid-failure-information.backend.stoerungsauskunft-interface.jar"]
\ No newline at end of file
diff --git a/SARIS-Interface/Dockerfile_DevServerUnsecure b/SARIS-Interface/Dockerfile_DevServerUnsecure
new file mode 100644
index 0000000..dc10133
--- /dev/null
+++ b/SARIS-Interface/Dockerfile_DevServerUnsecure
@@ -0,0 +1,13 @@
+FROM openjdk:8-jre-alpine
+
+ENV JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
+ENV HTTP_PROXY http://webproxy3.pta.de:8080
+ENV HTTPS_PROXY http://webproxy3.pta.de:8080
+ENV TZ Europe/Berlin
+
+# install tzdata to set the right timezone
+RUN apk add --no-cache tzdata
+
+COPY /target/grid-failure-information.backend.stoerungsauskunft-interface.jar /usr/src/cbd/
+WORKDIR usr/src/cbd
+CMD ["java", "-jar", "-Dspring.profiles.active=devserver-unsecure", "grid-failure-information.backend.stoerungsauskunft-interface.jar"]
\ No newline at end of file
diff --git a/SARIS-Interface/lombok.config b/SARIS-Interface/lombok.config
new file mode 100644
index 0000000..a23edb4
--- /dev/null
+++ b/SARIS-Interface/lombok.config
@@ -0,0 +1,2 @@
+config.stopBubbling = true
+lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
diff --git a/SARIS-Interface/mvnw b/SARIS-Interface/mvnw
new file mode 100644
index 0000000..a16b543
--- /dev/null
+++ b/SARIS-Interface/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/SARIS-Interface/mvnw.cmd b/SARIS-Interface/mvnw.cmd
new file mode 100644
index 0000000..c8d4337
--- /dev/null
+++ b/SARIS-Interface/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/SARIS-Interface/pom.xml b/SARIS-Interface/pom.xml
new file mode 100644
index 0000000..2309ccb
--- /dev/null
+++ b/SARIS-Interface/pom.xml
@@ -0,0 +1,233 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-parent</artifactId>
+ <version>2.2.4.RELEASE</version>
+ <relativePath/> <!-- lookup parent from repository -->
+ </parent>
+ <groupId>org.eclipse.openk</groupId>
+ <artifactId>grid-failure-information.backend.saris-interface</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>grid-failure-information.saris-interface</name>
+ <description>Grid-Failure-Information Project for openKONSEQUENZ</description>
+
+ <properties>
+ <skip.asciidoc>false</skip.asciidoc>
+ <maven.test.skip>false</maven.test.skip>
+
+ <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.8.5</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>
+ <nexmo.version>5.2.1</nexmo.version>
+ <rabbitmq.version>5.2.0</rabbitmq.version>
+ </properties>
+
+ <dependencies>
+ <!-- https://mvnrepository.com/artifact/org.springframework.amqp/spring-rabbit-test -->
+ <dependency>
+ <groupId>org.springframework.amqp</groupId>
+ <artifactId>spring-rabbit-test</artifactId>
+ <version>2.2.7.RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web-services</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-amqp</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-integration</artifactId>
+ <version>2.2.5.RELEASE</version>
+ </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.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>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-reflect</artifactId>
+ <version>${powerMockReflect.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.batch</groupId>
+ <artifactId>spring-batch-core</artifactId>
+ <version>4.2.1.RELEASE</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.batch</groupId>
+ <artifactId>spring-batch-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.rabbitmq</groupId>
+ <artifactId>amqp-client</artifactId>
+ <version>${rabbitmq.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.springframework.cloud</groupId>
+ <artifactId>spring-cloud-contract-wiremock</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-stream-test-support</artifactId>
+ <scope>test</scope>
+ </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>
+ <!-- tag::wsdl[] -->
+ <plugin>
+ <groupId>org.jvnet.jaxb2.maven2</groupId>
+ <artifactId>maven-jaxb2-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>wsdl-generate</id>
+ <configuration>
+ <generatePackage>org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl</generatePackage>
+ <schemaIncludes>
+ <include>*.wsdl</include>
+ <!-- <include>countries.wsdl</include> -->
+ <!-- <include>Stoerungenservice.wsdl</include> -->
+ </schemaIncludes>
+ <catalog>${project.basedir}/src/main/resources/catalog.cat</catalog>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/SARIS-Interface/sarisMockResponse.xml b/SARIS-Interface/sarisMockResponse.xml
new file mode 100644
index 0000000..363fbba
--- /dev/null
+++ b/SARIS-Interface/sarisMockResponse.xml
@@ -0,0 +1,21 @@
+<GetAktuelleGVUsInfoAllgemeinResponse xmlns="http://tempuri.org/">
+ <GetAktuelleGVUsInfoAllgemeinResult>
+ <ViewGeplanteVU>
+ <VersorgungsunterbrechungID>92230</VersorgungsunterbrechungID>
+ <Beginn>2019-07-18T08:00:00</Beginn>
+ <Ende>2019-07-18T09:30:00</Ende>
+ <AnzahlKunden>1</AnzahlKunden>
+ <Ort>Dollern</Ort>
+ <Strasse>Gerstenkamp</Strasse>
+ <Hausnummern>1-13</Hausnummern>
+ <Bemerkung>Hausanschluss herstellen bei Hs. Nr. 3 a</Bemerkung>
+ <Realisiert>false</Realisiert>
+ <StrassenAbschnittID>317752</StrassenAbschnittID>
+ <LetzteAenderungAm>0001-01-01T00:00:00</LetzteAenderungAm>
+ <Stoerung>265906</Stoerung>
+ <Plz>21739</Plz>
+ <SparteID>2899</SparteID>
+ <Sparte>GVU Strom</Sparte>
+ </ViewGeplanteVU>
+ </GetAktuelleGVUsInfoAllgemeinResult>
+</GetAktuelleGVUsInfoAllgemeinResponse>
diff --git a/SARIS-Interface/sonar-project.properties b/SARIS-Interface/sonar-project.properties
new file mode 100644
index 0000000..542718f
--- /dev/null
+++ b/SARIS-Interface/sonar-project.properties
@@ -0,0 +1,19 @@
+# must be unique in a given SonarQube instance
+sonar.projectKey=openk.pta.de:stoerungsauskunftinterface
+# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
+sonar.projectName=grid-failure-information.stoerungsauskunftinterface
+sonar.projectVersion=0.0.1_Snapshot
+sonar.java.binaries=target/classes
+
+# Language
+sonar.language=
+
+sonar.sourceEncoding=UTF-8
+sonar.sources=src/main
+sonar.exclusions=**/model/*.java,**/viewmodel/*.java,**/dtos/*.java, **/RabbitMqConfig.java
+sonar.tests=src/test
+#sonar.test.inclusions=**/*.spec.ts
+sonar.test.exclusions=**/model/**,**/viewmodel/**,**/dtos/*.java, **/RabbitMqConfig.java
+#sonar.ts.tslintconfigpath=tslint.json
+
+sonar.typescript.lcov.reportPaths=coverage/lcov.info
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/SarisInterfaceApplication.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/SarisInterfaceApplication.java
new file mode 100644
index 0000000..6a9fb13
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/SarisInterfaceApplication.java
@@ -0,0 +1,15 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+@SpringBootApplication
+@EnableFeignClients
+public class SarisInterfaceApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SarisInterfaceApplication.class);
+ }
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/api/StoerungsauskunftApi.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/api/StoerungsauskunftApi.java
new file mode 100644
index 0000000..e5bccd0
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/api/StoerungsauskunftApi.java
@@ -0,0 +1,37 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+*/
+package org.eclipse.openk.gridfailureinformation.sarisinterface.api;
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.StoerungsauskunftOutage;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.StoerungsauskunftUserNotification;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+
+@FeignClient(name="Stoerauskunft.de", url= "${stoerungsauskunft.apiUrl}")
+public interface StoerungsauskunftApi {
+
+ @PostMapping(value= "/outage")
+ feign.Response postOutage(@RequestBody List<StoerungsauskunftOutage> outage);
+
+ @GetMapping(value= "/reports")
+ List<StoerungsauskunftUserNotification> getUserNotification(@RequestParam(value="sectorType") Integer sectorType);
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/FeignClientConfig.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/FeignClientConfig.java
new file mode 100644
index 0000000..c10a547
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/FeignClientConfig.java
@@ -0,0 +1,24 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config;
+
+import feign.RequestInterceptor;
+import feign.auth.BasicAuthRequestInterceptor;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Log4j2
+@Configuration
+public class FeignClientConfig {
+
+ @Value("${stoerungsauskunft.user}")
+ public String user;
+ @Value("${stoerungsauskunft.password}")
+ public String password;
+
+ @Bean
+ public RequestInterceptor basicAuthRequestInterceptor() {
+ return new BasicAuthRequestInterceptor(user, password);
+ }
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/ImportSchedulerConfig.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/ImportSchedulerConfig.java
new file mode 100644
index 0000000..a7f9df9
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/ImportSchedulerConfig.java
@@ -0,0 +1,38 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config;
+
+import lombok.extern.log4j.Log4j2;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.service.ImportService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+@Log4j2
+@Configuration
+@EnableScheduling
+@ConditionalOnProperty(prefix = "stoerungsauskunft.scheduling-import", name = "enabled", havingValue = "true", matchIfMissing = false)
+public class ImportSchedulerConfig {
+
+ private static final String SCHEDULER_NAME = "Stoerauskunftimport-Scheduler";
+
+ @Autowired
+ ImportService importService;
+
+ @Value("${stoerungsauskunft.scheduling-import.cron}")
+ private String cronExpression;
+
+ @Bean
+ public void logConfigLdap() {
+ log.info(SCHEDULER_NAME + " is enabled with cron expression: " + cronExpression);
+ }
+
+ @Scheduled(cron = "${stoerungsauskunft.scheduling-import.cron}")
+ public void scheduleTaskImportUserNotifications() {
+ log.info("Executing" + SCHEDULER_NAME + " task: Importing available usernotifications from stoerungsauskunft.de");
+ importService.importUserNotifications();
+ log.info("Finished " + SCHEDULER_NAME + " task: Importing available usernotifications from stoerungsauskunft.de");
+ }
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SoapClientConfig.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SoapClientConfig.java
new file mode 100644
index 0000000..e9888d4
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SoapClientConfig.java
@@ -0,0 +1,25 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config;
+/*
+import com.sun.xml.internal.ws.developer.JAXBContextFactory;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class SoapClientConfig {
+
+ private static final JAXBContextFactory jaxbFactory = new JAXBContextFactory.Builder()
+ .withMarshallerJAXBEncoding("UTF-8")
+ .withMarshallerSchemaLocation("http://apihost http://apihost/schema.xsd")
+ .build();
+
+ @Bean
+ public Encoder feignEncoder() {
+ return new SOAPEncoder(jaxbFactory);
+ }
+ @Bean
+ public Decoder feignDecoder() {
+ return new SOAPDecoder(jaxbFactory);
+ }
+}*/
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SoapConfiguration.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SoapConfiguration.java
new file mode 100644
index 0000000..bbb1d82
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SoapConfiguration.java
@@ -0,0 +1,30 @@
+
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config;
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.service.SarisWebservice;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.oxm.jaxb.Jaxb2Marshaller;
+
+@Configuration
+public class SoapConfiguration {
+
+ @Bean
+ public Jaxb2Marshaller marshaller() {
+ Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
+ // this package must match the package in the <generatePackage> specified in
+ // pom.xml
+ marshaller.setContextPath("org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl");
+ return marshaller;
+ }
+
+ @Bean
+ public SarisWebservice sarisWebservice(Jaxb2Marshaller marshaller) {
+ SarisWebservice sarisWebservice = new SarisWebservice();
+// sarisWebservice.setDefaultUri("http://localhost:8080/ws");
+ sarisWebservice.setMarshaller(marshaller);
+ sarisWebservice.setUnmarshaller(marshaller);
+ return sarisWebservice;
+ }
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SwaggerConfig.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SwaggerConfig.java
new file mode 100644
index 0000000..44322d0
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/SwaggerConfig.java
@@ -0,0 +1,35 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.paths.RelativePathProvider;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import javax.servlet.ServletContext;
+
+@Log4j2
+@Configuration
+@EnableSwagger2
+@Profile({"!test","!prod"})
+public class SwaggerConfig {
+
+ @Value("${swagger.baseUrl:}")
+ public String baseUrl;
+ @Value("${swagger.proxyUrl:}")
+ public String proxyUrl;
+
+ @Bean
+ public Docket api(ServletContext servletContext) {
+ return new Docket(DocumentationType.SWAGGER_2).pathProvider(new RelativePathProvider(servletContext) {
+ @Override
+ public String getApplicationBasePath() {
+ return baseUrl + super.getApplicationBasePath();
+ }
+ }).host(proxyUrl);
+ }
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/rabbitMq/RabbitMqConfig.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/rabbitMq/RabbitMqConfig.java
new file mode 100644
index 0000000..5884433
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/rabbitMq/RabbitMqConfig.java
@@ -0,0 +1,73 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config.rabbitMq;
+
+import lombok.Data;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.amqp.core.BindingBuilder;
+import org.springframework.amqp.core.DirectExchange;
+import org.springframework.amqp.core.Queue;
+import org.springframework.amqp.rabbit.annotation.EnableRabbit;
+import org.springframework.amqp.rabbit.core.RabbitAdmin;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.integration.annotation.ServiceActivator;
+import org.springframework.integration.channel.DirectChannel;
+import org.springframework.integration.config.EnableIntegration;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.MessageHandler;
+
+import javax.annotation.PostConstruct;
+
+@Profile("!test")
+@Configuration
+@Log4j2
+@EnableRabbit
+@EnableIntegration
+@Data
+public class RabbitMqConfig {
+
+ @Autowired
+ private RabbitTemplate rabbitTemplate;
+
+ @Autowired
+ private RabbitMqProperties rabbitMqProperties;
+
+ @Bean
+ public MessageChannel failureImportChannel() {
+ return new DirectChannel();
+ }
+
+ @PostConstruct
+ public void buildAllQueues() {
+ log.info("RabbitMqConfig: Configuring all Exchanges and Queues");
+
+ RabbitAdmin admin = new RabbitAdmin(rabbitTemplate);
+
+ // Neuerstellung Exchange und Queues (Import) falls diese nicht vorhanden sind (passiert nur dann!)
+ DirectExchange importExchange = new DirectExchange(rabbitMqProperties.getImportExchange());
+ log.info("************** Configure Import RabbitMQ **************");
+ log.info("ImportExchange: " + rabbitMqProperties.getImportExchange());
+ admin.declareExchange(importExchange);
+ Queue importQueue = new Queue(rabbitMqProperties.getImportQueue());
+ log.info("ImportQueue: " + rabbitMqProperties.getImportQueue());
+ log.info("ImportKey: " + rabbitMqProperties.getImportKey());
+ admin.declareQueue(importQueue);
+ admin.declareBinding(BindingBuilder.bind(importQueue).to(importExchange).with(rabbitMqProperties.getImportKey()));
+
+ }
+
+ @Bean
+ @ServiceActivator(inputChannel = "failureImportChannel")
+ public MessageHandler messageHandler() {
+
+ return message -> rabbitTemplate.convertAndSend(rabbitMqProperties.getImportExchange(),
+ rabbitMqProperties.getImportKey(), message.getPayload(), message1 -> {
+ message1.getMessageProperties().getHeaders().put("metaId", message.getHeaders().get("metaId"));
+ message1.getMessageProperties().getHeaders().put("description", message.getHeaders().get("description"));
+ message1.getMessageProperties().getHeaders().put("source", message.getHeaders().get("source"));
+ return message1;
+ });
+ }
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/rabbitMq/RabbitMqProperties.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/rabbitMq/RabbitMqProperties.java
new file mode 100644
index 0000000..cac6c93
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/rabbitMq/RabbitMqProperties.java
@@ -0,0 +1,30 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config.rabbitMq;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+@Getter
+@Setter
+@Configuration
+@ConfigurationProperties(prefix = "spring.rabbitmq", ignoreUnknownFields = true)
+public class RabbitMqProperties {
+
+ private String host;
+ private String port;
+ private String username;
+ private String password;
+
+ private String importExchange;
+ private String importQueue;
+ private String importKey;
+
+}
+
+
+
+
+
+
+
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/constants/Constants.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/constants/Constants.java
new file mode 100644
index 0000000..6af0a63
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/constants/Constants.java
@@ -0,0 +1,32 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+*/
+package org.eclipse.openk.gridfailureinformation.sarisinterface.constants;
+
+public final class Constants {
+
+ public static final String SRC_SARIS = "SARIS";
+
+ public static final String BRANCH_ELECTRICITY = "S";
+ public static final String VOLTAGE_LVL_LOW = "NS";
+
+ public static final String PLANNED_OUTAGE = "planned";
+ public static final String UNPLANNED_OUTAGE = "unplanned";
+ public static final String SRC_STOERUNGSAUSKUNFT_DE = "stoerungsauskunft.de";
+
+
+ private Constants() {
+ // empty Constructor for the sake of SONAR
+ }
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/controller/ImportController.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/controller/ImportController.java
new file mode 100644
index 0000000..985eaf2
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/controller/ImportController.java
@@ -0,0 +1,83 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.controller;
+
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import lombok.extern.log4j.Log4j2;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.service.ImportService;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.service.SarisWebservice;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetAktuelleGVUsInfoAllgemein;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetAktuelleGVUsInfoAllgemeinResponse;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetCountryResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import java.io.File;
+
+@Log4j2
+@RestController
+@RequestMapping("/saris")
+public class ImportController {
+
+ @Autowired
+ private ImportService importService;
+
+ @Autowired
+ private SarisWebservice sarisWebservice;
+
+ @GetMapping("/usernotification-import-test")
+ @ApiOperation(value = "Import einer externen Störungsinformation von Störungsauskunft.de zu SIT")
+ @ApiResponses(value = {
+ @ApiResponse(code = 201, message = "Störungsinformation erfolgreich importiert"),
+ @ApiResponse(code = 500, message = "Konnte nicht durchgeführt werden")
+ })
+ @ResponseStatus(HttpStatus.OK)
+ public void importUserNotification() {
+ importService.importUserNotifications();
+ }
+
+ @GetMapping("/soap-test")
+ @ApiOperation(value = "Import von Störungsinformationen von SARIS zu SIT")
+ @ApiResponses(value = {
+ @ApiResponse(code = 201, message = "Störungsinformation erfolgreich importiert"),
+ @ApiResponse(code = 500, message = "Konnte nicht durchgeführt werden")
+ })
+ @ResponseStatus(HttpStatus.OK)
+ public void testSoap() throws JAXBException {
+ GetCountryResponse response = sarisWebservice.getCountry("Spain");
+ System.err.println(response.getCountry().getCurrency());
+ }
+
+ @GetMapping("/importForeignFailures-test")
+ @ApiOperation(value = "Import von Störungsinformationen von SARIS zu SIT")
+ @ApiResponses(value = {
+ @ApiResponse(code = 201, message = "Störungsinformation erfolgreich importiert"),
+ @ApiResponse(code = 500, message = "Konnte nicht durchgeführt werden")
+ })
+ @ResponseStatus(HttpStatus.OK)
+ public void importForeignFailures() throws JAXBException {
+
+ importService.importForeignFailures();
+ GetCountryResponse response = sarisWebservice.getCountry("Spain");
+ System.err.println(response.getCountry().getCurrency());
+ }
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/FailureInformationDto.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/FailureInformationDto.java
new file mode 100644
index 0000000..f0b732b
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/FailureInformationDto.java
@@ -0,0 +1,108 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.dtos;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+@Data
+public class FailureInformationDto implements Serializable {
+ @JsonProperty("id")
+ private UUID uuid;
+ private String title;
+ private String description;
+ private Long versionNumber;
+ private String responsibility;
+ private String internExtern;
+ private String voltageLevel;
+ private String pressureLevel;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date failureBegin;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date failureEndPlanned;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date failureEndResupplied;
+
+ private String postcode;
+ private String city;
+ private String district;
+ private String street;
+ private String housenumber;
+ private String stationId;
+ private String stationDescription;
+ private String stationCoords;
+ private BigDecimal longitude;
+ private BigDecimal latitude;
+ private String objectReferenceExternalSystem;
+ private String publicationStatus;
+ private String publicationFreetext;
+ private Boolean condensed;
+ private Long condensedCount;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date createDate;
+ private String createUser;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date modDate;
+ private String modUser;
+
+ private UUID failureClassificationId;
+ private String failureClassification;
+
+ private UUID failureTypeId;
+ private String failureType;
+
+ private boolean isPlanned;
+
+ private UUID statusInternId;
+ private String statusIntern;
+
+ private UUID statusExternId;
+ private String statusExtern;
+
+ private UUID branchId;
+ private String branch;
+ private String branchDescription;
+ private String branchColorCode;
+
+ private UUID radiusId;
+ private Long radius;
+
+ private UUID expectedReasonId;
+ private String expectedReasonText;
+
+ private UUID failureInformationCondensedId;
+
+ // 0: Lat
+ // 1: Lng
+ private List<ArrayList<BigDecimal>> addressPolygonPoints;
+
+ private List<UUID> distributionGroupUuids;
+
+ private List<String> publicationChannels;
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/ForeignFailureDataDto.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/ForeignFailureDataDto.java
new file mode 100644
index 0000000..8c2abc6
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/ForeignFailureDataDto.java
@@ -0,0 +1,89 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.dtos;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import javax.validation.constraints.*;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class ForeignFailureDataDto implements Serializable {
+
+ @NotNull
+ private boolean isPlanned;
+
+ @JsonProperty("description")
+ private String description;
+
+ @NotNull
+ @Pattern(regexp = "^$|(S|W|F|G|TK|ST)")
+ private String branch;
+
+ @Pattern(regexp="^$|(NS|MS|HS)")
+ private String voltageLevel;
+
+ @Pattern(regexp="^$|(ND|MD|HD)")
+ private String pressureLevel;
+
+ @NotNull
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date failureBegin;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date failureEndPlanned;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date failureEndResupplied;
+
+ @Size(max=10)
+ @Pattern(regexp="^$|[A-Za-z0-9_/-]+")
+ private String postcode;
+
+ @Size(max=200)
+ @Pattern(regexp="^$|[A-Za-z0-9ÄäÖöÜüß\\s_/()-]+")
+ private String city;
+
+ @Size(max=200)
+ @Pattern(regexp="^$|[A-Za-z0-9ÄäÖöÜüß\\s_/()-]+")
+ private String district;
+
+ @Size(max=200)
+ @Pattern(regexp="^$|[A-Za-z0-9ÄäÖöÜüß\\s_/()-]+")
+ private String street;
+
+ @Size(max=10)
+ @Pattern(regexp="^$|[A-Za-z0-9ÄäÖöÜüß\\s_/()-]+")
+ private String housenumber;
+
+ @Size(max=200)
+ @Pattern(regexp="^$|[A-Za-z0-9ÄäÖöÜüß\\s_/()-]+")
+ private String stationId;
+
+ @Size(max=200)
+ @Pattern(regexp="^$|[A-Za-z0-9ÄäÖöÜüß\\s_/()-]+")
+ private String stationDescription;
+
+ private BigDecimal longitude;
+ private BigDecimal latitude;
+
+ @Min(0L)
+ @Max(100000L)
+ private Long radiusInMeters;
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/ForeignFailureMessageDto.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/ForeignFailureMessageDto.java
new file mode 100644
index 0000000..3dceef1
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/ForeignFailureMessageDto.java
@@ -0,0 +1,45 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.dtos;
+
+import lombok.Data;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+
+@Data
+public class ForeignFailureMessageDto implements Serializable {
+
+ @NotNull
+ @Size(max=256)
+ @Pattern(regexp="[A-Za-z0-9\\s_/:.-]+")
+ private String metaId;
+
+ @Size(max=256)
+ @Pattern(regexp="^$|[A-Za-z0-9\\s_/(),.;:-]+")
+ private String description;
+
+ @NotNull
+ @Size(max=100)
+ @Pattern(regexp="[A-Za-z0-9\\s_/(),.;:-]+")
+ private String source;
+
+ @NotNull
+ private @Valid ForeignFailureDataDto payload;
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/StoerungsauskunftOutage.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/StoerungsauskunftOutage.java
new file mode 100644
index 0000000..2f4cf93
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/StoerungsauskunftOutage.java
@@ -0,0 +1,27 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.dtos;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class StoerungsauskunftOutage implements Serializable {
+
+ private String id;
+ private String operatorID;
+ private String type;
+ private Integer origin;
+ private Integer geoType;
+ private String date;
+ private String estimatedEnding;
+ private String postcode;
+ private String city;
+ private String district;
+ private String ags;
+ private Integer radius;
+ private String coordinates;
+ private String liveInfo;
+ private Integer social;
+ private String socialText;
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/StoerungsauskunftUserNotification.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/StoerungsauskunftUserNotification.java
new file mode 100644
index 0000000..196de63
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/dtos/StoerungsauskunftUserNotification.java
@@ -0,0 +1,24 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.dtos;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@Data
+public class StoerungsauskunftUserNotification implements Serializable {
+
+ private String id;
+ private String date;
+ private String postcode;
+ private String city;
+ private String street;
+ private String houseNo;
+ private String district;
+ private String ags;
+ private String lat;
+ private String lng;
+ private String comment;
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/exceptions/InternalServerErrorException.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/exceptions/InternalServerErrorException.java
new file mode 100644
index 0000000..2db49a4
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/exceptions/InternalServerErrorException.java
@@ -0,0 +1,25 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.exceptions;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.ResponseStatus;
+
+@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
+public class InternalServerErrorException extends RuntimeException{
+ public InternalServerErrorException(String message) {
+ super(message);
+ }
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/mapper/SARISMapper.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/mapper/SARISMapper.java
new file mode 100644
index 0000000..9f52736
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/mapper/SARISMapper.java
@@ -0,0 +1,81 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.mapper;
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.constants.Constants;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.FailureInformationDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.ForeignFailureDataDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.StoerungsauskunftOutage;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.StoerungsauskunftUserNotification;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.ViewGeplanteVU;
+import org.mapstruct.AfterMapping;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.MappingTarget;
+import org.mapstruct.Mappings;
+import org.mapstruct.Named;
+import org.mapstruct.ReportingPolicy;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface SARISMapper {
+
+ Pattern STREET_HOUSENUMBER_PATTERN = Pattern.compile("(^\\D+)(\\d.*)");
+
+ @Mappings({
+ @Mapping(target = "description", source = "bemerkung"),
+ @Mapping(target = "failureBegin", source = "beginn", dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),
+ @Mapping(target = "failureEndPlanned", source = "ende"),
+ @Mapping(target = "postcode", source = "plz"),
+ @Mapping(target = "city", source = "ort"),
+ @Mapping(target = "district", source = "ortsteil"),
+ @Mapping(target = "street", source = "strasse"),
+ @Mapping(target = "housenumber", source = "hausnummern"), //TODO Mehrere Hausnummern möglich
+ @Mapping(target = "branch", source = "sparte", qualifiedByName = "branchMapperToForeignFailureDataDto"),
+ })
+ ForeignFailureDataDto toForeignFailureDataDto(ViewGeplanteVU srcEntity);
+
+
+ @AfterMapping
+ default void afterMappingProcess(ViewGeplanteVU srcEntity, @MappingTarget ForeignFailureDataDto targetEntity){
+ targetEntity.setRadiusInMeters(0L);
+
+ targetEntity.setVoltageLevel(Constants.VOLTAGE_LVL_LOW); //TODO abhängig von Sparte, s. Sparte TODO
+ }
+
+ @Named("branchMapperToForeignFailureDataDto")
+ default String branchMapperToForeignFailureDataDto(String sparteViewGeplanteVU) {
+ if (sparteViewGeplanteVU == null || sparteViewGeplanteVU.isEmpty()) return "";
+ //TODO logik implementieren. Was sind mögliche Sparten-Werte von SARIS?
+ return sparteViewGeplanteVU;
+ }
+
+ @Named("housenumberMapperToForeignFailureDataDto")
+ default String housenumberMapperToForeignFailureDataDto(String streetFromUserNotification) {
+ if (streetFromUserNotification == null || streetFromUserNotification.isEmpty()) return "";
+ String housenumber = "";
+ Matcher matcher = STREET_HOUSENUMBER_PATTERN.matcher(streetFromUserNotification);
+ if (matcher.matches()) {
+ housenumber = matcher.group(2).trim();
+ }
+ return housenumber;
+ }
+
+}
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/mapper/StoerungsauskunftMapper.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/mapper/StoerungsauskunftMapper.java
new file mode 100644
index 0000000..24bf71d
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/mapper/StoerungsauskunftMapper.java
@@ -0,0 +1,107 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.mapper;
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.constants.Constants;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.FailureInformationDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.ForeignFailureDataDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.StoerungsauskunftOutage;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.StoerungsauskunftUserNotification;
+import org.mapstruct.*;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface StoerungsauskunftMapper {
+
+ final Pattern STREET_HOUSENUMBER_PATTERN = Pattern.compile("(^\\D+)(\\d.*)");
+
+ @Mappings({
+ @Mapping(target = "description", source = "comment"),
+ @Mapping(target = "failureBegin", source = "date", dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),
+ @Mapping(target = "longitude", source = "lng"),
+ @Mapping(target = "latitude", source = "lat"),
+ @Mapping(target = "street", source = "street", qualifiedByName = "streetMapperToForeignFailureDataDto"),
+ @Mapping(target = "housenumber", source = "houseNo"),
+ })
+ ForeignFailureDataDto toForeignFailureDataDto(StoerungsauskunftUserNotification srcEntity);
+
+
+ @AfterMapping
+ default void afterMappingProcess(StoerungsauskunftUserNotification srcEntity, @MappingTarget ForeignFailureDataDto targetEntity){
+ if (targetEntity.getHousenumber() == null || targetEntity.getHousenumber().isEmpty()){
+ targetEntity.setHousenumber(housenumberMapperToForeignFailureDataDto(srcEntity.getStreet()));
+ }
+ targetEntity.setRadiusInMeters(0L);
+ targetEntity.setVoltageLevel(Constants.VOLTAGE_LVL_LOW);
+ }
+
+ @Named("streetMapperToForeignFailureDataDto")
+ default String streetMapperToForeignFailureDataDto(String streetFromUserNotification) {
+ if (streetFromUserNotification == null || streetFromUserNotification.isEmpty()) return "";
+ String street = streetFromUserNotification;
+ Matcher matcher = STREET_HOUSENUMBER_PATTERN.matcher(streetFromUserNotification);
+ if (matcher.matches()) {
+ street = matcher.group(1).trim();
+ }
+ return street;
+ }
+
+ @Named("housenumberMapperToForeignFailureDataDto")
+ default String housenumberMapperToForeignFailureDataDto(String streetFromUserNotification) {
+ if (streetFromUserNotification == null || streetFromUserNotification.isEmpty()) return "";
+ String housenumber = "";
+ Matcher matcher = STREET_HOUSENUMBER_PATTERN.matcher(streetFromUserNotification);
+ if (matcher.matches()) {
+ housenumber = matcher.group(2).trim();
+ }
+ return housenumber;
+ }
+
+ /* Exportmapper */
+
+ @AfterMapping
+ default void setCoordinates(@MappingTarget StoerungsauskunftOutage target, FailureInformationDto srcEntity) {
+
+ //Störungsauskunft.de Koordinatenformat: LNG,LAT;LNG,LAT; …
+
+ List<ArrayList<BigDecimal>> addressPolygonPoints = srcEntity.getAddressPolygonPoints();
+ if (addressPolygonPoints != null && !addressPolygonPoints.isEmpty()) {
+ String coordinatesResult = "";
+ for (ArrayList<BigDecimal> addressPolygonPoint : addressPolygonPoints) {
+ //index 0: = Lat / index 1:= Lng
+ coordinatesResult = coordinatesResult.concat(addressPolygonPoint.get(1).toString() + "," + addressPolygonPoint.get(0).toString() +";");
+ }
+ target.setCoordinates(coordinatesResult);
+ } else {
+ target.setCoordinates(srcEntity.getLongitude()+ "," + srcEntity.getLatitude());
+ }
+
+ }
+
+ @Mappings({
+ @Mapping(target = "liveInfo", source = "description"),
+ @Mapping(target = "date", source = "failureBegin", dateFormat = "dd.MM.yyyy HH:mm:ss"),
+ @Mapping(target = "estimatedEnding", source = "failureEndPlanned", dateFormat = "dd.MM.yyyy HH:mm:ss"),
+ })
+ StoerungsauskunftOutage toStoerungsauskunftOutage(FailureInformationDto srcEntity);
+
+
+
+}
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/ImportService.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/ImportService.java
new file mode 100644
index 0000000..2dbdfce
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/ImportService.java
@@ -0,0 +1,137 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.service;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.log4j.Log4j2;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.ForeignFailureDataDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.ForeignFailureMessageDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.api.StoerungsauskunftApi;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.constants.Constants;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.StoerungsauskunftUserNotification;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.exceptions.InternalServerErrorException;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.mapper.SARISMapper;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.mapper.StoerungsauskunftMapper;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.ArrayOfViewGeplanteVU;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetAktuelleGVUsInfoAllgemeinResponse;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.ViewGeplanteVU;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.support.MessageBuilder;
+import org.springframework.stereotype.Service;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import java.io.File;
+import java.util.List;
+
+@Service
+@Log4j2
+@EnableConfigurationProperties
+@ConfigurationProperties(prefix = "rabbitmq")
+public class ImportService {
+
+ @Autowired
+ private StoerungsauskunftApi stoerungsauskunftApi;
+
+ @Autowired
+ private MessageChannel failureImportChannel;
+
+ @Autowired
+ private ObjectMapper objectMapper;
+
+ @Autowired
+ StoerungsauskunftMapper stoerungsauskunftMapper;
+
+ @Autowired
+ SARISMapper sarisMapper;
+
+ @Autowired
+ private SarisWebservice sarisWebservice;
+
+ public void importForeignFailures() throws JAXBException {
+
+// GetAktuelleGVUsInfoAllgemeinResponse sarisResponse = sarisWebservice.getAktuelleGVU();
+
+ GetAktuelleGVUsInfoAllgemeinResponse sarisResponse = getMockedSarisResponse();
+
+ ArrayOfViewGeplanteVU getAktuelleGVUsInfoAllgemeinResult = sarisResponse.getGetAktuelleGVUsInfoAllgemeinResult();
+ if (getAktuelleGVUsInfoAllgemeinResult != null) {
+ List<ViewGeplanteVU> viewGeplanteVU = sarisResponse.getGetAktuelleGVUsInfoAllgemeinResult().getViewGeplanteVU();
+
+ for (ViewGeplanteVU geplanteVU : viewGeplanteVU) {
+ pushForeignFailure(createForeignFailureMessageDto(geplanteVU));
+ ForeignFailureMessageDto foreignFailureMessageDto = createForeignFailureMessageDto(geplanteVU);
+ log.info("VersorgungsunterbrechungID: " + geplanteVU.getVersorgungsunterbrechungID());
+ }
+ }
+ }
+
+ private GetAktuelleGVUsInfoAllgemeinResponse getMockedSarisResponse() throws JAXBException {
+ JAXBContext jaxbContext = JAXBContext.newInstance(GetAktuelleGVUsInfoAllgemeinResponse.class);
+ Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
+
+ File file = new File("sarisMockResponse.xml");
+ return (GetAktuelleGVUsInfoAllgemeinResponse) jaxbUnmarshaller.unmarshal(file);
+ }
+
+ public void importUserNotifications() {
+
+// List<StoerungsauskunftUserNotification> userNotificationList =
+// stoerungsauskunftApi.getUserNotification(1);
+//
+// for (StoerungsauskunftUserNotification userNotification : userNotificationList) {
+// pushForeignFailure(createForeignFailureMessageDto(userNotification));
+// }
+ }
+
+ private ForeignFailureMessageDto createForeignFailureMessageDto(ViewGeplanteVU viewGeplanteVU) {
+ ForeignFailureMessageDto foreignFailureMessageDto = new ForeignFailureMessageDto();
+ foreignFailureMessageDto.setMetaId(viewGeplanteVU.getVersorgungsunterbrechungID()+"");
+ foreignFailureMessageDto.setSource(Constants.SRC_SARIS);
+ ForeignFailureDataDto foreignFailureDataDto = createForeignFailureData(viewGeplanteVU);
+ foreignFailureMessageDto.setPayload(foreignFailureDataDto);
+ return foreignFailureMessageDto;
+ }
+
+ private ForeignFailureDataDto createForeignFailureData(ViewGeplanteVU viewGeplanteVU) {
+ ForeignFailureDataDto foreignFailureDataDto = sarisMapper.toForeignFailureDataDto(viewGeplanteVU);
+ foreignFailureDataDto.setBranch(Constants.BRANCH_ELECTRICITY);
+ foreignFailureDataDto.setPlanned(true);
+ return foreignFailureDataDto;
+ }
+
+ public void pushForeignFailure(ForeignFailureMessageDto foreignFailureMessageDto) {
+
+ try {
+ failureImportChannel.send(
+ MessageBuilder.withPayload(
+ objectMapper.writeValueAsString(foreignFailureMessageDto.getPayload()))
+ .setHeader("metaId", foreignFailureMessageDto.getMetaId())
+ .setHeader("description", foreignFailureMessageDto.getDescription())
+ .setHeader("source", foreignFailureMessageDto.getSource())
+ .build());
+ log.info("Succesfully sent message from SARIS-Interface to main-app with metaId: " + foreignFailureMessageDto.getMetaId());
+ } catch (Exception e) {
+ log.debug(e.getMessage(), e);
+ throw new InternalServerErrorException("could.not.push.message");
+ }
+
+ }
+
+}
diff --git a/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/SarisWebservice.java b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/SarisWebservice.java
new file mode 100644
index 0000000..6799b72
--- /dev/null
+++ b/SARIS-Interface/src/main/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/SarisWebservice.java
@@ -0,0 +1,57 @@
+
+package org.eclipse.openk.gridfailureinformation.sarisinterface.service;
+
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetAktuelleGVUsInfoAllgemein;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetAktuelleGVUsInfoAllgemeinResponse;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetCountryRequest;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.wsdl.GetCountryResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.ws.client.core.support.WebServiceGatewaySupport;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import java.io.File;
+
+public class SarisWebservice extends WebServiceGatewaySupport {
+
+ private static final Logger log = LoggerFactory.getLogger(SarisWebservice.class);
+
+ public GetCountryResponse getCountry(String country) {
+
+ GetCountryRequest request = new GetCountryRequest();
+ request.setName(country);
+
+ log.info("Requesting location for " + country);
+
+ /*GetCountryResponse response = (GetCountryResponse) getWebServiceTemplate()
+ .marshalSendAndReceive("http://localhost:8080/ws/countries", request,
+ new SoapActionCallback(
+ "http://spring.io/guides/gs-producing-web-service/GetCountryRequest"));*/
+
+ GetCountryResponse response = (GetCountryResponse) getWebServiceTemplate()
+ .marshalSendAndReceive("http://localhost:8080/ws/countries", request);
+
+ return response;
+ }
+
+ public GetAktuelleGVUsInfoAllgemeinResponse getAktuelleGVU() {
+ log.info("getAktuelleGVU called");
+
+ GetAktuelleGVUsInfoAllgemein request = new GetAktuelleGVUsInfoAllgemein();
+
+ GetAktuelleGVUsInfoAllgemeinResponse response = (GetAktuelleGVUsInfoAllgemeinResponse) getWebServiceTemplate()
+ .marshalSendAndReceive("http://sariskon/sariskon/services/Stoerungenservice.asmx", request);
+
+/* GetAktuelleGVUsInfoAllgemeinResponse response = (GetAktuelleGVUsInfoAllgemeinResponse) getWebServiceTemplate()
+ .marshalSendAndReceive("http://sariskon/sariskon/services/Stoerungenservice.asmx", request, new SoapActionCallback(
+ "http://tempuri.org/GetAktuelleGVUsInfoAllgemein"));*/
+
+ return response;
+ }
+
+
+
+}
diff --git a/SARIS-Interface/src/main/resources/Stoerungenservice.wsdl b/SARIS-Interface/src/main/resources/Stoerungenservice.wsdl
new file mode 100644
index 0000000..f08b388
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/Stoerungenservice.wsdl
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s1="http://tempuri.org/AbstractTypes" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
+ <s:element name="GetAktuelleGVUsInfoAllgemein">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="dateTime" type="s:dateTime" />
+ <s:element minOccurs="1" maxOccurs="1" name="vonToleranz" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="bisToleranz" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="sparteId" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="dienstplanId" type="s:int" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ViewGeplanteVU">
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="VersorgungsunterbrechungID" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="Beginn" type="s:dateTime" />
+ <s:element minOccurs="1" maxOccurs="1" name="Ende" type="s:dateTime" />
+ <s:element minOccurs="1" maxOccurs="1" name="AnzahlKunden" type="s:int" />
+ <s:element minOccurs="0" maxOccurs="1" name="Ort" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Ortsteil" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Strasse" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Hausnummern" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Bemerkung" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="Realisiert" type="s:boolean" />
+ <s:element minOccurs="1" maxOccurs="1" name="StrassenAbschnittID" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="LetzteAenderungAm" type="s:dateTime" />
+ <s:element minOccurs="1" maxOccurs="1" name="Stoerung" type="s:int" />
+ <s:element minOccurs="0" maxOccurs="1" name="Plz" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="SparteID" type="s:int" />
+ <s:element minOccurs="0" maxOccurs="1" name="Sparte" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ArrayOfViewGeplanteVU">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="ViewGeplanteVU" nillable="true" type="tns:ViewGeplanteVU" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="GetAktuelleGVUsInfoAllgemeinResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="GetAktuelleGVUsInfoAllgemeinResult" type="tns:ArrayOfViewGeplanteVU" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="ArrayOfViewGeplanteVU" nillable="true" type="tns:ArrayOfViewGeplanteVU" />
+ <s:element name="ViewGeplanteVU" nillable="true" type="tns:ViewGeplanteVU" />
+ </s:schema>
+ <s:schema targetNamespace="http://tempuri.org/AbstractTypes">
+ <s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
+ <s:complexType name="StringArray">
+ <s:complexContent mixed="false">
+ <s:restriction base="soapenc:Array">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="String" type="s:string" />
+ </s:sequence>
+ </s:restriction>
+ </s:complexContent>
+ </s:complexType>
+ </s:schema>
+ </wsdl:types>
+
+ <wsdl:message name="GetAktuelleGVUsInfoAllgemeinSoapIn">
+ <wsdl:part name="parameters" element="tns:GetAktuelleGVUsInfoAllgemein" />
+ </wsdl:message>
+ <wsdl:message name="GetAktuelleGVUsInfoAllgemeinSoapOut">
+ <wsdl:part name="parameters" element="tns:GetAktuelleGVUsInfoAllgemeinResponse" />
+ </wsdl:message>
+
+
+ <wsdl:portType name="StoerungenServiceWSSoap">
+
+ <wsdl:operation name="GetAktuelleGVUsInfoAllgemein">
+ <wsdl:input message="tns:GetAktuelleGVUsInfoAllgemeinSoapIn" />
+ <wsdl:output message="tns:GetAktuelleGVUsInfoAllgemeinSoapOut" />
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="StoerungenServiceWSSoap" type="tns:StoerungenServiceWSSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="GetAktuelleGVUsInfoAllgemein">
+ <soap:operation soapAction="http://tempuri.org/GetAktuelleGVUsInfoAllgemein" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="StoerungenServiceWS">
+ <wsdl:port name="StoerungenServiceWSSoap" binding="tns:StoerungenServiceWSSoap">
+ <soap:address location="http://sariskon/sariskon/services/Stoerungenservice.asmx" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/resources/application.yml b/SARIS-Interface/src/main/resources/application.yml
new file mode 100644
index 0000000..e571d07
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/application.yml
@@ -0,0 +1,167 @@
+# *******************************************************************************
+# 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
+# *******************************************************************************
+spring:
+ rabbitmq:
+ host: entdockergss
+ port: 5672
+ username: ${GFI_RABBITMQ_USERNAME}
+ password: ${GFI_RABBITMQ_PASSWORD}
+
+ # Importkanal
+ importExchange: sitImportExchange
+ importQueue: sitImportQueue
+ importkey: sitImportExchange.failureImportKey
+
+logging:
+ level:
+ root: INFO
+ org.eclipse.openk: INFO
+ org.springframework.web: ERROR
+
+server:
+ max-http-header-size: 262144
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: false
+ staticJwt: x
+
+gridFailureInformation:
+ maxListSize: 2000
+
+feign:
+ client:
+ config:
+ default:
+ connectTimeout: 60000
+ readTimeout: 60000
+cors:
+ corsEnabled: false
+
+stoerungsauskunft:
+ apiUrl: https://stage-api-operator.stoerungsauskunft.de/api/v1.0/
+ user: ${GFI_STOERUNGSAUSKUNFT_USERNAME}
+ password: ${GFI_STOERUNGSAUSKUNFT_PASSWORD}
+ scheduling-import:
+ enabled: false
+ cron: 0 */15 * ? * *
+
+---
+
+spring:
+ profiles: test
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: true
+ staticJwt: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJIYlI3Z2pobmE2eXJRZnZJTWhUSV9tY2g3ZmtTQWVFX3hLTjBhZVl0bjdjIn0.eyJqdGkiOiI5MGI0NGFkOC1iYjlmLTQ1MzktYTQwYy0yYjQyZTNkNjNiOGEiLCJleHAiOjE1Nzg2NTU3OTUsIm5iZiI6MCwiaWF0IjoxNTc4NjU1NDk1LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvYXV0aC9yZWFsbXMvRWxvZ2Jvb2siLCJhdWQiOiJlbG9nYm9vay1iYWNrZW5kIiwic3ViIjoiODYyNjY5NmYtZjFhMi00ZGI1LTkyZWYtZTlhMjQ2Njg1YTU0IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZWxvZ2Jvb2stYmFja2VuZCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjJmMWIzODE5LWZjNjQtNDEzNC1iNWQxLWY3ZWY4NzU5NDBkNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsia29uLWFkbWluIiwia29uLXdyaXRlciIsImtvbi1hY2Nlc3MiLCJrb24tcmVhZGVyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnt9LCJuYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSBUZXN0ZXJMYXN0bmFtZV9yd2EiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0ZXN0dXNlcl9yd2EiLCJnaXZlbl9uYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSIsImZhbWlseV9uYW1lIjoiVGVzdGVyTGFzdG5hbWVfcndhIn0.DAYXuv4tKn8RXqO1jyttnD-tF4nShUBQyfe4bKbAiPAyY2x5YbAf3M4eXnLrGqo8-loGKldICC28bL0LaMA3KKkQEOfW5sfpGqoN6212vs89mOklt0TJYc5PMXwFgJ5WC_TKjdwq7-aaDafOEWehV0U1ut3s-94ovNYIEn29nzXm2W1ldoXJEq03F880jlysQ5zlRvGF7eXEEpFfI2URyyNQ2UWh0Ssfq-gOAt2pbF1u6prA5RfvUmZ3v1eu21YLGZtgqPqxb1l6odyH3ip15j_HdgnTeo52ymxuRUj65Mskme3V5ev2DitHI9vZgnpV8Idhb4TTWliBeGCOMfDFCg
+
+stoerungsauskunft:
+ apiUrl: https://stage-api-operator.stoerungsauskunft.de/api/v1.0/
+ user: userName
+ password: secPwd
+ scheduling-import:
+ enabled: true
+ cron: 0 */15 * ? * *
+---
+
+spring:
+ profiles: devserver
+
+logging:
+ level:
+ root: INFO
+ org.eclipse.openk: DEBUG
+ org.springframework.web: ERROR
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: false
+ staticJwt: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJIYlI3Z2pobmE2eXJRZnZJTWhUSV9tY2g3ZmtTQWVFX3hLTjBhZVl0bjdjIn0.eyJqdGkiOiI5MGI0NGFkOC1iYjlmLTQ1MzktYTQwYy0yYjQyZTNkNjNiOGEiLCJleHAiOjE1Nzg2NTU3OTUsIm5iZiI6MCwiaWF0IjoxNTc4NjU1NDk1LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvYXV0aC9yZWFsbXMvRWxvZ2Jvb2siLCJhdWQiOiJlbG9nYm9vay1iYWNrZW5kIiwic3ViIjoiODYyNjY5NmYtZjFhMi00ZGI1LTkyZWYtZTlhMjQ2Njg1YTU0IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZWxvZ2Jvb2stYmFja2VuZCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjJmMWIzODE5LWZjNjQtNDEzNC1iNWQxLWY3ZWY4NzU5NDBkNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsia29uLWFkbWluIiwia29uLXdyaXRlciIsImtvbi1hY2Nlc3MiLCJrb24tcmVhZGVyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnt9LCJuYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSBUZXN0ZXJMYXN0bmFtZV9yd2EiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0ZXN0dXNlcl9yd2EiLCJnaXZlbl9uYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSIsImZhbWlseV9uYW1lIjoiVGVzdGVyTGFzdG5hbWVfcndhIn0.DAYXuv4tKn8RXqO1jyttnD-tF4nShUBQyfe4bKbAiPAyY2x5YbAf3M4eXnLrGqo8-loGKldICC28bL0LaMA3KKkQEOfW5sfpGqoN6212vs89mOklt0TJYc5PMXwFgJ5WC_TKjdwq7-aaDafOEWehV0U1ut3s-94ovNYIEn29nzXm2W1ldoXJEq03F880jlysQ5zlRvGF7eXEEpFfI2URyyNQ2UWh0Ssfq-gOAt2pbF1u6prA5RfvUmZ3v1eu21YLGZtgqPqxb1l6odyH3ip15j_HdgnTeo52ymxuRUj65Mskme3V5ev2DitHI9vZgnpV8Idhb4TTWliBeGCOMfDFCg
+
+server:
+ port: 9196
+
+cors:
+ corsEnabled: true
+
+---
+
+spring:
+ profiles: devserver-unsecure
+
+logging:
+ level:
+ root: INFO
+ org.eclipse.openk: DEBUG
+ org.springframework.web: ERROR
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: true
+ staticJwt: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJIYlI3Z2pobmE2eXJRZnZJTWhUSV9tY2g3ZmtTQWVFX3hLTjBhZVl0bjdjIn0.eyJqdGkiOiI5MGI0NGFkOC1iYjlmLTQ1MzktYTQwYy0yYjQyZTNkNjNiOGEiLCJleHAiOjE1Nzg2NTU3OTUsIm5iZiI6MCwiaWF0IjoxNTc4NjU1NDk1LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvYXV0aC9yZWFsbXMvRWxvZ2Jvb2siLCJhdWQiOiJlbG9nYm9vay1iYWNrZW5kIiwic3ViIjoiODYyNjY5NmYtZjFhMi00ZGI1LTkyZWYtZTlhMjQ2Njg1YTU0IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZWxvZ2Jvb2stYmFja2VuZCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjJmMWIzODE5LWZjNjQtNDEzNC1iNWQxLWY3ZWY4NzU5NDBkNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsia29uLWFkbWluIiwia29uLXdyaXRlciIsImtvbi1hY2Nlc3MiLCJrb24tcmVhZGVyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnt9LCJuYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSBUZXN0ZXJMYXN0bmFtZV9yd2EiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0ZXN0dXNlcl9yd2EiLCJnaXZlbl9uYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSIsImZhbWlseV9uYW1lIjoiVGVzdGVyTGFzdG5hbWVfcndhIn0.DAYXuv4tKn8RXqO1jyttnD-tF4nShUBQyfe4bKbAiPAyY2x5YbAf3M4eXnLrGqo8-loGKldICC28bL0LaMA3KKkQEOfW5sfpGqoN6212vs89mOklt0TJYc5PMXwFgJ5WC_TKjdwq7-aaDafOEWehV0U1ut3s-94ovNYIEn29nzXm2W1ldoXJEq03F880jlysQ5zlRvGF7eXEEpFfI2URyyNQ2UWh0Ssfq-gOAt2pbF1u6prA5RfvUmZ3v1eu21YLGZtgqPqxb1l6odyH3ip15j_HdgnTeo52ymxuRUj65Mskme3V5ev2DitHI9vZgnpV8Idhb4TTWliBeGCOMfDFCg
+
+server:
+ port: 9197
+
+cors:
+ corsEnabled: true
+
+---
+
+spring:
+ profiles: devserver-branch
+ rabbitmq:
+ # Importkanal
+ importExchange: sitImportExchange_branch
+ importQueue: sitImportQueue_branch
+ importkey: sitImportExchange.failureImportKey
+
+---
+
+spring:
+ profiles: qserver
+ rabbitmq:
+ host: localhost
+ port: 5672
+ username: ${GFI_RABBITMQ_USERNAME}
+ password: ${GFI_RABBITMQ_PASSWORD}
+
+ # Importkanal
+ importExchange: sitImportExchange
+ importQueue: sitImportQueue
+ importkey: sitImportExchange.failureImportKey
+
+logging:
+ level:
+ root: INFO
+ org.eclipse.openk: DEBUG
+ org.springframework.web: ERROR
+
+server:
+ port: 9195
+ max-http-header-size: 262144
+ servlet:
+ session:
+ tracking-modes: cookie
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: false
+ staticJwt: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJIYlI3Z2pobmE2eXJRZnZJTWhUSV9tY2g3ZmtTQWVFX3hLTjBhZVl0bjdjIn0.eyJqdGkiOiI5MGI0NGFkOC1iYjlmLTQ1MzktYTQwYy0yYjQyZTNkNjNiOGEiLCJleHAiOjE1Nzg2NTU3OTUsIm5iZiI6MCwiaWF0IjoxNTc4NjU1NDk1LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvYXV0aC9yZWFsbXMvRWxvZ2Jvb2siLCJhdWQiOiJlbG9nYm9vay1iYWNrZW5kIiwic3ViIjoiODYyNjY5NmYtZjFhMi00ZGI1LTkyZWYtZTlhMjQ2Njg1YTU0IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZWxvZ2Jvb2stYmFja2VuZCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjJmMWIzODE5LWZjNjQtNDEzNC1iNWQxLWY3ZWY4NzU5NDBkNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsia29uLWFkbWluIiwia29uLXdyaXRlciIsImtvbi1hY2Nlc3MiLCJrb24tcmVhZGVyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnt9LCJuYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSBUZXN0ZXJMYXN0bmFtZV9yd2EiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0ZXN0dXNlcl9yd2EiLCJnaXZlbl9uYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSIsImZhbWlseV9uYW1lIjoiVGVzdGVyTGFzdG5hbWVfcndhIn0.DAYXuv4tKn8RXqO1jyttnD-tF4nShUBQyfe4bKbAiPAyY2x5YbAf3M4eXnLrGqo8-loGKldICC28bL0LaMA3KKkQEOfW5sfpGqoN6212vs89mOklt0TJYc5PMXwFgJ5WC_TKjdwq7-aaDafOEWehV0U1ut3s-94ovNYIEn29nzXm2W1ldoXJEq03F880jlysQ5zlRvGF7eXEEpFfI2URyyNQ2UWh0Ssfq-gOAt2pbF1u6prA5RfvUmZ3v1eu21YLGZtgqPqxb1l6odyH3ip15j_HdgnTeo52ymxuRUj65Mskme3V5ev2DitHI9vZgnpV8Idhb4TTWliBeGCOMfDFCg
+
+cors:
+ corsEnabled: true
+
+swagger:
+ baseUrl: /test-stoerungsauskunft-interface
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/resources/application_localdev.yml b/SARIS-Interface/src/main/resources/application_localdev.yml
new file mode 100644
index 0000000..ef109a2
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/application_localdev.yml
@@ -0,0 +1,95 @@
+# *******************************************************************************
+# 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
+# *******************************************************************************
+spring:
+ rabbitmq:
+ host: entdockergss
+ port: 5672
+ username: ${GFI_RABBITMQ_USERNAME}
+ password: ${GFI_RABBITMQ_PASSWORD}
+
+ # Importkanal
+ importExchange: sitImportExchange_localdev
+ importQueue: sitImportQueue_localdev
+ importkey: sitImportExchange.failureImportKey_localdev
+
+logging:
+ level:
+ root: INFO
+ org.eclipse.openk: DEBUG
+ org.springframework.web: ERROR
+
+eureka:
+ client:
+ service-url:
+ defaulZone: http://localhost:8761/
+ instance:
+ prefer-ip-address: true
+
+index-channel:
+ enabled: true
+
+server:
+ port: 9196
+ max-http-header-size: 262144
+ servlet:
+ session:
+ tracking-modes: cookie
+
+gridFailureInformation:
+ maxListSize: 2000
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: false
+ staticJwt: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJIYlI3Z2pobmE2eXJRZnZJTWhUSV9tY2g3ZmtTQWVFX3hLTjBhZVl0bjdjIn0.eyJqdGkiOiI5MGI0NGFkOC1iYjlmLTQ1MzktYTQwYy0yYjQyZTNkNjNiOGEiLCJleHAiOjE1Nzg2NTU3OTUsIm5iZiI6MCwiaWF0IjoxNTc4NjU1NDk1LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvYXV0aC9yZWFsbXMvRWxvZ2Jvb2siLCJhdWQiOiJlbG9nYm9vay1iYWNrZW5kIiwic3ViIjoiODYyNjY5NmYtZjFhMi00ZGI1LTkyZWYtZTlhMjQ2Njg1YTU0IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZWxvZ2Jvb2stYmFja2VuZCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjJmMWIzODE5LWZjNjQtNDEzNC1iNWQxLWY3ZWY4NzU5NDBkNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsia29uLWFkbWluIiwia29uLXdyaXRlciIsImtvbi1hY2Nlc3MiLCJrb24tcmVhZGVyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnt9LCJuYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSBUZXN0ZXJMYXN0bmFtZV9yd2EiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0ZXN0dXNlcl9yd2EiLCJnaXZlbl9uYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSIsImZhbWlseV9uYW1lIjoiVGVzdGVyTGFzdG5hbWVfcndhIn0.DAYXuv4tKn8RXqO1jyttnD-tF4nShUBQyfe4bKbAiPAyY2x5YbAf3M4eXnLrGqo8-loGKldICC28bL0LaMA3KKkQEOfW5sfpGqoN6212vs89mOklt0TJYc5PMXwFgJ5WC_TKjdwq7-aaDafOEWehV0U1ut3s-94ovNYIEn29nzXm2W1ldoXJEq03F880jlysQ5zlRvGF7eXEEpFfI2URyyNQ2UWh0Ssfq-gOAt2pbF1u6prA5RfvUmZ3v1eu21YLGZtgqPqxb1l6odyH3ip15j_HdgnTeo52ymxuRUj65Mskme3V5ev2DitHI9vZgnpV8Idhb4TTWliBeGCOMfDFCg
+
+feign:
+ client:
+ config:
+ default:
+ connectTimeout: 5000
+ readTimeout: 5000
+ loggerLevel: FULL
+
+logging.level.org.eclipse.openk.gridfailureinformation.jobs.stoerauskunftinterface.api.StoerauskunftApi: DEBUG
+
+cors:
+ corsEnabled: true
+
+stoerungsauskunft:
+ apiUrl: https://stage-api-operator.stoerungsauskunft.de/api/v1.0/
+ user: ${GFI_STOERUNGSAUSKUNFT_USERNAME}
+ password: ${GFI_STOERUNGSAUSKUNFT_PASSWORD}
+ scheduling-import:
+ enabled: false
+ cron: 0 */15 * ? * *
+
+---
+
+spring:
+ profiles: dev-db
+ rabbitmq:
+ host: entdockergss
+ port: 5672
+ username: ${GFI_RABBITMQ_USERNAME}
+ password: ${GFI_RABBITMQ_PASSWORD}
+
+ # Importkanal
+# importExchange: sitImportExchange_localdev_saris_simon
+# importQueue: sitImportQueue_localdev_saris_simon
+# importkey: sitImportExchange.failureImportKey_localdev_simon
+
+ # Importkanal
+ importExchange: sitImportExchange
+ importQueue: sitImportQueue
+ importkey: sitImportExchange.failureImportKey
diff --git a/SARIS-Interface/src/main/resources/catalog.cat b/SARIS-Interface/src/main/resources/catalog.cat
new file mode 100644
index 0000000..f9bf330
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/catalog.cat
@@ -0,0 +1 @@
+PUBLIC "http://schemas.xmlsoap.org/soap/encoding/" "soapenc.xsd"
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/resources/countries.wsdl b/SARIS-Interface/src/main/resources/countries.wsdl
new file mode 100644
index 0000000..8b56dcc
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/countries.wsdl
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://spring.io/guides/gs-producing-web-service" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://spring.io/guides/gs-producing-web-service" targetNamespace="http://spring.io/guides/gs-producing-web-service">
+ <wsdl:types>
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://spring.io/guides/gs-producing-web-service">
+
+ <xs:element name="getCountryRequest">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="getCountryResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="country" type="tns:country"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="country">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="population" type="xs:int"/>
+ <xs:element name="capital" type="xs:string"/>
+ <xs:element name="currency" type="tns:currency"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="currency">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="GBP"/>
+ <xs:enumeration value="EUR"/>
+ <xs:enumeration value="PLN"/>
+ </xs:restriction>
+ </xs:simpleType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="getCountryResponse">
+ <wsdl:part element="tns:getCountryResponse" name="getCountryResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getCountryRequest">
+ <wsdl:part element="tns:getCountryRequest" name="getCountryRequest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CountriesPort">
+ <wsdl:operation name="getCountry">
+ <wsdl:input message="tns:getCountryRequest" name="getCountryRequest">
+ </wsdl:input>
+ <wsdl:output message="tns:getCountryResponse" name="getCountryResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CountriesPortSoap11" type="tns:CountriesPort">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getCountry">
+ <soap:operation soapAction=""/>
+ <wsdl:input name="getCountryRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getCountryResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CountriesPortService">
+ <wsdl:port binding="tns:CountriesPortSoap11" name="CountriesPortSoap11">
+ <soap:address location="http://localhost:8080/ws"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/resources/logback-spring.xml b/SARIS-Interface/src/main/resources/logback-spring.xml
new file mode 100644
index 0000000..7d93fa0
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/logback-spring.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <property name="LOGS" value="./logs"/>
+
+ <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <Pattern>
+ %black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%c{60}): %msg%n%throwable
+ </Pattern>
+ </layout>
+ </appender>
+
+ <appender name="RollingFileStd" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${LOGS}/sarisInterface.log</file>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <Pattern>%d %p %c{60} [%t] %m%n</Pattern>
+ </encoder>
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${LOGS}/archived/sarisInterface-%d{yyyy-MM-dd}.gz</fileNamePattern>
+ <MaxHistory>30</MaxHistory>
+ <cleanHistoryOnStart>true</cleanHistoryOnStart>
+ </rollingPolicy>
+ </appender>
+
+ <appender name="RollingFileFeign" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${LOGS}/feignclient.log</file>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <Pattern>%d %p %c{60} [%t] %m%n</Pattern>
+ </encoder>
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${LOGS}/archived/feignclient-%d{yyyy-MM-dd}.gz</fileNamePattern>
+ <MaxHistory>30</MaxHistory>
+ <cleanHistoryOnStart>true</cleanHistoryOnStart>
+ </rollingPolicy>
+ </appender>
+
+ <!-- LOG everything at INFO level -->
+ <root level="info">
+ <appender-ref ref="RollingFileStd"/>
+ <appender-ref ref="Console"/>
+ </root>
+
+ <!-- LOG "com.baeldungorg.eclipse.openk.contactbasedata*" at INFO level -->
+ <logger name="org.eclipse.openk.gridfailureinformation.sarisinterface" level="info" additivity="false">
+ <appender-ref ref="RollingFileStd"/>
+ <appender-ref ref="Console"/>
+ </logger>
+
+ <logger name="org.eclipse.openk.gridfailureinformation.sarisinterface.api.StoerungsauskunftApi" level="info" additivity="false">
+ <appender-ref ref="RollingFileFeign"/>
+ </logger>
+
+</configuration>
\ No newline at end of file
diff --git a/SARIS-Interface/src/main/resources/messages.properties b/SARIS-Interface/src/main/resources/messages.properties
new file mode 100644
index 0000000..b8b3b11
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/messages.properties
@@ -0,0 +1,5 @@
+#Fehlermeldungen
+could.not.push.message=Das Objekt konnte nicht an RabbitMQ gesendet werden.
+
+
+
diff --git a/SARIS-Interface/src/main/resources/soapenc.xsd b/SARIS-Interface/src/main/resources/soapenc.xsd
new file mode 100644
index 0000000..4a97bf2
--- /dev/null
+++ b/SARIS-Interface/src/main/resources/soapenc.xsd
@@ -0,0 +1,536 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!-- Schema for the SOAP/1.1 encoding
+
+Portions © 2001 DevelopMentor.
+© 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
+
+This document is governed by the W3C Software License [1] as described in the FAQ [2].
+[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
+
+Permission to use, copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
+
+1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+
+2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
+
+3. Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
+
+Original W3C files; http://www.w3.org/2001/06/soap-encoding
+Changes made:
+ - reverted namespace to http://schemas.xmlsoap.org/soap/encoding/
+ - reverted root to only allow 0 and 1 as lexical values
+ - removed default value from root attribute declaration
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
+ targetNamespace="http://schemas.xmlsoap.org/soap/encoding/" >
+
+ <xs:attribute name="root" >
+ <xs:annotation>
+ <xs:documentation>
+ 'root' can be used to distinguish serialization roots from other
+ elements that are present in a serialization but are not roots of
+ a serialized value graph
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base='xs:boolean'>
+ <xs:pattern value='0|1' />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attributeGroup name="commonAttributes" >
+ <xs:annotation>
+ <xs:documentation>
+ Attributes common to all elements that function as accessors or
+ represent independent (multi-ref) values. The href attribute is
+ intended to be used in a manner like CONREF. That is, the element
+ content should be empty iff the href attribute appears
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="id" type="xs:ID" />
+ <xs:attribute name="href" type="xs:anyURI" />
+ <xs:anyAttribute namespace="##other" processContents="lax" />
+ </xs:attributeGroup>
+
+ <!-- Global Attributes. The following attributes are intended to be usable via qualified attribute names on any complex type referencing them. -->
+
+ <!-- Array attributes. Needed to give the type and dimensions of an array's contents, and the offset for partially-transmitted arrays. -->
+
+ <xs:simpleType name="arrayCoordinate" >
+ <xs:restriction base="xs:string" />
+ </xs:simpleType>
+
+ <xs:attribute name="arrayType" type="xs:string" />
+ <xs:attribute name="offset" type="tns:arrayCoordinate" />
+
+ <xs:attributeGroup name="arrayAttributes" >
+ <xs:attribute ref="tns:arrayType" />
+ <xs:attribute ref="tns:offset" />
+ </xs:attributeGroup>
+
+ <xs:attribute name="position" type="tns:arrayCoordinate" />
+
+ <xs:attributeGroup name="arrayMemberAttributes" >
+ <xs:attribute ref="tns:position" />
+ </xs:attributeGroup>
+
+ <xs:group name="Array" >
+ <xs:sequence>
+ <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+ </xs:sequence>
+ </xs:group>
+
+ <xs:element name="Array" type="tns:Array" />
+ <xs:complexType name="Array" >
+ <xs:annotation>
+ <xs:documentation>
+ 'Array' is a complex type for accessors identified by position
+ </xs:documentation>
+ </xs:annotation>
+ <xs:group ref="tns:Array" minOccurs="0" />
+ <xs:attributeGroup ref="tns:arrayAttributes" />
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:complexType>
+
+ <!-- 'Struct' is a complex type for accessors identified by name.
+ Constraint: No element may be have the same name as any other,
+ nor may any element have a maxOccurs > 1. -->
+
+ <xs:element name="Struct" type="tns:Struct" />
+
+ <xs:group name="Struct" >
+ <xs:sequence>
+ <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+ </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="Struct" >
+ <xs:group ref="tns:Struct" minOccurs="0" />
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:complexType>
+
+ <!-- 'Base64' can be used to serialize binary data using base64 encoding
+ as defined in RFC2045 but without the MIME line length limitation. -->
+
+ <xs:simpleType name="base64" >
+ <xs:restriction base="xs:base64Binary" />
+ </xs:simpleType>
+
+ <!-- Element declarations corresponding to each of the simple types in the
+ XML Schemas Specification. -->
+
+ <xs:element name="duration" type="tns:duration" />
+ <xs:complexType name="duration" >
+ <xs:simpleContent>
+ <xs:extension base="xs:duration" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="dateTime" type="tns:dateTime" />
+ <xs:complexType name="dateTime" >
+ <xs:simpleContent>
+ <xs:extension base="xs:dateTime" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+
+
+ <xs:element name="NOTATION" type="tns:NOTATION" />
+ <xs:complexType name="NOTATION" >
+ <xs:simpleContent>
+ <xs:extension base="xs:QName" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+
+ <xs:element name="time" type="tns:time" />
+ <xs:complexType name="time" >
+ <xs:simpleContent>
+ <xs:extension base="xs:time" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="date" type="tns:date" />
+ <xs:complexType name="date" >
+ <xs:simpleContent>
+ <xs:extension base="xs:date" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gYearMonth" type="tns:gYearMonth" />
+ <xs:complexType name="gYearMonth" >
+ <xs:simpleContent>
+ <xs:extension base="xs:gYearMonth" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gYear" type="tns:gYear" />
+ <xs:complexType name="gYear" >
+ <xs:simpleContent>
+ <xs:extension base="xs:gYear" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gMonthDay" type="tns:gMonthDay" />
+ <xs:complexType name="gMonthDay" >
+ <xs:simpleContent>
+ <xs:extension base="xs:gMonthDay" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gDay" type="tns:gDay" />
+ <xs:complexType name="gDay" >
+ <xs:simpleContent>
+ <xs:extension base="xs:gDay" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gMonth" type="tns:gMonth" />
+ <xs:complexType name="gMonth" >
+ <xs:simpleContent>
+ <xs:extension base="xs:gMonth" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="boolean" type="tns:boolean" />
+ <xs:complexType name="boolean" >
+ <xs:simpleContent>
+ <xs:extension base="xs:boolean" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="base64Binary" type="tns:base64Binary" />
+ <xs:complexType name="base64Binary" >
+ <xs:simpleContent>
+ <xs:extension base="xs:base64Binary" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="hexBinary" type="tns:hexBinary" />
+ <xs:complexType name="hexBinary" >
+ <xs:simpleContent>
+ <xs:extension base="xs:hexBinary" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="float" type="tns:float" />
+ <xs:complexType name="float" >
+ <xs:simpleContent>
+ <xs:extension base="xs:float" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="double" type="tns:double" />
+ <xs:complexType name="double" >
+ <xs:simpleContent>
+ <xs:extension base="xs:double" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="anyURI" type="tns:anyURI" />
+ <xs:complexType name="anyURI" >
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="QName" type="tns:QName" />
+ <xs:complexType name="QName" >
+ <xs:simpleContent>
+ <xs:extension base="xs:QName" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+
+ <xs:element name="string" type="tns:string" />
+ <xs:complexType name="string" >
+ <xs:simpleContent>
+ <xs:extension base="xs:string" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="normalizedString" type="tns:normalizedString" />
+ <xs:complexType name="normalizedString" >
+ <xs:simpleContent>
+ <xs:extension base="xs:normalizedString" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="token" type="tns:token" />
+ <xs:complexType name="token" >
+ <xs:simpleContent>
+ <xs:extension base="xs:token" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="language" type="tns:language" />
+ <xs:complexType name="language" >
+ <xs:simpleContent>
+ <xs:extension base="xs:language" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="Name" type="tns:Name" />
+ <xs:complexType name="Name" >
+ <xs:simpleContent>
+ <xs:extension base="xs:Name" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="NMTOKEN" type="tns:NMTOKEN" />
+ <xs:complexType name="NMTOKEN" >
+ <xs:simpleContent>
+ <xs:extension base="xs:NMTOKEN" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="NCName" type="tns:NCName" />
+ <xs:complexType name="NCName" >
+ <xs:simpleContent>
+ <xs:extension base="xs:NCName" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="NMTOKENS" type="tns:NMTOKENS" />
+ <xs:complexType name="NMTOKENS" >
+ <xs:simpleContent>
+ <xs:extension base="xs:NMTOKENS" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ID" type="tns:ID" />
+ <xs:complexType name="ID" >
+ <xs:simpleContent>
+ <xs:extension base="xs:ID" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="IDREF" type="tns:IDREF" />
+ <xs:complexType name="IDREF" >
+ <xs:simpleContent>
+ <xs:extension base="xs:IDREF" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ENTITY" type="tns:ENTITY" />
+ <xs:complexType name="ENTITY" >
+ <xs:simpleContent>
+ <xs:extension base="xs:ENTITY" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="IDREFS" type="tns:IDREFS" />
+ <xs:complexType name="IDREFS" >
+ <xs:simpleContent>
+ <xs:extension base="xs:IDREFS" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ENTITIES" type="tns:ENTITIES" />
+ <xs:complexType name="ENTITIES" >
+ <xs:simpleContent>
+ <xs:extension base="xs:ENTITIES" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="decimal" type="tns:decimal" />
+ <xs:complexType name="decimal" >
+ <xs:simpleContent>
+ <xs:extension base="xs:decimal" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="integer" type="tns:integer" />
+ <xs:complexType name="integer" >
+ <xs:simpleContent>
+ <xs:extension base="xs:integer" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="nonPositiveInteger" type="tns:nonPositiveInteger" />
+ <xs:complexType name="nonPositiveInteger" >
+ <xs:simpleContent>
+ <xs:extension base="xs:nonPositiveInteger" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="negativeInteger" type="tns:negativeInteger" />
+ <xs:complexType name="negativeInteger" >
+ <xs:simpleContent>
+ <xs:extension base="xs:negativeInteger" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="long" type="tns:long" />
+ <xs:complexType name="long" >
+ <xs:simpleContent>
+ <xs:extension base="xs:long" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="int" type="tns:int" />
+ <xs:complexType name="int" >
+ <xs:simpleContent>
+ <xs:extension base="xs:int" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="short" type="tns:short" />
+ <xs:complexType name="short" >
+ <xs:simpleContent>
+ <xs:extension base="xs:short" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="byte" type="tns:byte" />
+ <xs:complexType name="byte" >
+ <xs:simpleContent>
+ <xs:extension base="xs:byte" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="nonNegativeInteger" type="tns:nonNegativeInteger" />
+ <xs:complexType name="nonNegativeInteger" >
+ <xs:simpleContent>
+ <xs:extension base="xs:nonNegativeInteger" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedLong" type="tns:unsignedLong" />
+ <xs:complexType name="unsignedLong" >
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedLong" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedInt" type="tns:unsignedInt" />
+ <xs:complexType name="unsignedInt" >
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedInt" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedShort" type="tns:unsignedShort" />
+ <xs:complexType name="unsignedShort" >
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedShort" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedByte" type="tns:unsignedByte" />
+ <xs:complexType name="unsignedByte" >
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedByte" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="positiveInteger" type="tns:positiveInteger" />
+ <xs:complexType name="positiveInteger" >
+ <xs:simpleContent>
+ <xs:extension base="xs:positiveInteger" >
+ <xs:attributeGroup ref="tns:commonAttributes" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="anyType" />
+</xs:schema>
+
diff --git a/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/ImportSchedulerConfigTest.java b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/ImportSchedulerConfigTest.java
new file mode 100644
index 0000000..74bc188
--- /dev/null
+++ b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/ImportSchedulerConfigTest.java
@@ -0,0 +1,35 @@
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config;
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.SarisInterfaceApplication;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.api.StoerungsauskunftApi;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.service.ImportService;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.boot.test.mock.mockito.SpyBean;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+@SpringBootTest(classes = SarisInterfaceApplication.class)
+@ContextConfiguration(classes = {TestConfiguration.class})
+@ActiveProfiles("test")
+public class ImportSchedulerConfigTest {
+
+ @SpyBean
+ private ImportService importService;
+
+ @MockBean
+ private StoerungsauskunftApi stoerungsauskunftApi;
+
+ @Autowired
+ private ImportSchedulerConfig importSchedulerConfig;
+
+ @Test
+ public void shoulImportUserNotification() {
+ importSchedulerConfig.scheduleTaskImportUserNotifications();
+ verify(importService, times(1)).importUserNotifications();
+ }
+}
diff --git a/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/TestConfiguration.java b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/TestConfiguration.java
new file mode 100644
index 0000000..7ad433f
--- /dev/null
+++ b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/config/TestConfiguration.java
@@ -0,0 +1,82 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.config;
+
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.rabbitmq.client.Channel;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.SarisInterfaceApplication;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.config.rabbitMq.RabbitMqConfig;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.mapper.StoerungsauskunftMapperImpl;
+import org.springframework.amqp.rabbit.annotation.EnableRabbit;
+import org.springframework.amqp.rabbit.connection.Connection;
+import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+import org.springframework.amqp.rabbit.test.TestRabbitTemplate;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.TestPropertySource;
+
+import java.io.IOException;
+
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.BDDMockito.willReturn;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+
+@EntityScan(basePackageClasses = SarisInterfaceApplication.class)
+@ContextConfiguration( initializers = {ConfigFileApplicationContextInitializer.class})
+@TestPropertySource("spring.config.location=classpath:application.yml")
+@EnableRabbit
+public class TestConfiguration {
+
+ @Bean
+ ObjectMapper objectMapper() { return new ObjectMapper(); }
+
+ @Bean
+ public StoerungsauskunftMapperImpl stoerungsauskunftMapper() {return new StoerungsauskunftMapperImpl();}
+
+ @Bean
+ public MessageChannel failureImportChannel() {return mock(MessageChannel.class);}
+
+ @Bean
+ @Qualifier("rabbitMqConfig")
+ public RabbitMqConfig rabbitMqConfig() {
+ RabbitMqConfig rabbitMqConfigMock = mock(RabbitMqConfig.class);
+ doNothing().when(rabbitMqConfigMock).buildAllQueues();
+ return rabbitMqConfigMock;
+ }
+
+ @Bean
+ public TestRabbitTemplate template() throws IOException {
+ return new TestRabbitTemplate(connectionFactory());
+ }
+
+ @Bean
+ public ConnectionFactory connectionFactory() throws IOException {
+ ConnectionFactory factory = mock(ConnectionFactory.class);
+ Connection connection = mock(Connection.class);
+ Channel channel = mock(Channel.class);
+ willReturn(connection).given(factory).createConnection();
+ willReturn(channel).given(connection).createChannel(anyBoolean());
+ given(channel.isOpen()).willReturn(true);
+ return factory;
+ }
+
+}
diff --git a/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/controller/ImportControllerTest.java b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/controller/ImportControllerTest.java
new file mode 100644
index 0000000..f34c4e6
--- /dev/null
+++ b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/controller/ImportControllerTest.java
@@ -0,0 +1,57 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.controller;
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.SarisInterfaceApplication;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.api.StoerungsauskunftApi;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.service.ImportService;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.web.servlet.MockMvc;
+
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+@SpringBootTest(classes = SarisInterfaceApplication.class)
+@AutoConfigureMockMvc
+@ActiveProfiles("test")
+public class ImportControllerTest {
+
+ @MockBean
+ private StoerungsauskunftApi stoerungsauskunftApi;
+
+ @MockBean
+ private ImportService importService;
+
+ @Autowired
+ private MockMvc mockMvc;
+
+
+ @Test
+ public void shouldCallImport() throws Exception {
+
+ mockMvc.perform(get("/stoerungsauskunft/usernotification-import-test"))
+ .andExpect(status().is2xxSuccessful());
+
+ verify(importService, times(1)).importUserNotifications();
+ }
+}
\ No newline at end of file
diff --git a/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/ImportServiceTest.java b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/ImportServiceTest.java
new file mode 100644
index 0000000..fc8f6ce
--- /dev/null
+++ b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/service/ImportServiceTest.java
@@ -0,0 +1,77 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.service;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.SarisInterfaceApplication;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.api.StoerungsauskunftApi;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.config.TestConfiguration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.mockito.ArgumentMatchers.any;
+
+@SpringBootTest(classes = SarisInterfaceApplication.class)
+@ContextConfiguration(classes = {TestConfiguration.class})
+@ActiveProfiles("test")
+public class ImportServiceTest {
+
+ @Autowired
+ private ImportService importService;
+
+ @Autowired
+ ObjectMapper objectMapper;
+
+ @MockBean
+ StoerungsauskunftApi stoerungsauskunftApi;
+
+ /* @Test
+ public void shoulImportUserNotification() throws IOException {
+
+ ImportService importExportServicSpy = spy(importService);
+
+ InputStream is = new ClassPathResource("UsernotificationJsonResponse.json").getInputStream();
+ List<StoerungsauskunftUserNotification> userNotificationList =
+ objectMapper.readValue(is, new TypeReference<List<StoerungsauskunftUserNotification>>() {
+ });
+ when(stoerungsauskunftApi.getUserNotification(any(Integer.class))).thenReturn(userNotificationList);
+
+ importExportServicSpy.importUserNotifications();
+
+ verify(importExportServicSpy, times(userNotificationList.size())).pushForeignFailure(any(ForeignFailureMessageDto.class));
+ }
+
+ @Test
+ public void shoulImportUserNotificationMapperTest1() throws IOException {
+
+ ImportService importExportServicSpy = spy(importService);
+
+ InputStream is = new ClassPathResource("UsernotificationJsonResponse.json").getInputStream();
+ List<StoerungsauskunftUserNotification> userNotificationList =
+ objectMapper.readValue(is, new TypeReference<List<StoerungsauskunftUserNotification>>() {
+ });
+ when(stoerungsauskunftApi.getUserNotification(any(Integer.class))).thenReturn(userNotificationList);
+
+ importExportServicSpy.importUserNotifications();
+
+ verify(importExportServicSpy, times(userNotificationList.size())).pushForeignFailure(any(ForeignFailureMessageDto.class));
+ }*/
+
+
+}
diff --git a/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/support/MockDataHelper.java b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/support/MockDataHelper.java
new file mode 100644
index 0000000..6f82c6b
--- /dev/null
+++ b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/support/MockDataHelper.java
@@ -0,0 +1,162 @@
+/*
+ *******************************************************************************
+ * 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
+ *******************************************************************************
+ */
+package org.eclipse.openk.gridfailureinformation.sarisinterface.support;
+
+import org.eclipse.openk.gridfailureinformation.sarisinterface.constants.Constants;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.FailureInformationDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.ForeignFailureDataDto;
+import org.eclipse.openk.gridfailureinformation.sarisinterface.dtos.ForeignFailureMessageDto;
+
+import java.math.BigDecimal;
+import java.sql.Date;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+public class MockDataHelper {
+
+ private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
+
+ private MockDataHelper() {}
+
+ public static ForeignFailureMessageDto mockForeignFailureDto() throws ParseException {
+ ForeignFailureMessageDto foreignFailureMessageDto = new ForeignFailureMessageDto();
+ foreignFailureMessageDto.setMetaId("a4509482-3be2-4402-a9bd-ff91649b9c1e");
+ foreignFailureMessageDto.setSource(Constants.SRC_STOERUNGSAUSKUNFT_DE);
+ foreignFailureMessageDto.setDescription("Rohrbruch");
+
+ ForeignFailureDataDto dataDto = new ForeignFailureDataDto();
+ dataDto.setPlanned(true);
+ dataDto.setFailureBegin(SIMPLE_DATE_FORMAT.parse("06.05.2020 12:30:00"));
+ dataDto.setFailureEndPlanned(SIMPLE_DATE_FORMAT.parse("06.04.2021 13:30:00"));
+ dataDto.setPostcode("55232");
+ dataDto.setCity("Alzey");
+ dataDto.setDescription("In Alzey ist eine PLZ/Gemeindestörung");
+ foreignFailureMessageDto.setPayload(dataDto);
+
+ return foreignFailureMessageDto;
+ }
+
+ public static ForeignFailureMessageDto mockForeignFailureDtoWithCoordinates() throws ParseException {
+ ForeignFailureMessageDto foreignFailureMessageDto = new ForeignFailureMessageDto();
+ foreignFailureMessageDto.setMetaId("a4509482-3be2-4402-a9bd-ff91649b9c1e");
+ foreignFailureMessageDto.setSource(Constants.SRC_STOERUNGSAUSKUNFT_DE);
+ foreignFailureMessageDto.setDescription("Rohrbruch");
+
+ ForeignFailureDataDto dataDto = new ForeignFailureDataDto();
+ dataDto.setPlanned(true);
+ dataDto.setFailureBegin(SIMPLE_DATE_FORMAT.parse("06.05.2020 12:30:00"));
+ dataDto.setFailureEndPlanned(SIMPLE_DATE_FORMAT.parse("06.04.2021 13:30:00"));
+ dataDto.setPostcode("55232");
+ dataDto.setCity("Alzey");
+ dataDto.setDescription("In Alzey ist eine PLZ/Gemeindestörung");
+ dataDto.setLongitude(new BigDecimal("49.7842378"));
+ dataDto.setLatitude(new BigDecimal("8.0308092"));
+ foreignFailureMessageDto.setPayload(dataDto);
+
+ return foreignFailureMessageDto;
+ }
+
+ public static FailureInformationDto mockFailureInformationDto() {
+
+ FailureInformationDto dto = new FailureInformationDto();
+ dto.setUuid(UUID.randomUUID());
+ dto.setVersionNumber(3L);
+ dto.setResponsibility("Vatter Abraham");
+ dto.setFailureBegin(Date.valueOf("2022-12-01"));
+ dto.setFailureEndPlanned(Date.valueOf("2022-12-02"));
+ dto.setFailureEndResupplied(Date.valueOf("2022-12-03"));
+
+
+ dto.setStreet("Budenweg");
+ dto.setDistrict("West");
+ dto.setCity("Waldau");
+
+ dto.setStationId("224488-123bcd");
+ dto.setStationDescription("Trafo 25");
+ dto.setStationCoords("121,8855");
+ dto.setLongitude(BigDecimal.valueOf(8.646280));
+ dto.setLatitude(BigDecimal.valueOf(50.115618));
+
+ dto.setRadiusId(UUID.randomUUID());
+ dto.setRadius(50L);
+
+ dto.setPublicationStatus("veröffentlicht");
+ dto.setPublicationFreetext("Kabel aus Steckdose gerissen");
+
+ dto.setExpectedReasonId(UUID.randomUUID());
+ dto.setExpectedReasonText("Kabelfehler Niederspannung");
+
+ dto.setFailureClassificationId(UUID.randomUUID());
+ dto.setFailureClassification("FailClazz");
+
+ dto.setFailureTypeId(UUID.randomUUID());
+ dto.setFailureType("FailTypo");
+
+ dto.setStatusInternId(UUID.randomUUID());
+ dto.setStatusIntern("NEW");
+
+ dto.setStatusExternId(UUID.randomUUID());
+ dto.setStatusExtern("CLOSED");
+
+ dto.setBranchId(UUID.randomUUID());
+ dto.setBranch("G");
+ dto.setBranchColorCode("#fdea64");
+
+ dto.setCreateDate(Date.valueOf("2020-05-08"));
+ dto.setCreateUser("weizenkeimk");
+ dto.setModDate(Date.valueOf("2020-05-23"));
+ dto.setModUser("schlonzh");
+
+ return dto;
+ }
+
+ public static List<ArrayList<BigDecimal>> mockPolygonCoordinatesList(){
+
+ List<ArrayList<BigDecimal>> cordinatesList = new LinkedList<>();
+
+ ArrayList<BigDecimal> firstCoordinate = new ArrayList<>();
+ firstCoordinate.add(new BigDecimal(53.5));
+ firstCoordinate.add(new BigDecimal(2.7));
+
+ ArrayList<BigDecimal> secondCoordinate = new ArrayList<>();
+ secondCoordinate.add(new BigDecimal(52.8));
+ secondCoordinate.add(new BigDecimal(2.1));
+
+ ArrayList<BigDecimal> thirdCoordinate = new ArrayList<>();
+ thirdCoordinate.add(new BigDecimal(53.66));
+ thirdCoordinate.add(new BigDecimal(2.33));
+
+ ArrayList<BigDecimal> fourthCoordinate = new ArrayList<>();
+ fourthCoordinate.add(new BigDecimal(52.9));
+ fourthCoordinate.add(new BigDecimal(2.0));
+
+ ArrayList<BigDecimal> fifthCoordinate = new ArrayList<>();
+ fifthCoordinate.add(new BigDecimal(53.45));
+ fifthCoordinate.add(new BigDecimal(2.77));
+
+ cordinatesList.add(firstCoordinate);
+ cordinatesList.add(secondCoordinate);
+ cordinatesList.add(thirdCoordinate);
+ cordinatesList.add(fourthCoordinate);
+ cordinatesList.add(fifthCoordinate);
+
+ return cordinatesList;
+ }
+
+}
diff --git a/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/util/ResourceLoaderBase.java b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/util/ResourceLoaderBase.java
new file mode 100644
index 0000000..fba9511
--- /dev/null
+++ b/SARIS-Interface/src/test/java/org/eclipse/openk/gridfailureinformation/sarisinterface/util/ResourceLoaderBase.java
@@ -0,0 +1,86 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 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
+ *******************************************************************************
+*/
+
+package org.eclipse.openk.gridfailureinformation.sarisinterface.util;
+
+import lombok.extern.log4j.Log4j2;
+import org.apache.commons.io.ByteOrderMark;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.input.BOMInputStream;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+@Log4j2
+public class ResourceLoaderBase {
+
+ private String stream2String(InputStream is, String filename) {
+ StringWriter writer = new StringWriter();
+ BOMInputStream bomInputStream = new BOMInputStream(is, false, ByteOrderMark.UTF_8, ByteOrderMark.UTF_16BE, ByteOrderMark.UTF_16LE,
+ ByteOrderMark.UTF_32BE, ByteOrderMark.UTF_32LE);
+
+ try {
+ IOUtils.copy(bomInputStream, writer, StandardCharsets.UTF_8.name());
+ } catch (IOException e) {
+ log.error("Fehler in stream2String()", e);
+ return "";
+ }
+
+ log.debug("Datei erfolgreich eingelesen: " + filename);
+ return writer.toString();
+ }
+
+ public String loadStringFromResource(String filename) {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ InputStream inputStream = classLoader.getResourceAsStream(filename);
+ if (inputStream==null){
+ log.error("Datei nicht gefunden: " + filename);
+ return null;
+ }
+ log.debug("Datei existiert: " + filename);
+ try {
+ URL resource = classLoader.getResource(filename);
+ if (resource != null) {
+ URI uri = resource.toURI();
+ log.debug("Uniform Resource Identifier (URI): " + uri);
+ }
+ } catch (URISyntaxException e) {
+ log.error("Fehler in loadStringFromResource: " + filename, e);
+ }
+
+ return stream2String(inputStream, filename);
+ }
+
+ public String loadFromPath(String path) {
+ try {
+ Path paths = Paths.get(path);
+ log.debug("paths: " + path);
+ try (InputStream inputStream = Files.newInputStream(Paths.get(path))) {
+ return stream2String(inputStream, paths.getFileName().toString());
+ }
+ } catch (IOException e) {
+ log.error("Fehler in loadFromPath", e);
+ return null;
+ }
+ }
+}
diff --git a/SARIS-Interface/src/test/resources/UsernotificationJsonResponse.json b/SARIS-Interface/src/test/resources/UsernotificationJsonResponse.json
new file mode 100644
index 0000000..fb469bf
--- /dev/null
+++ b/SARIS-Interface/src/test/resources/UsernotificationJsonResponse.json
@@ -0,0 +1,69 @@
+[
+ {
+ "id": 24,
+ "date": "28.5.2020 14:49:11",
+ "postcode": "55237",
+ "city": "Bornheim",
+ "ags": null,
+ "district": null,
+ "street": "Bahnhofstraße 27",
+ "lat": "49.8031615",
+ "lng": "8.1932478",
+ "comment": "Licht aus",
+ "operatorOutageInArea": 0
+ },
+ {
+ "id": 23,
+ "date": "28.5.2020 14:49:11",
+ "postcode": "55237",
+ "city": "Flonheim",
+ "ags": null,
+ "district": null,
+ "street": "Am Obertor",
+ "lat": "49.8031615",
+ "lng": "8.1932478",
+ "comment": "Zappenduster",
+ "operatorOutageInArea": 0,
+ "houseNo": "13"
+ },
+ {
+ "id": 23,
+ "date": "28.5.2020 14:49:11",
+ "postcode": "55237",
+ "city": "Flonheim",
+ "ags": null,
+ "district": null,
+ "lat": "49.8031615",
+ "lng": "8.1932478",
+ "comment": "Zappenduster",
+ "operatorOutageInArea": 0
+ },
+ {
+ "id": 23,
+ "date": "28.5.2020 14:49:11",
+ "postcode": "55237",
+ "city": "Flonheim",
+ "ags": null,
+ "street": "",
+ "district": null,
+ "lat": "49.8031615",
+ "lng": "8.1932478",
+ "comment": "Zappenduster",
+ "operatorOutageInArea": 0,
+ "houseNo": ""
+ },
+ {
+ "id": 23,
+ "date": "28.5.2020 14:49:11",
+ "postcode": "55237",
+ "city": "Flonheim",
+ "ags": null,
+ "district": null,
+ "street": "Am Obertor",
+ "lat": "49.8031615",
+ "lng": "8.1932478",
+ "comment": "Zappenduster",
+ "phone": "01520123456",
+ "operatorOutageInArea": 0
+ }
+]
\ No newline at end of file
diff --git a/SARIS-Interface/src/test/resources/application.yml b/SARIS-Interface/src/test/resources/application.yml
new file mode 100644
index 0000000..843be83
--- /dev/null
+++ b/SARIS-Interface/src/test/resources/application.yml
@@ -0,0 +1,76 @@
+# *******************************************************************************
+# 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
+# *******************************************************************************
+spring:
+ rabbitmq:
+ host: host
+ port: 5672
+ username: userName
+ password: secPwd
+
+ # Importkanal
+ importExchange: sitImportExchange_dev
+ importQueue: sitImportQueue_dev
+ importkey: sitImportExchange.failureImportKey_dev
+
+ # Exportkanal
+ exportExchange: sitExportExchange_dev
+ exportQueue: stoerungsauskunft_export_queue_test_simon
+ exportKey: stoerungsauskunft_export_key_test_simon
+
+
+server:
+ max-http-header-size: 262144
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: false
+ staticJwt: x
+
+gridFailureInformation:
+ maxListSize: 2000
+
+
+feign:
+ client:
+ config:
+ default:
+ connectTimeout: 60000
+ readTimeout: 60000
+cors:
+ corsEnabled: false
+
+stoerungsauskunft:
+ apiUrl: https://stage-api-operator.stoerungsauskunft.de/api/v1.0/
+ user: userName
+ password: secPwd
+ scheduling-import:
+ enabled: false
+ cron: 0 */15 * ? * *
+
+---
+
+spring:
+ profiles: test
+
+jwt:
+ tokenHeader: Authorization
+ useStaticJwt: true
+ staticJwt: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJIYlI3Z2pobmE2eXJRZnZJTWhUSV9tY2g3ZmtTQWVFX3hLTjBhZVl0bjdjIn0.eyJqdGkiOiI5MGI0NGFkOC1iYjlmLTQ1MzktYTQwYy0yYjQyZTNkNjNiOGEiLCJleHAiOjE1Nzg2NTU3OTUsIm5iZiI6MCwiaWF0IjoxNTc4NjU1NDk1LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvYXV0aC9yZWFsbXMvRWxvZ2Jvb2siLCJhdWQiOiJlbG9nYm9vay1iYWNrZW5kIiwic3ViIjoiODYyNjY5NmYtZjFhMi00ZGI1LTkyZWYtZTlhMjQ2Njg1YTU0IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZWxvZ2Jvb2stYmFja2VuZCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjJmMWIzODE5LWZjNjQtNDEzNC1iNWQxLWY3ZWY4NzU5NDBkNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsia29uLWFkbWluIiwia29uLXdyaXRlciIsImtvbi1hY2Nlc3MiLCJrb24tcmVhZGVyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnt9LCJuYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSBUZXN0ZXJMYXN0bmFtZV9yd2EiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0ZXN0dXNlcl9yd2EiLCJnaXZlbl9uYW1lIjoiVGVzdGVyRmlyc3RuYW1lX3J3YSIsImZhbWlseV9uYW1lIjoiVGVzdGVyTGFzdG5hbWVfcndhIn0.DAYXuv4tKn8RXqO1jyttnD-tF4nShUBQyfe4bKbAiPAyY2x5YbAf3M4eXnLrGqo8-loGKldICC28bL0LaMA3KKkQEOfW5sfpGqoN6212vs89mOklt0TJYc5PMXwFgJ5WC_TKjdwq7-aaDafOEWehV0U1ut3s-94ovNYIEn29nzXm2W1ldoXJEq03F880jlysQ5zlRvGF7eXEEpFfI2URyyNQ2UWh0Ssfq-gOAt2pbF1u6prA5RfvUmZ3v1eu21YLGZtgqPqxb1l6odyH3ip15j_HdgnTeo52ymxuRUj65Mskme3V5ev2DitHI9vZgnpV8Idhb4TTWliBeGCOMfDFCg
+
+stoerungsauskunft:
+ apiUrl: https://stage-api-operator.stoerungsauskunft.de/api/v1.0/
+ user: userName
+ password: secPwd
+ scheduling-import:
+ enabled: true
+ cron: 0 */15 * ? * *
\ No newline at end of file
diff --git a/SARIS-Interface/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/SARIS-Interface/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
new file mode 100644
index 0000000..ca6ee9c
--- /dev/null
+++ b/SARIS-Interface/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
@@ -0,0 +1 @@
+mock-maker-inline
\ No newline at end of file