Explorar o código

First commit.

Lucas Albertins %!s(int64=3) %!d(string=hai) anos
pai
achega
e0614ce0ad

+ 1 - 0
.gitignore

@@ -80,3 +80,4 @@ Network Trash Folder
 Temporary Items
 .apdisk
 
+/target/

+ 25 - 0
HELP.md

@@ -0,0 +1,25 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.7.9/maven-plugin/reference/html/)
+* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.7.9/maven-plugin/reference/html/#build-image)
+* [Spring Configuration Processor](https://docs.spring.io/spring-boot/docs/2.7.9/reference/htmlsingle/#appendix.configuration-metadata.annotation-processor)
+* [Spring Web](https://docs.spring.io/spring-boot/docs/2.7.9/reference/htmlsingle/#web)
+* [Thymeleaf](https://docs.spring.io/spring-boot/docs/2.7.9/reference/htmlsingle/#web.servlet.spring-mvc.template-engines)
+* [JDBC API](https://docs.spring.io/spring-boot/docs/2.7.9/reference/htmlsingle/#data.sql)
+* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/2.7.9/reference/htmlsingle/#data.sql.jpa-and-spring-data)
+
+### Guides
+The following guides illustrate how to use some features concretely:
+
+* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
+* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
+* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
+* [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/)
+* [Accessing Relational Data using JDBC with Spring](https://spring.io/guides/gs/relational-data-access/)
+* [Managing Transactions](https://spring.io/guides/gs/managing-transactions/)
+* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
+

+ 316 - 0
mvnw

@@ -0,0 +1,316 @@
+#!/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 /usr/local/etc/mavenrc ] ; then
+    . /usr/local/etc/mavenrc
+  fi
+
+  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="`\\unset -f command; \\command -v 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/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.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" || rm -f "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$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 \
+  $MAVEN_DEBUG_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" \
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188 - 0
mvnw.cmd

@@ -0,0 +1,188 @@
+@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 "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\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/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq 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%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.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 "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\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%
+
+cmd /C exit /B %ERROR_CODE%

+ 83 - 0
pom.xml

@@ -0,0 +1,83 @@
+<?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.7.9</version>
+		<relativePath/> <!-- lookup parent from repository -->
+	</parent>
+	<groupId>ua.be</groupId>
+	<artifactId>wee</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>wee</name>
+	<description>Worflow Enactment Engine</description>
+	<properties>
+		<java.version>11</java.version>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.jena</groupId>
+			<artifactId>apache-jena-libs</artifactId>
+			<type>pom</type>
+			<version>4.7.0</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-data-jpa</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-jdbc</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-thymeleaf</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>com.h2database</groupId>
+			<artifactId>h2</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-configuration-processor</artifactId>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.projectlombok</groupId>
+			<artifactId>lombok</artifactId>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>
+							<groupId>org.projectlombok</groupId>
+							<artifactId>lombok</artifactId>
+						</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

+ 13 - 0
src/main/java/ua/be/wee/WeeApplication.java

@@ -0,0 +1,13 @@
+package ua.be.wee;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class WeeApplication {
+
+	public static void main(String[] args) {
+		SpringApplication.run(WeeApplication.class, args);
+	}
+
+}

+ 81 - 0
src/main/java/ua/be/wee/controller/PMControllerMVC.java

@@ -0,0 +1,81 @@
+package ua.be.wee.controller;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import ua.be.wee.model.EnactmentController;
+import ua.be.wee.model.repository.FusekiWrapper;
+
+@Controller
+@RequestMapping("/wee")
+public class PMControllerMVC {
+
+	@Autowired private EnactmentController controller;
+  
+
+    @Value("${base_url}")
+    private String baseUrl;
+
+    @ModelAttribute("baseUrl")
+    public String getUrl() {
+        return this.baseUrl;
+    }
+
+    
+
+    @PostMapping("/pm")
+    public String getPMs(Model model, @RequestParam String endpoint) {
+    	FusekiWrapper.getInstance().setServiceURI(endpoint);
+    	if (FusekiWrapper.getInstance().testEndpoint()) {
+    		model.addAttribute("error",false);
+    		model.addAttribute("pms", controller.getAllPMs());
+            return "pms";
+		} else {
+			model.addAttribute("error",true);
+			return "index";
+		}
+    	
+    }
+
+    @PostMapping("/pm/enact")
+    public String getPMtoEnact(Model model, @RequestParam String pmiri) {
+    	System.out.println(pmiri);
+    	if (pmiri.equals("select PM")) {
+			model.addAttribute("error", true);
+			model.addAttribute("pms", controller.getAllPMs());
+			return "pms";
+		} else {
+			model.addAttribute("error", false);
+			controller.getPM(pmiri);
+	        return "pms";
+		}
+    	
+
+    }
+
+//    @PostMapping("/form")
+//    public String newAccount(@ModelAttribute AccountDTO accountDTO) {
+//        controller.create(accountDTO);
+//        return "redirect:/account";
+//    }
+//
+//    @GetMapping("/{id}/enoughBalance/{value}")
+//    @ResponseBody
+//    public Map<String, Boolean> enoughBalance(@PathVariable Long id, @PathVariable Long value) {
+//        return Collections.singletonMap("enoughBalance", controller.enoughBalance(id, value));
+//    }
+//
+//    @PutMapping("/{id}/balance")
+//    @ResponseBody
+//    public void updateBalance(@PathVariable Long id, @RequestBody Long value) {
+//        log.info(String.format("%s -> %s", id, value));
+//        controller.updateBalance(id, value);
+//    }
+	
+}

+ 30 - 0
src/main/java/ua/be/wee/model/EnactmentController.java

@@ -0,0 +1,30 @@
+package ua.be.wee.model;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import ua.be.wee.model.nodes.NodeRespository;
+import ua.be.wee.model.pm.PM;
+import ua.be.wee.model.pm.PMRepository;
+
+@Component
+public class EnactmentController {
+
+	@Autowired
+	private PMRepository pmRepo;
+	
+	@Autowired
+	private NodeRespository nodeRepo;
+	
+	public List<PM> getAllPMs() {
+		return pmRepo.getAllPMs();
+	}
+
+	public PM getPM(String pmid) {
+		PM pm = pmRepo.getPM(pmid);
+		pm.setNodes(nodeRepo.getNodes(pm));
+		return pm;
+	}
+}

+ 46 - 0
src/main/java/ua/be/wee/model/artifacts/WorkflowArtifact.java

@@ -0,0 +1,46 @@
+package ua.be.wee.model.artifacts;
+
+public class WorkflowArtifact {
+	
+	private String id;
+	
+	private String iri;
+	
+	private String usageName;
+	
+	private String type;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getIri() {
+		return iri;
+	}
+
+	public void setIri(String iri) {
+		this.iri = iri;
+	}
+
+	public String getUsageName() {
+		return usageName;
+	}
+
+	public void setUsageName(String usageName) {
+		this.usageName = usageName;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+	
+
+}

+ 51 - 0
src/main/java/ua/be/wee/model/nodes/Activity.java

@@ -0,0 +1,51 @@
+package ua.be.wee.model.nodes;
+
+import java.util.List;
+
+import ua.be.wee.model.artifacts.WorkflowArtifact;
+
+public class Activity extends Node {
+	
+	private List<WorkflowArtifact> inputs;
+	
+	private List<WorkflowArtifact> outputs;
+	
+	private List<Node> nextNodes;
+	
+	private List<Node> previousNodes;
+	
+	private String TransformationName;
+
+	public List<Node> getNextNodes() {
+		return nextNodes;
+	}
+
+	public void setNextNodes(List<Node> nextNodes) {
+		this.nextNodes = nextNodes;
+	}
+
+	public List<Node> getPreviousNodes() {
+		return previousNodes;
+	}
+
+	public void setPreviousNodes(List<Node> previousNodes) {
+		this.previousNodes = previousNodes;
+	}
+
+	public List<WorkflowArtifact> getInputs() {
+		return inputs;
+	}
+
+	public void setInputs(List<WorkflowArtifact> inputs) {
+		this.inputs = inputs;
+	}
+
+	public List<WorkflowArtifact> getOutputs() {
+		return outputs;
+	}
+
+	public void setOutputs(List<WorkflowArtifact> outputs) {
+		this.outputs = outputs;
+	}
+
+}

+ 15 - 0
src/main/java/ua/be/wee/model/nodes/FinalNode.java

@@ -0,0 +1,15 @@
+package ua.be.wee.model.nodes;
+
+public class FinalNode extends Node {
+	
+	private Node previous;
+
+	public Node getPrevious() {
+		return previous;
+	}
+
+	public void setPrevious(Node previous) {
+		this.previous = previous;
+	}
+
+}

+ 27 - 0
src/main/java/ua/be/wee/model/nodes/ForkNode.java

@@ -0,0 +1,27 @@
+package ua.be.wee.model.nodes;
+
+import java.util.List;
+
+public class ForkNode extends Node {
+
+	private Node previous;
+	
+	private List<Node> nextNodes;
+
+	public Node getPrevious() {
+		return previous;
+	}
+
+	public void setPrevious(Node previous) {
+		this.previous = previous;
+	}
+
+	public List<Node> getNextNodes() {
+		return nextNodes;
+	}
+
+	public void setNextNodes(List<Node> nextNodes) {
+		this.nextNodes = nextNodes;
+	}
+	
+}

+ 17 - 0
src/main/java/ua/be/wee/model/nodes/InitialNode.java

@@ -0,0 +1,17 @@
+package ua.be.wee.model.nodes;
+
+public class InitialNode extends Node {
+	
+	private Node next;
+
+	public Node getNext() {
+		return next;
+	}
+
+	public void setNext(Node next) {
+		this.next = next;
+	}
+	
+	
+
+}

+ 27 - 0
src/main/java/ua/be/wee/model/nodes/JoinNode.java

@@ -0,0 +1,27 @@
+package ua.be.wee.model.nodes;
+
+import java.util.List;
+
+public class JoinNode extends Node {
+	
+	private List<Node> previousNodes;
+	
+	private Node next;
+
+	public List<Node> getPreviousNodes() {
+		return previousNodes;
+	}
+
+	public void setPreviousNodes(List<Node> previousNodes) {
+		this.previousNodes = previousNodes;
+	}
+
+	public Node getNext() {
+		return next;
+	}
+
+	public void setNext(Node next) {
+		this.next = next;
+	}
+
+}

+ 36 - 0
src/main/java/ua/be/wee/model/nodes/Node.java

@@ -0,0 +1,36 @@
+package ua.be.wee.model.nodes;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public abstract class Node {
+
+	
+	public static final String ACTIVITY_IRI = "<http://ua.be/sdo2l/vocabulary/formalisms/pm#Activity>";
+	public static final String INITIAL_IRI = "<http://ua.be/sdo2l/vocabulary/formalisms/pm#Initial>";
+	public static final String FINAL_IRI = "<http://ua.be/sdo2l/vocabulary/formalisms/pm#Final>";
+	public static final String FORKJOIN_IRI = "<http://ua.be/sdo2l/vocabulary/formalisms/pm#ForkJoin>";
+		
+	@Id
+	private String iri;
+	
+	private String name;
+	
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getIri() {
+		return iri;
+	}
+
+	public void setIri(String iri) {
+		this.iri = iri;
+	}
+	
+}

+ 71 - 0
src/main/java/ua/be/wee/model/nodes/NodeRespository.java

@@ -0,0 +1,71 @@
+package ua.be.wee.model.nodes;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.jena.query.QuerySolution;
+import org.apache.jena.query.ResultSet;
+import org.apache.jena.rdf.model.RDFNode;
+import org.springframework.stereotype.Component;
+
+import ua.be.wee.model.pm.PM;
+import ua.be.wee.model.repository.FusekiWrapper;
+
+@Component
+public class NodeRespository {
+	
+	
+	public List<Node> getNodes(PM pm) {
+		List<Node> nodes = new ArrayList<Node>();
+		
+		String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#>\n"
+				+ "PREFIX pm: <http://ua.be/sdo2l/vocabulary/formalisms/pm#>\n"
+				+ "PREFIX ob: <http://ua.be/sdo2l/vocabulary/formalisms/object_diagram#>\n"
+				+ "SELECT ?node ?nodetype WHERE {\n"
+				+ "  ?pm a pm:Model ;\n"
+				+ "  	pm:hasPMName ?pmName ;\n"
+				+ "  	owl:sameAs " + pm.getIri() + " ;\n"
+				+ "  	ob:hasObject ?node .\n"
+				+ "  ?node a ?nodetype .\n"
+				+ "  FILTER (?nodetype in (pm:Initial, pm:Activity, pm:Final, pm:Join, pm:Fork)) .      \n"
+				+ "}";
+		ResultSet results = FusekiWrapper.getInstance().execQuery(query);
+		while (results.hasNext()) {
+			QuerySolution soln = results.nextSolution();
+			
+			RDFNode iri = soln.get("?node");
+			RDFNode type = soln.get("?nodetype");
+			Node node = createNode(iri, type);
+			nodes.add(node);
+		}
+		
+		return nodes;
+		
+	}
+
+	private Node createNode(RDFNode iri, RDFNode type) {
+		Node node = null;
+		switch ("<"+ type.toString()+ ">") {
+		case Node.ACTIVITY_IRI:
+			node = createActivity(iri.toString());
+			break;
+		case Node.INITIAL_IRI:
+			node = new InitialNode();
+			break;
+		case Node.FINAL_IRI:
+			node = new FinalNode();
+			break;
+		case Node.FORKJOIN_IRI:
+			//addlogic for fork join
+			node = new JoinNode();
+			break;
+		}
+		node.setIri("<"+ iri.toString()+">");
+		return node;
+	}
+	
+	private Node createActivity(String string2) {
+		return new Activity();
+	}
+
+}

+ 52 - 0
src/main/java/ua/be/wee/model/pm/PM.java

@@ -0,0 +1,52 @@
+package ua.be.wee.model.pm;
+
+import java.util.List;
+
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import ua.be.wee.model.nodes.Node;
+
+@Entity
+public class PM {
+	
+	@Id
+	private String iri;
+	
+	private String name;
+	
+	@ElementCollection
+	private List<Node> nodes;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getIri() {
+		return iri;
+	}
+
+	public void setIri(String iri) {
+		this.iri = iri;
+	}
+
+	public List<Node> getNodes() {
+		return nodes;
+	}
+
+	public void setNodes(List<Node> nodes) {
+		this.nodes = nodes;
+	}
+
+	public String toString() {
+		return name;
+	}
+
+	
+
+}

+ 59 - 0
src/main/java/ua/be/wee/model/pm/PMRepository.java

@@ -0,0 +1,59 @@
+package ua.be.wee.model.pm;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.jena.query.QuerySolution;
+import org.apache.jena.query.ResultSet;
+import org.apache.jena.rdf.model.RDFNode;
+import org.springframework.stereotype.Component;
+
+import ua.be.wee.model.repository.FusekiWrapper;
+
+@Component
+public class PMRepository {
+
+	public List<PM> getAllPMs() {
+		String query = "PREFIX pm: <http://ua.be/sdo2l/vocabulary/formalisms/pm#>\n"
+				+ "PREFIX base: <http://ua.be/sdo2l/vocabulary/base#>\n"
+				+ "SELECT ?pm ?pmName WHERE {\n"
+				+ "  ?pm a pm:Model ;\n"
+				+ "  	pm:hasPMName ?pmName .\n"
+				+ "}";
+		ResultSet results = FusekiWrapper.getInstance().execQuery(query);
+		List<PM> list = new ArrayList<PM>();
+		while (results.hasNext()) {
+			PM pm = new PM();
+			QuerySolution soln = results.nextSolution();
+			RDFNode iri = soln.get("?pm");
+			RDFNode name = soln.get("?pmName");
+			pm.setIri("<" + iri.toString() + ">");
+			pm.setName(name.toString());
+			list.add(pm);
+		}
+		return list;
+	}
+
+	public PM getPM(String pmiri) {
+		String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#>\n"
+				+ "PREFIX pm: <http://ua.be/sdo2l/vocabulary/formalisms/pm#>\n"
+				+ "PREFIX base: <http://ua.be/sdo2l/vocabulary/base#>\n"
+				+ "SELECT ?pm ?pmName WHERE {\n"
+				+ "  ?pm a pm:Model ;\n"
+				+ "  	pm:hasPMName ?pmName ;\n"
+				+ "  	owl:sameAs " + pmiri + " .\n"
+				+ "}";
+		ResultSet results = FusekiWrapper.getInstance().execQuery(query);
+		PM pm = new PM();
+		QuerySolution soln = results.nextSolution();
+		RDFNode iri = soln.get("?pm");
+		RDFNode name = soln.get("?pmName");
+		pm.setIri("<" + iri.toString() + ">");
+		pm.setName(name.toString());
+		return pm;
+	}
+
+	
+	
+	
+}

+ 120 - 0
src/main/java/ua/be/wee/model/repository/FusekiWrapper.java

@@ -0,0 +1,120 @@
+package ua.be.wee.model.repository;
+
+import java.io.IOException;
+
+import org.apache.jena.query.QueryExecution;
+import org.apache.jena.query.ResultSet;
+import org.apache.jena.sparql.exec.http.QueryExecutionHTTP;
+
+public class FusekiWrapper {
+	
+	private static FusekiWrapper instance;
+	
+	private String serviceURI;
+	
+	private FusekiWrapper() {
+	}
+	
+	public static FusekiWrapper getInstance() {
+		if (instance == null) {
+			instance = new FusekiWrapper();
+		}
+		return instance;
+	}
+
+	public void setServiceURI(String serviceURI) {
+		this.serviceURI = serviceURI;
+	}
+	
+	public ResultSet execQuery(String queryStr) {
+		if (!"".equals(serviceURI)) {
+			QueryExecution q = QueryExecutionHTTP.service(serviceURI, queryStr);
+			return q.execSelect();
+		}
+		throw new NullPointerException("Service URI not specified");
+		
+	}
+//
+//	private static void uploadRDF(File rdf, String serviceURI)
+//			throws IOException {
+//
+//		// parse the file
+//		Model m = ModelFactory.createDefaultModel();
+//		try (FileInputStream in = new FileInputStream(rdf)) {
+//			m.read(in, null, "RDF/XML");
+//		}
+//
+//		// upload the resulting model
+////		DatasetAccessor accessor = DatasetAccessorFactory
+////				.createHTTP(serviceURI);
+////		accessor.putModel(m);
+//	}
+	
+	
+
+//	private static void execSelectAndPrint(String serviceURI, String queryStr) {
+//		
+//		QueryExecution q = QueryExecutionFactory.sparqlService(serviceURI,
+//				queryStr);
+//		ResultSet results = q.execSelect();
+//
+//		ResultSetFormatter.out(System.out, results);
+//
+//		while (results.hasNext()) {
+//			QuerySolution soln = results.nextSolution();
+//			RDFNode x = soln.get("?pm");
+//			System.out.println(x);
+//		}
+//	}
+//
+//	private static void execSelectAndProcess(String serviceURI, String query) {
+//		QueryExecution q = QueryExecutionFactory.sparqlService(serviceURI,
+//				query);
+//		ResultSet results = q.execSelect();
+//
+//		while (results.hasNext()) {
+//			QuerySolution soln = results.nextSolution();
+//			// assumes that you have an "?x" in your query
+//			RDFNode x = soln.get("x");
+//			System.out.println(x);
+//		}
+//	}
+	
+	public boolean testEndpoint() {
+		String query = "PREFIX pm: <http://ua.be/sdo2l/vocabulary/formalisms/pm#>\n" 
+				+ "SELECT ?pm WHERE {\n"
+				+ "  ?pm a pm:Model .\n"
+				+ "}";
+		QueryExecutionHTTP service = QueryExecutionHTTP.service(serviceURI, query);
+		ResultSet execSelect;
+		try {
+			execSelect = service.execSelect();
+		} catch (Exception e) {
+			return false;
+		}
+		return execSelect.hasNext();
+	}
+
+	public static void main(String[] argv) throws IOException {
+		// uploadRDF(new File("test.rdf"), );
+//		execSelectAndPrint(
+//				"http://localhost:3030/Drivetrain",
+//				"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+//				+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
+//				+ "PREFIX wf: <http://ua.be/sdo2l/vocabulary/workflow#>\n"
+//				+ "SELECT ?pm ?nodes WHERE {\n"
+//				+ "  ?pm a wf:Workflow .\n"
+//				+ "  ?pm wf:coordinates ?nodes .\n"
+//				+ "}");
+
+//		execSelectAndProcess(
+//				"http://localhost:3030/Drivetrain",
+//				"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+//				+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
+//				+ "PREFIX wf: <http://ua.be/sdo2l/vocabulary/workflow#>\n"
+//				+ "SELECT ?pm ?nodes WHERE {\n"
+//				+ "  ?pm a wf:Workflow .\n"
+//				+ "  ?pm wf:coordinates ?nodes .\n"
+//				+ "}");
+	}
+}

+ 3 - 0
src/main/resources/application.properties

@@ -0,0 +1,3 @@
+server.port=8081
+base_url=http://localhost:8081/wee
+spring.application.name=wee

+ 21 - 0
src/main/resources/templates/account_form.html

@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>New account</title>
+</head>
+
+<body>
+    <form action="" method="post">
+        <label for="name">Name</label>
+        <input name="name" type="text" />
+        <label for="balance">Initial balance</label>
+        <input name="balance" type="number" />
+        <button type="submit">Create</button>
+    </form>
+</body>
+
+</html>

+ 86 - 0
src/main/resources/templates/index.html

@@ -0,0 +1,86 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Wee! Workflow Enactment Engine</title>
+    <style>
+		.button {
+		  border: none;
+		  color: white;
+		  padding: 16px 32px;
+		  text-align: center;
+		  text-decoration: none;
+		  display: inline-block;
+		  font-size: 16px;
+		  margin: 4px 2px;
+		  transition-duration: 0.4s;
+		  cursor: pointer;
+		}
+		
+		.button1 {
+		  background-color: white; 
+		  color: black; 
+		  border: 2px solid #5e9ca0;
+		}
+		
+		.button1:hover {
+		  background-color: #5e9ca0;
+		  color: white;
+		}
+		body{
+			font-family: Arial, Helvetica, sans-serif;
+			font-size: 13px;
+		}
+		.info, .success, .warning, .error, .validation {
+			border: 1px solid;
+			margin: 10px 0px;
+			padding: 15px 10px 15px 50px;
+			background-repeat: no-repeat;
+			background-position: 10px center;
+		}
+		.info {
+			color: #00529B;
+			background-color: #BDE5F8;
+			background-image: url('https://i.imgur.com/ilgqWuX.png');
+		}
+		.success {
+			color: #4F8A10;
+			background-color: #DFF2BF;
+			background-image: url('https://i.imgur.com/Q9BGTuy.png');
+		}
+		.warning {
+			color: #9F6000;
+			background-color: #FEEFB3;
+			background-image: url('https://i.imgur.com/Z8q7ww7.png');
+		}
+		.error{
+			color: #D8000C;
+			background-color: #FFBABA;
+			background-image: url('https://i.imgur.com/GnyDvKN.png');
+		}
+		.validation{
+			color: #D63301;
+			background-color: #FFCCBA;
+			background-image: url('https://i.imgur.com/GnyDvKN.png');
+		}		
+	</style>
+    
+  </head>
+  <body>
+<h1 style="color: #5e9ca0; text-align: center;">Welcome to Wee! <img src="https://w7.pngwing.com/pngs/276/509/png-transparent-computer-icons-slip-and-fall-running-man-miscellaneous-angle-hand-thumbnail.png" alt="Computer Icons Slip and fall, running man, angle, hand, people png | PNGWing" width="76" height="76" /></h1>
+<h1 style="color: #5e9ca0; text-align: center;">Workflow Enactment Engine</h1>
+<h2 style="color: #2e6c80; text-align: center;">If you want to see wee memes click <a href="https://www.instagram.com/weee.memes/">here!</a></h2>
+<h2 style="color: #2e6c80; text-align: center;">Otherwise, please, indicate the url of your endpoint and let's start enacting your workflow!</h2>
+
+	<table>
+	    <form th:action="@{/wee/pm}" method="post">
+	    <tr >
+	        <td ><h3 style="color: #5e9ca0;">Endpoint:</h3></td>
+	        <td ><input type="text" id="endpointURL" name="endpoint" size="50" /> </td>
+	    </tr>
+	    <tr><td><input class="button button1" type="submit" value="Next"/> </td></tr>   
+	    </form> 
+	</table>
+	<div th:if="${error}" class="error">Error connecting to specified endpoint! </div>
+
+</body>
+</html>

+ 54 - 0
src/main/resources/templates/pms.html

@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Process Model Enactment</title>
+    <style>
+		.button {
+		  border: none;
+		  color: white;
+		  padding: 16px 32px;
+		  text-align: center;
+		  text-decoration: none;
+		  display: inline-block;
+		  font-size: 16px;
+		  margin: 4px 2px;
+		  transition-duration: 0.4s;
+		  cursor: pointer;
+		}
+		
+		.button1 {
+		  background-color: white; 
+		  color: black; 
+		  border: 2px solid #5e9ca0;
+		}
+		
+		.button1:hover {
+		  background-color: #5e9ca0;
+		  color: white;
+		}		
+	</style>
+</head>
+
+<body>
+
+<table>
+	<form th:action="@{/wee/pm/enact}" method="post">
+    <tr >
+        <td ><h3 style="color: #5e9ca0;">Choose the Process Model to be enacted:</h3></td>
+        <td ><select class="form-control" id="dropDownList" name="pmiri" >
+    			<option value="select PM">select PM</option>
+			    <option th:each="pm: ${pms}" th:value="${pm.iri}" th:text="${pm}"></option>
+			</select>
+		</td>
+    </tr>    
+    <tr><td><input class="button button1" type="submit" value="Start Enactment"/> </td></tr>  
+</table>
+    
+   
+</body>
+
+</html>

+ 24 - 0
src/main/resources/templates/transaction_form.html

@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>New transaction</title>
+</head>
+
+<body>
+    <p th:text="${error}" style="color: red"></p>
+    <form action="" method="post">
+        <label for="fromAccountId">Source account</label>
+        <input name="fromAccountId" type="number" />
+        <label for="toAccountId">Destination account</label>
+        <input name="toAccountId" type="number" />
+        <label for="value">Value</label>
+        <input name="value" type="number" />
+        <button type="submit">Submit</button>
+    </form>
+</body>
+
+</html>

+ 18 - 0
src/main/resources/templates/transactions.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Transactions</title>
+</head>
+
+<body>
+    <a href="/transaction/form">Create new transaction</a>
+    <ul>
+        <li th:each="transaction: ${transactions}"><span th:text="${transaction}"></span></li>
+    </ul>
+</body>
+
+</html>