Merge branch 'master' into taskana-md
This commit is contained in:
commit
814fa4edae
|
@ -1,5 +1,8 @@
|
|||
# See https://github.com/github/gitignore for more about ignoring files.
|
||||
|
||||
### MAVEN WRAPPER ###
|
||||
.mvn/wrapper/*jar
|
||||
|
||||
### GENERATED ###
|
||||
target/
|
||||
.apt_generated/
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* Copyright 2007-present the original author or authors.
|
||||
*
|
||||
* Licensed 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
|
||||
*
|
||||
* http://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.
|
||||
*/
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
import java.nio.channels.*;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenWrapperDownloader {
|
||||
|
||||
private static final String WRAPPER_VERSION = "0.5.6";
|
||||
/**
|
||||
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
|
||||
*/
|
||||
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
|
||||
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
|
||||
|
||||
/**
|
||||
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
|
||||
* use instead of the default one.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
|
||||
".mvn/wrapper/maven-wrapper.properties";
|
||||
|
||||
/**
|
||||
* Path where the maven-wrapper.jar will be saved to.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_JAR_PATH =
|
||||
".mvn/wrapper/maven-wrapper.jar";
|
||||
|
||||
/**
|
||||
* Name of the property which should be used to override the default download url for the wrapper.
|
||||
*/
|
||||
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
|
||||
|
||||
public static void main(String args[]) {
|
||||
System.out.println("- Downloader started");
|
||||
File baseDirectory = new File(args[0]);
|
||||
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
|
||||
|
||||
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
||||
// wrapperUrl parameter.
|
||||
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
|
||||
String url = DEFAULT_DOWNLOAD_URL;
|
||||
if(mavenWrapperPropertyFile.exists()) {
|
||||
FileInputStream mavenWrapperPropertyFileInputStream = null;
|
||||
try {
|
||||
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
|
||||
Properties mavenWrapperProperties = new Properties();
|
||||
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
|
||||
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
|
||||
} catch (IOException e) {
|
||||
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
|
||||
} finally {
|
||||
try {
|
||||
if(mavenWrapperPropertyFileInputStream != null) {
|
||||
mavenWrapperPropertyFileInputStream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Ignore ...
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading from: " + url);
|
||||
|
||||
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
|
||||
if(!outputFile.getParentFile().exists()) {
|
||||
if(!outputFile.getParentFile().mkdirs()) {
|
||||
System.out.println(
|
||||
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
|
||||
try {
|
||||
downloadFileFromURL(url, outputFile);
|
||||
System.out.println("Done");
|
||||
System.exit(0);
|
||||
} catch (Throwable e) {
|
||||
System.out.println("- Error downloading");
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
|
||||
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
|
||||
String username = System.getenv("MVNW_USERNAME");
|
||||
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
|
||||
Authenticator.setDefault(new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(username, password);
|
||||
}
|
||||
});
|
||||
}
|
||||
URL website = new URL(urlString);
|
||||
ReadableByteChannel rbc;
|
||||
rbc = Channels.newChannel(website.openStream());
|
||||
FileOutputStream fos = new FileOutputStream(destination);
|
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||
fos.close();
|
||||
rbc.close();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
|
56
.travis.yml
56
.travis.yml
|
@ -1,10 +1,10 @@
|
|||
os: linux
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
|
||||
language: java
|
||||
|
||||
jdk:
|
||||
- openjdk8
|
||||
- openjdk11
|
||||
|
||||
addons:
|
||||
sonarcloud:
|
||||
|
@ -16,8 +16,6 @@ git:
|
|||
|
||||
services:
|
||||
- docker
|
||||
- xvfb # required because our frontend tests currently use firefox as a browser (and thus do not run headless)
|
||||
# see https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-to-run-tests-that-require-a-gui for more information
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
|
@ -39,23 +37,14 @@ env:
|
|||
jobs:
|
||||
- DB=H2
|
||||
- DB=DB2_11_1
|
||||
- DB=POSTGRES_10
|
||||
|
||||
install: skip
|
||||
|
||||
# include SONAR_PROJECT_KEY as a second parameter if this is not a pull request
|
||||
script: ci/test.sh "$DB" "$([ "false" = "$TRAVIS_PULL_REQUEST" ] && echo "$SONAR_PROJECT_KEY")"
|
||||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: Test
|
||||
before_script: nvm install $NODE_VERSION
|
||||
install: skip
|
||||
env: DB=WEB
|
||||
script: ci/test.sh "$DB"
|
||||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
|
||||
# We are using the environment variable 'MODULE' to force travis into using a different cache for each build.
|
||||
# See https://docs.travis-ci.com/user/caching/#caches-and-build-matrices for detailed information on
|
||||
# which characteristics determine the cache selection.
|
||||
|
@ -89,25 +78,48 @@ jobs:
|
|||
script: ci/compile.sh "$MODULE"
|
||||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
|
||||
- stage: Test
|
||||
install: skip
|
||||
env: DB=POSTGRES_10
|
||||
script: ci/test.sh "$DB" && export JAVA_HOME=/usr/local/lib/jvm/openjdk8 && ci/test.sh WILDFLY
|
||||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
|
||||
- stage: Test
|
||||
before_script: nvm install $NODE_VERSION
|
||||
install: skip
|
||||
env: DB=WEB
|
||||
script: ci/test.sh "$DB"
|
||||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
|
||||
- stage: Release / Deploy
|
||||
name: release / deploy / commit
|
||||
# This is necessary in order to fix some gpg issues (for signing the artifacts which will be released)
|
||||
# More details: https://discuss.circleci.com/t/error-sending-to-agent-inappropriate-ioctl-for-device/17465/7
|
||||
before_install: |
|
||||
openssl aes-256-cbc -K "$encrypted_21a5d40e43a3_key" -iv "$encrypted_21a5d40e43a3_iv" \
|
||||
-in "ci/codesigning.asc.enc" -out "ci/codesigning.asc" -d && gpg --import "ci/codesigning.asc" \
|
||||
echo use-agent >> ~/.gnupg/gpg.conf \
|
||||
&& echo pinentry-mode loopback >> ~/.gnupg/gpg.conf \
|
||||
&& echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf \
|
||||
&& echo RELOADAGENT | gpg-connect-agent \
|
||||
&& openssl aes-256-cbc -K "$encrypted_21a5d40e43a3_key" -iv "$encrypted_21a5d40e43a3_iv" \
|
||||
-in "ci/codesigning.asc.enc" -out "ci/codesigning.asc" -d \
|
||||
&& gpg --batch --no-tty --yes --import "ci/codesigning.asc" \
|
||||
&& nvm install "$NODE_VERSION"
|
||||
install: ci/change_version.sh -m .
|
||||
&& ( cd web && npm install )
|
||||
&& ( cd web && npm run build:prod-silent )
|
||||
&& mvn -q install -T 4C -am -Dasciidoctor.skip -DskipTests -Dcheckstyle.skip -pl :taskana-rest-spring-example-boot,:taskana-cdi
|
||||
&& mvn -q prepare-package -pl :taskana-rest-spring
|
||||
&& mvn -q install -f history -T 4C -am -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-simplehistory-rest-spring
|
||||
&& mvn -q install -P history.plugin -DskipTests -Dcheckstyle.skip -pl :taskana-rest-spring-example-boot
|
||||
&& ./mvnw -q install -B -T 2C -pl :taskana-rest-spring-example-boot,:taskana-cdi -am -DskipTests -Dcheckstyle.skip -Dasciidoctor.skip
|
||||
&& ./mvnw -q prepare-package -B -T 2C -pl :taskana-rest-spring
|
||||
&& ./mvnw -q install -B -T 2C -f history -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||
&& ./mvnw -q install -B -T 2C -pl :taskana-rest-spring-example-boot -P history.plugin -DskipTests -Dcheckstyle.skip
|
||||
before_script: ci/verify_docs_jar.sh
|
||||
script: |
|
||||
mvn deploy -T 4C -P `[[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot"` \
|
||||
./mvnw deploy -B -T 2C -P `[[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot"` \
|
||||
--settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip \
|
||||
-pl !:taskana-cdi-example,!:taskana-spring-example,\
|
||||
!:taskana-rest-spring-example-common,!:taskana-rest-spring-example-boot,!:taskana-rest-spring-example-wildfly
|
||||
-pl :taskana-parent,\
|
||||
:taskana-common-parent,:taskana-common,:taskana-common-data,:taskana-common-test,\
|
||||
:taskana-lib-parent,:taskana-core,:taskana-cdi,:taskana-spring,\
|
||||
:taskana-rest-parent,:taskana-web,:taskana-rest-spring,\
|
||||
:taskana-history-parent,:taskana-simplehistory-provider,:taskana-simplehistory-rest-spring,:taskana-loghistory-provider
|
||||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
# travis_terminate is necessary since after_success is a job phase which can change the build result.
|
||||
# it is not documented, so this is a little hack. see: https://docs.travis-ci.com/user/job-lifecycle/#breaking-the-build
|
||||
|
|
|
@ -3,7 +3,7 @@ TASKANA - The open source task management library
|
|||
|
||||
[](https://github.com/Taskana/taskana/graphs/contributors)
|
||||
[](https://prettier.io/)
|
||||
[](https://travis-ci.org/Taskana/taskana)
|
||||
[](https://travis-ci.com/Taskana/taskana)
|
||||
[](https://sonarcloud.io/dashboard?id=Taskana_taskana)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/pro.taskana/taskana-core)
|
||||
[](http://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
|
|
|
@ -21,7 +21,7 @@ set -e #fail fast
|
|||
#H if this is a tagged build then TRAVIS_TAG contains the version number.
|
||||
#H pattern: v[DIGIT].[DIGIT].[DIGIT]
|
||||
# Arguments:
|
||||
# $1: exitcode
|
||||
# $1: exit code
|
||||
function helpAndExit() {
|
||||
cat "$0" | grep "^#H" | cut -c4-
|
||||
exit "$1"
|
||||
|
@ -45,13 +45,15 @@ function increment_version() {
|
|||
# Arguments:
|
||||
# $1: directory of pom
|
||||
# $2: new version
|
||||
# Environment variable:
|
||||
# REL: relative path to this file
|
||||
function change_version() {
|
||||
mvn -q versions:set -f "$1" -DnewVersion="$2" -DartifactId=* -DgroupId=* versions:commit
|
||||
$REL/../mvnw -q versions:set -f "$1" -DnewVersion="$2" -DartifactId=* -DgroupId=* versions:commit
|
||||
}
|
||||
|
||||
function main() {
|
||||
[[ $# -eq 0 || "$1" == '-h' || "$1" == '--help' ]] && helpAndExit 0
|
||||
|
||||
REL=$(dirname "$0")
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-i)
|
||||
|
|
|
@ -34,23 +34,23 @@ function main() {
|
|||
;;
|
||||
COMMON)
|
||||
set -x
|
||||
mvn -q install -B -f $REL/.. -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip -N
|
||||
mvn -q test-compile -B -f $REL/../common
|
||||
$REL/../mvnw -q install -B -T 2C -f $REL/.. -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip -N
|
||||
$REL/../mvnw -q test-compile -B -T 2C -f $REL/../common
|
||||
;;
|
||||
LIB)
|
||||
set -x
|
||||
mvn -q install -B -f $REL/.. -pl :taskana-core -am -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip
|
||||
mvn -q test-compile -B -f $REL/../lib
|
||||
$REL/../mvnw -q install -B -T 2C -f $REL/.. -pl :taskana-core -am -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip
|
||||
$REL/../mvnw -q test-compile -B -T 2C -f $REL/../lib
|
||||
;;
|
||||
REST)
|
||||
set -x
|
||||
mvn -q install -B -f $REL/.. -pl :taskana-simplehistory-rest-spring -am -Dasciidoctor.skip -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip
|
||||
mvn -q test-compile -B -f $REL/../rest
|
||||
$REL/../mvnw -q install -B -T 2C -f $REL/.. -pl :taskana-simplehistory-rest-spring -am -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip -Dasciidoctor.skip
|
||||
$REL/../mvnw -q test-compile -B -T 2C -f $REL/../rest
|
||||
;;
|
||||
HISTORY)
|
||||
set -x
|
||||
mvn -q install -B -f $REL/.. -pl :taskana-rest-spring -am -Dasciidoctor.skip -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip
|
||||
mvn -q test-compile -B -f $REL/../history
|
||||
$REL/../mvnw -q install -B -T 2C -f $REL/.. -pl :taskana-rest-spring -am -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip -Dasciidoctor.skip
|
||||
$REL/../mvnw -q test-compile -B -T 2C -f $REL/../history
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -2,8 +2,12 @@ version: '3'
|
|||
services:
|
||||
taskana-postgres_10:
|
||||
build: .
|
||||
container_name: taskana-postgres_10
|
||||
ports:
|
||||
- 50102:5432
|
||||
- 5102:5432
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
taskana-db2_11-1:
|
||||
image: taskana/db2:11.1
|
||||
ports:
|
||||
- 5101:50000
|
||||
command: -d
|
|
@ -5,7 +5,7 @@ SET PROP_FILE=%HOMEPATH%\taskanaUnitTest.properties
|
|||
:MENU
|
||||
ECHO.
|
||||
ECHO -----------------------------------------------------
|
||||
ECHO PRESS a number to select your task - anthing to EXIT.
|
||||
ECHO PRESS a number to select your task - anything to EXIT.
|
||||
ECHO -----------------------------------------------------
|
||||
ECHO.
|
||||
ECHO 1 - Start DB2 11.1
|
||||
|
@ -29,24 +29,11 @@ SET PROP_FILE=%HOMEPATH%\taskanaUnitTest.properties
|
|||
|
||||
:START_DB2_11_1
|
||||
ECHO ---
|
||||
docker ps -aq -f name=^/taskana-db2_11_1$ -f status=running > %TEMP%\temp
|
||||
SET /P CONTAINER_RUNNING=< %TEMP%\temp
|
||||
docker ps -aq -f name=^/taskana-db2_11_1$ > %TEMP%\temp
|
||||
SET /P CONTAINER_EXISTS=< %TEMP%\temp
|
||||
del %TEMP%\temp
|
||||
|
||||
IF DEFINED CONTAINER_EXISTS (
|
||||
ECHO docker start taskana-db2_11_1
|
||||
docker start taskana-db2_11_1
|
||||
)
|
||||
|
||||
IF NOT DEFINED CONTAINER_EXISTS (
|
||||
ECHO docker run -d -p 50101:50000 --name taskana-db2_11_1 taskana/db2:11.1 -d
|
||||
docker run -d -p 50101:50000 --name taskana-db2_11_1 taskana/db2:11.1 -d
|
||||
)
|
||||
ECHO docker-compose -f %~dp0/docker-compose.yml up -d taskana-db2_11-1
|
||||
docker-compose -f %~dp0/docker-compose.yml up -d taskana-db2_11-1
|
||||
|
||||
ECHO jdbcDriver=com.ibm.db2.jcc.DB2Driver> %PROP_FILE%
|
||||
ECHO jdbcUrl=jdbc:db2://localhost:50101/tskdb>> %PROP_FILE%
|
||||
ECHO jdbcUrl=jdbc:db2://localhost:5101/tskdb>> %PROP_FILE%
|
||||
ECHO dbUserName=db2inst1>> %PROP_FILE%
|
||||
ECHO dbPassword=db2inst1-pwd>> %PROP_FILE%
|
||||
ECHO schemaName=taskana>> %PROP_FILE%
|
||||
|
@ -55,17 +42,18 @@ SET PROP_FILE=%HOMEPATH%\taskanaUnitTest.properties
|
|||
|
||||
:STOP_DB2_11_1
|
||||
ECHO ---
|
||||
ECHO docker stop taskana-db2_11_1
|
||||
docker stop taskana-db2_11_1
|
||||
ECHO docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-db2_11-1
|
||||
docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-db2_11-1
|
||||
ECHO ---
|
||||
GOTO MENU
|
||||
GOTO REMOVE_PROP
|
||||
|
||||
:START_POSTGRES_10
|
||||
ECHO docker-compose -f %~dp0/docker-compose.yml up -d
|
||||
docker-compose -f %~dp0/docker-compose.yml up -d
|
||||
ECHO ---
|
||||
ECHO docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_10
|
||||
docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_10
|
||||
|
||||
ECHO jdbcDriver=org.postgresql.Driver> %PROP_FILE%
|
||||
ECHO jdbcUrl=jdbc:postgresql://localhost:50102/postgres>> %PROP_FILE%
|
||||
ECHO jdbcUrl=jdbc:postgresql://localhost:5102/postgres>> %PROP_FILE%
|
||||
ECHO dbUserName=postgres>> %PROP_FILE%
|
||||
ECHO dbPassword=postgres>> %PROP_FILE%
|
||||
ECHO schemaName=taskana>> %PROP_FILE%
|
||||
|
@ -75,18 +63,17 @@ SET PROP_FILE=%HOMEPATH%\taskanaUnitTest.properties
|
|||
:STOP_POSTGRES_10
|
||||
ECHO ---
|
||||
ECHO docker stop taskana-postgres_10
|
||||
docker stop taskana-postgres_10
|
||||
ECHO docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_10
|
||||
docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_10
|
||||
ECHO ---
|
||||
GOTO MENU
|
||||
GOTO REMOVE_PROP
|
||||
|
||||
:STOP_ALL
|
||||
ECHO ---
|
||||
ECHO docker stop taskana-db2_11_1
|
||||
docker stop taskana-db2_11_1
|
||||
ECHO docker stop taskana-postgres_10
|
||||
docker stop takana-postgres_10
|
||||
ECHO docker-compose -f %~dp0/docker-compose.yml down -v
|
||||
docker-compose -f %~dp0/docker-compose.yml down -v
|
||||
ECHO ---
|
||||
GOTO MENU
|
||||
GOTO REMOVE_PROP
|
||||
|
||||
:REMOVE_PROP
|
||||
ECHO ---
|
||||
|
|
|
@ -2,13 +2,18 @@
|
|||
set -e #fail fast
|
||||
|
||||
#H Usage:
|
||||
#H prepare_db.sh -h | prepare_db.sh --help
|
||||
#H %FILE% -h | %FILE% --help
|
||||
#H
|
||||
#H prints this help and exits
|
||||
#H
|
||||
#H prepare_db.sh <database>
|
||||
#H %FILE% <database>
|
||||
#H
|
||||
#H downloads and starts docker image for taskana unit tests
|
||||
#H downloads and starts docker image for taskana unit tests.
|
||||
#H
|
||||
#H %FILE% stop [database]
|
||||
#H
|
||||
#H stops the database and removes 'taskanaUnitTest.properties'.
|
||||
#H If no database was provided all databases are stopped.
|
||||
#H
|
||||
#H database:
|
||||
#H - H2
|
||||
|
@ -17,43 +22,58 @@ set -e #fail fast
|
|||
# Arguments:
|
||||
# $1: exit code
|
||||
function helpAndExit() {
|
||||
cat "$0" | grep "^#H" | cut -c4-
|
||||
cat "$0" | grep "^#H" | cut -c4- | sed -e "s/%FILE%/$(basename "$0")/g"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
# This function maps the database parameter (for this file) to the docker-compose service name.
|
||||
# Arguments:
|
||||
# $1: the database which should be mapped
|
||||
function mapDBToDockerComposeServiceName() {
|
||||
[[ -z "$1" || "$1" == "H2" ]] && return
|
||||
case "$1" in
|
||||
DB2_11_1)
|
||||
echo "taskana-db2_11-1"
|
||||
;;
|
||||
POSTGRES_10)
|
||||
echo "taskana-postgres_10"
|
||||
;;
|
||||
*)
|
||||
echo "unknown database '$1'" >&2 && exit 1
|
||||
esac
|
||||
}
|
||||
|
||||
function main() {
|
||||
[[ $# -eq 0 || "$1" == '-h' || "$1" == '--help' ]] && helpAndExit 0
|
||||
propFile="$HOME/taskanaUnitTest.properties"
|
||||
scriptDir=`dirname $0`
|
||||
scriptDir=$(dirname "$0")
|
||||
|
||||
case "$1" in
|
||||
H2)
|
||||
if [[ -f "$propFile" ]]; then
|
||||
rm "$propFile"
|
||||
fi
|
||||
[[ -f "$propFile" ]] && rm "$propFile"
|
||||
;;
|
||||
DB2_11_1)
|
||||
if [[ -z $(docker ps -aq -f name=^/taskana-db2_11_1$ -f status=running) ]]; then
|
||||
if [[ -z $(docker ps -aq -f name=^/taskana-db2_11_1$) ]]; then
|
||||
docker run -d -p 50101:50000 --name taskana-db2_11_1 taskana/db2:11.1 -d
|
||||
else
|
||||
docker start taskana-db2_11_1
|
||||
fi
|
||||
fi
|
||||
echo 'jdbcDriver=com.ibm.db2.jcc.DB2Driver' >$propFile
|
||||
echo 'jdbcUrl=jdbc:db2://localhost:50101/tskdb' >>$propFile
|
||||
echo 'dbUserName=db2inst1' >>$propFile
|
||||
echo 'dbPassword=db2inst1-pwd' >>$propFile
|
||||
echo 'schemaName=TASKANA' >>$propFile
|
||||
docker-compose -f $scriptDir/docker-compose.yml up -d $(mapDBToDockerComposeServiceName "$1")
|
||||
|
||||
echo 'jdbcDriver=com.ibm.db2.jcc.DB2Driver' > $propFile
|
||||
echo 'jdbcUrl=jdbc:db2://localhost:5101/tskdb' >> $propFile
|
||||
echo 'dbUserName=db2inst1' >> $propFile
|
||||
echo 'dbPassword=db2inst1-pwd' >> $propFile
|
||||
echo 'schemaName=TASKANA' >> $propFile
|
||||
;;
|
||||
POSTGRES_10)
|
||||
docker-compose -f $scriptDir/docker-compose.yml up -d
|
||||
docker-compose -f $scriptDir/docker-compose.yml up -d $(mapDBToDockerComposeServiceName "$1")
|
||||
|
||||
echo 'jdbcDriver=org.postgresql.Driver' >$propFile
|
||||
echo 'jdbcUrl=jdbc:postgresql://localhost:50102/postgres' >>$propFile
|
||||
echo 'dbUserName=postgres' >>$propFile
|
||||
echo 'dbPassword=postgres' >>$propFile
|
||||
echo 'schemaName=taskana' >>$propFile
|
||||
echo 'jdbcDriver=org.postgresql.Driver' > $propFile
|
||||
echo 'jdbcUrl=jdbc:postgresql://localhost:5102/postgres' >> $propFile
|
||||
echo 'dbUserName=postgres' >> $propFile
|
||||
echo 'dbPassword=postgres' >> $propFile
|
||||
echo 'schemaName=taskana' >> $propFile
|
||||
;;
|
||||
stop)
|
||||
docker-compose -f $scriptDir/docker-compose.yml rm -f -s -v $(mapDBToDockerComposeServiceName "$2")
|
||||
|
||||
[[ -f "$propFile" ]] && rm "$propFile"
|
||||
;;
|
||||
*)
|
||||
echo "unknown database '$1'" >&2
|
||||
|
|
29
ci/test.sh
29
ci/test.sh
|
@ -16,6 +16,7 @@ set -e # fail fast
|
|||
#H - POSTGRES_10
|
||||
#H module:
|
||||
#H - HISTORY
|
||||
#H - WILDFLY
|
||||
#H sonar project key:
|
||||
#H the key of the sonarqube project where the coverage will be sent to.
|
||||
#H If empty nothing will be sent
|
||||
|
@ -33,47 +34,51 @@ function main() {
|
|||
H2)
|
||||
set -x
|
||||
eval "$REL/prepare_db.sh '$1'"
|
||||
# We can not use the fance '-f' maven option due to a bug in arquillian. See https://issues.jboss.org/browse/THORN-2049
|
||||
(cd $REL/.. && mvn -q install -B -T 4C -am -Pcoverage -Dcheckstyle.skip)
|
||||
# We can not use the fancy '-f' maven option due to a bug in arquillian. See https://issues.jboss.org/browse/THORN-2049
|
||||
(cd $REL/.. && ./mvnw -q install -B -T 2C -Pcoverage -Dcheckstyle.skip)
|
||||
eval "$REL/verify_docs_jar.sh"
|
||||
# disabling sonarqube for PRs because it's not supported yet. See https://jira.sonarsource.com/browse/MMF-1371
|
||||
if [ -n "$2" ]; then
|
||||
#-Pcoverage to activate jacoco and test coverage reports
|
||||
# -Pcoverage to activate jacoco and test coverage reports
|
||||
# send test coverage and build information to sonarcloud
|
||||
mvn sonar:sonar -f $REL/.. -Pcoverage -Dsonar.projectKey="$2"
|
||||
$REL/../mvnw -q sonar:sonar -B -T 2C -f $REL/.. -Pcoverage -Dsonar.projectKey="$2"
|
||||
fi
|
||||
;;
|
||||
DB2_11_1)
|
||||
set -x
|
||||
eval "$REL/prepare_db.sh '$1'"
|
||||
mvn -q verify -B -f $REL/.. -am -T 4C -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core
|
||||
$REL/../mvnw -q verify -B -T 2C -f $REL/.. -pl :taskana-core -am -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||
;;
|
||||
POSTGRES_10)
|
||||
set -x
|
||||
eval "$REL/prepare_db.sh '$1'"
|
||||
### INSTALL ###
|
||||
mvn -q install -B -f $REL/.. -P postgres -am -T 4C -pl :taskana-rest-spring-example-wildfly -Dasciidoctor.skip -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||
$REL/../mvnw -q install -B -T 2C -f $REL/.. -pl :taskana-rest-spring-example-common -am -P postgres -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -Dasciidoctor.skip
|
||||
|
||||
### TEST ###
|
||||
mvn -q verify -B -f $REL/.. -Dmaven.javadoc.skip -Dcheckstyle.skip -pl :taskana-core
|
||||
$REL/../mvnw -q verify -B -T 2C -f $REL/.. -pl :taskana-core -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||
;;
|
||||
WILDFLY)
|
||||
set -x
|
||||
eval "$REL/prepare_db.sh 'POSTGRES_10'"
|
||||
# Same as above (H2) we can not use the fancy '-f' maven option
|
||||
(cd $REL/.. && mvn -q verify -B -pl :taskana-rest-spring-example-wildfly -Ddb.type=postgres -Dmaven.javadoc.skip -Dcheckstyle.skip)
|
||||
(cd $REL/../rest/taskana-rest-spring-example-wildfly && ../../mvnw -q verify -B -T 2C -Ddb.type=postgres)
|
||||
;;
|
||||
HISTORY)
|
||||
set -x
|
||||
### INSTALL ###
|
||||
mvn -q install -B -f $REL/.. -am -T 4C -pl :taskana-rest-spring -Dasciidoctor.skip -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||
$REL/../mvnw -q install -B -T 2C -f $REL/.. -pl :taskana-rest-spring -am -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -Dasciidoctor.skip
|
||||
|
||||
### TEST ###
|
||||
mvn -q verify -B -f $REL/../history -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||
$REL/../mvnw -q verify -B -T 2C -f $REL/../history -Dmaven.javadoc.skip -Dcheckstyle.skip
|
||||
;;
|
||||
WEB)
|
||||
set -x
|
||||
### INSTALL ###
|
||||
|
||||
(cd $REL/../web && npm install --silent && npm run build:prod-silent)
|
||||
mvn -q install -B -f $REL/.. -am -T 4C -pl :taskana-rest-spring-example-boot -Dasciidoctor.skip -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -P history.plugin
|
||||
mvn spring-boot:run -P history.plugin -f $REL/../rest/taskana-rest-spring-example-boot > /dev/null &
|
||||
$REL/../mvnw -q install -B -T 2C -f $REL/.. -pl :taskana-rest-spring-example-boot -am -P history.plugin -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -Dasciidoctor.skip
|
||||
$REL/../mvnw spring-boot:run -P history.plugin -f $REL/../rest/taskana-rest-spring-example-boot > /dev/null &
|
||||
|
||||
### TEST ###
|
||||
(cd $REL/../web && npm run test -- --coverageReporters text-summary)
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-common-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>This pom is parent to all taskana common modules and serves the common build.</description>
|
||||
<description>This pom is parent to all taskana common modules and serves the common build.
|
||||
</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
|
|
|
@ -1,54 +1,55 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-common-data</artifactId>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-common-data</artifactId>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The helper module to import data for testing.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The helper module to import data for testing.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${version.mybatis}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${version.mybatis}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -119,6 +119,19 @@ ou: Organisationseinheit/Organisationseinheit KSC/Organisationseinheit KSC 1
|
|||
cn: Elena Eifrig
|
||||
userPassword: user-1-2
|
||||
|
||||
dn: uid=user-1-3,cn=users,OU=Test,O=TASKANA
|
||||
objectclass: inetorgperson
|
||||
objectclass: organizationalperson
|
||||
objectclass: person
|
||||
objectclass: top
|
||||
givenName: Elena
|
||||
description: desc
|
||||
uid: user-1-3
|
||||
sn: Faul
|
||||
ou: Organisationseinheit/Organisationseinheit KSC/Organisationseinheit KSC 1
|
||||
cn: Elena Faul
|
||||
userPassword: user-1-3
|
||||
|
||||
dn: uid=Max,cn=users,OU=Test,O=TASKANA
|
||||
objectclass: inetorgperson
|
||||
objectclass: organizationalperson
|
||||
|
|
|
@ -4,7 +4,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
import static org.junit.jupiter.api.DynamicContainer.dynamicContainer;
|
||||
import static org.junit.jupiter.api.DynamicTest.dynamicTest;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
@ -14,7 +13,6 @@ import org.junit.jupiter.api.AfterAll;
|
|||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.DynamicContainer;
|
||||
import org.junit.jupiter.api.DynamicTest;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
|
@ -25,17 +23,18 @@ import org.junit.jupiter.api.extension.ExtendWith;
|
|||
|
||||
import pro.taskana.common.api.security.CurrentUserContext;
|
||||
import pro.taskana.common.internal.security.CurrentUserContextImpl;
|
||||
import pro.taskana.common.test.security.JaasExtensionTestExtensions.ShouldThrowJunitException;
|
||||
import pro.taskana.common.test.security.JaasExtensionTestExtensions.ShouldThrowParameterResolutionException;
|
||||
|
||||
@ExtendWith(JaasExtension.class)
|
||||
class JaasExtensionTest {
|
||||
|
||||
private static final String INSIDE_DYNAMIC_TEST_USER = "insidedynamictest";
|
||||
private static final String INSIDE_DYNAMIC_TEST_USER = "inside_dynamic_test";
|
||||
private static final CurrentUserContext CURRENT_USER_CONTEXT = new CurrentUserContextImpl(true);
|
||||
private static final DynamicTest NOT_NULL_DYNAMIC_TEST =
|
||||
dynamicTest("dynamic test", () -> assertThat(CURRENT_USER_CONTEXT.getUserid()).isNotNull());
|
||||
private static final DynamicTest NULL_DYNAMIC_TEST =
|
||||
dynamicTest(
|
||||
"dynamic test", () -> assertThat(CURRENT_USER_CONTEXT.getUserid()).isNull());
|
||||
dynamicTest("dynamic test", () -> assertThat(CURRENT_USER_CONTEXT.getUserid()).isNull());
|
||||
private static final DynamicTest DYNAMIC_TEST_USER_DYNAMIC_TEST =
|
||||
dynamicTest(
|
||||
"dynamic test",
|
||||
|
@ -154,17 +153,20 @@ class JaasExtensionTest {
|
|||
|
||||
@WithAccessId(user = "user")
|
||||
@Test
|
||||
@Disabled("this can be tested with a org.junit.platform.launcher.TestExecutionListener")
|
||||
void should_NotInjectParameter_When_ParameterIsPresent_On_Test(WithAccessId accessId) {
|
||||
assertThat(CURRENT_USER_CONTEXT.getUserid()).isEqualTo("user");
|
||||
@ExtendWith(ShouldThrowParameterResolutionException.class)
|
||||
void should_NotInjectParameter_When_TestTemplateIsNotUsed(
|
||||
@SuppressWarnings("unused") WithAccessId accessId) {
|
||||
// THIS IS NOT RELEVANT
|
||||
assertThat(true).isTrue();
|
||||
}
|
||||
|
||||
@WithAccessId(user = "user")
|
||||
@WithAccessId(user = "user2")
|
||||
@Test
|
||||
@Disabled("this can be tested with a org.junit.platform.launcher.TestExecutionListener")
|
||||
void should_ThrowException_When_MultipleAnnotationsExist_On_Test() {
|
||||
assertThat(CURRENT_USER_CONTEXT.getUserid()).isNull();
|
||||
@ExtendWith(ShouldThrowJunitException.class)
|
||||
void should_ThrowJunitException_When_MultipleAnnotationsExist_On_Test() {
|
||||
// THIS IS NOT RELEVANT
|
||||
assertThat(true).isTrue();
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
@ -174,14 +176,14 @@ class JaasExtensionTest {
|
|||
@TestFactory
|
||||
List<DynamicTest> should_NotSetJaasSubject_When_AnnotationIsMissing_On_TestFactory() {
|
||||
assertThat(CURRENT_USER_CONTEXT.getUserid()).isNull();
|
||||
return Collections.emptyList();
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@WithAccessId(user = "testfactory")
|
||||
@TestFactory
|
||||
List<DynamicTest> should_SetJaasSubject_When_AnnotationExists_On_TestFactory() {
|
||||
assertThat(CURRENT_USER_CONTEXT.getUserid()).isEqualTo("testfactory");
|
||||
return Collections.emptyList();
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@WithAccessId(user = "testfactory1")
|
||||
|
@ -190,19 +192,13 @@ class JaasExtensionTest {
|
|||
List<DynamicTest>
|
||||
should_SetJaasSubjectFromFirstAnnotation_When_MultipleAnnotationsExists_On_TestFactory() {
|
||||
assertThat(CURRENT_USER_CONTEXT.getUserid()).isEqualTo("testfactory1");
|
||||
return Collections.emptyList();
|
||||
return List.of();
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region JaasExtension#interceptTestTemplateMethod
|
||||
|
||||
@TestTemplate
|
||||
@Disabled("this can be tested with a org.junit.platform.launcher.TestExecutionListener")
|
||||
void should_NotFindContextProvider_When_AnnotationIsMissing_On_TestTemplate() {
|
||||
assertThat(CURRENT_USER_CONTEXT.getUserid()).isNotNull();
|
||||
}
|
||||
|
||||
@WithAccessId(user = "testtemplate")
|
||||
@TestTemplate
|
||||
void should_SetJaasSubject_When_AnnotationExists_On_TestTemplate() {
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package pro.taskana.common.test.security;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.junit.jupiter.api.extension.ParameterResolutionException;
|
||||
import org.junit.jupiter.api.extension.TestExecutionExceptionHandler;
|
||||
import org.junit.platform.commons.JUnitException;
|
||||
|
||||
public class JaasExtensionTestExtensions {
|
||||
static class ShouldThrowParameterResolutionException implements TestExecutionExceptionHandler {
|
||||
|
||||
@Override
|
||||
public void handleTestExecutionException(ExtensionContext context, Throwable throwable)
|
||||
throws Throwable {
|
||||
if (throwable instanceof ParameterResolutionException) {
|
||||
return;
|
||||
}
|
||||
throw throwable;
|
||||
}
|
||||
}
|
||||
|
||||
static class ShouldThrowJunitException implements TestExecutionExceptionHandler {
|
||||
|
||||
@Override
|
||||
public void handleTestExecutionException(ExtensionContext context, Throwable throwable)
|
||||
throws Throwable {
|
||||
if (throwable instanceof JUnitException) {
|
||||
JUnitException exception = (JUnitException) throwable;
|
||||
assertThat(exception.getMessage())
|
||||
.isEqualTo("Please use @TestTemplate instead of @Test for multiple accessIds");
|
||||
return;
|
||||
}
|
||||
throw throwable;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,6 @@ import java.util.List;
|
|||
/**
|
||||
* Main query interface.
|
||||
*
|
||||
* @author EH
|
||||
* @param <T> specifies the return type of the follwing methods
|
||||
* @param <U> specifies the type of the enum used
|
||||
*/
|
||||
|
@ -77,6 +76,9 @@ public interface BaseQuery<T, U extends Enum<U> & QueryColumnName> {
|
|||
|
||||
default String[] toUpperCopy(String... source) {
|
||||
if (source == null || source.length == 0) {
|
||||
// we are currently aware that this is a code smell. Unfortunately the resolution of this
|
||||
// would cause havoc in our queries, since we do not have a concept
|
||||
// for a user input validation yet. As soon as that is done we can resolve this code smell.
|
||||
return null;
|
||||
} else {
|
||||
String[] target = new String[source.length];
|
||||
|
@ -87,11 +89,7 @@ public interface BaseQuery<T, U extends Enum<U> & QueryColumnName> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the sort direction.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** Determines the sort direction. */
|
||||
enum SortDirection {
|
||||
ASCENDING("ASC"),
|
||||
DESCENDING("DESC");
|
||||
|
|
|
@ -2,11 +2,7 @@ package pro.taskana.common.api;
|
|||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* This class encapsulates key - domain pairs for identification of workbaskets.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** This class encapsulates key - domain pairs for identification of workbaskets. */
|
||||
public class KeyDomain {
|
||||
|
||||
private String key;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
package pro.taskana.common.api;
|
||||
|
||||
/**
|
||||
* This interface ist used to emulate an extensible enum for use in the Basequery interface.
|
||||
*
|
||||
* @author jsa
|
||||
*/
|
||||
/** This interface is used to emulate an extensible enum for use in the Basequery interface. */
|
||||
public interface QueryColumnName {}
|
||||
|
|
|
@ -6,8 +6,6 @@ import java.util.Objects;
|
|||
/**
|
||||
* Capture a time interval. A fixed interval has defined begin and end Instant. An open ended
|
||||
* interval has either begin == null or end ==null.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
public class TimeInterval {
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package pro.taskana.common.api.exceptions;
|
|||
|
||||
/** Thrown in ConnectionManagementMode AUTOCOMMIT when an attempt to commit fails. */
|
||||
public class AutocommitFailedException extends TaskanaRuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AutocommitFailedException(Throwable cause) {
|
||||
super("Autocommit failed", cause);
|
||||
|
|
|
@ -3,13 +3,9 @@ package pro.taskana.common.api.exceptions;
|
|||
/**
|
||||
* This exception is thrown when an attempt is made to update an object that has already been
|
||||
* updated by another user.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
public class ConcurrencyException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ConcurrencyException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@ package pro.taskana.common.api.exceptions;
|
|||
*/
|
||||
public class ConnectionNotSetException extends TaskanaRuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ConnectionNotSetException() {
|
||||
super("Connection not set");
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ package pro.taskana.common.api.exceptions;
|
|||
*/
|
||||
public class DomainNotFoundException extends NotFoundException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public DomainNotFoundException(String domain, String msg) {
|
||||
super(domain, msg);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
package pro.taskana.common.api.exceptions;
|
||||
|
||||
/**
|
||||
* This exception is thrown when a method is called with invalid argument.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** This exception is thrown when a method is called with invalid argument. */
|
||||
public class InvalidArgumentException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidArgumentException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package pro.taskana.common.api.exceptions;
|
|||
/** This exception is used to communicate a not authorized user. */
|
||||
public class NotAuthorizedException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 21235L;
|
||||
private final String currentUserId;
|
||||
|
||||
public NotAuthorizedException(String msg, String currentUserId) {
|
||||
|
|
|
@ -3,8 +3,7 @@ package pro.taskana.common.api.exceptions;
|
|||
/** This exception will be thrown if a specific object is not in the database. */
|
||||
public class NotFoundException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
String id;
|
||||
private final String id;
|
||||
|
||||
public NotFoundException(String id, String message) {
|
||||
super(message);
|
||||
|
|
|
@ -3,8 +3,6 @@ package pro.taskana.common.api.exceptions;
|
|||
/** This exception is thrown when a generic taskana problem is encountered. */
|
||||
public class SystemException extends TaskanaRuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public SystemException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
package pro.taskana.common.api.exceptions;
|
||||
|
||||
/**
|
||||
* common base class for Taskana's checked exceptions.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** common base class for Taskana's checked exceptions. */
|
||||
public class TaskanaException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 123234345123412L;
|
||||
|
||||
public TaskanaException() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
package pro.taskana.common.api.exceptions;
|
||||
|
||||
/**
|
||||
* Common base class for Taskana's runtime exceptions.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** Common base class for Taskana's runtime exceptions. */
|
||||
public class TaskanaRuntimeException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 1511142769801824L;
|
||||
|
||||
public TaskanaRuntimeException() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ package pro.taskana.common.api.exceptions;
|
|||
*/
|
||||
public class UnsupportedDatabaseException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public UnsupportedDatabaseException(String name) {
|
||||
super("Database with '" + name + "' not found");
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ package pro.taskana.common.api.exceptions;
|
|||
|
||||
public class WrongCustomHolidayFormatException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = -7644923780787018797L;
|
||||
|
||||
public WrongCustomHolidayFormatException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
|
|
@ -1,50 +1,45 @@
|
|||
package pro.taskana.common.api.security;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.security.acl.Group;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/** Represents a group with a name and a set of members. */
|
||||
public class GroupPrincipal implements Group {
|
||||
public class GroupPrincipal implements Principal {
|
||||
|
||||
private final String name;
|
||||
private final Set<Principal> members;
|
||||
|
||||
public GroupPrincipal(String name) {
|
||||
this.name = name;
|
||||
this.members = new HashSet<>();
|
||||
members = new HashSet<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.name;
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addMember(Principal user) {
|
||||
return this.members.add(user);
|
||||
return members.add(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeMember(Principal user) {
|
||||
return this.members.remove(user);
|
||||
return members.remove(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMember(Principal member) {
|
||||
return this.members.contains(member);
|
||||
return members.contains(member);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Enumeration<? extends Principal> members() {
|
||||
return Collections.enumeration(this.members);
|
||||
public Enumeration<Principal> members() {
|
||||
return Collections.enumeration(members);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GroupPrincipal [name=" + name + ", members=" + this.members + "]";
|
||||
return "GroupPrincipal [name=" + name + ", members=" + members + "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,7 @@ import java.util.TimeZone;
|
|||
import org.apache.ibatis.type.BaseTypeHandler;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
/**
|
||||
* Instruct jdbc driver to interpret timestamps as being in utc timezone.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** Instruct jdbc driver to interpret timestamps as being in utc timezone. */
|
||||
public class InstantTypeHandler extends BaseTypeHandler<Instant> {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,11 +12,7 @@ import org.json.JSONObject;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* This Typehandler will transfer a Map into an xml blob and back.
|
||||
*
|
||||
* @author EH
|
||||
*/
|
||||
/** This Typehandler will transfer a Map into an xml blob and back. */
|
||||
public class MapTypeHandler extends BaseTypeHandler<Map<String, Object>> {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MapTypeHandler.class);
|
||||
|
|
|
@ -5,7 +5,6 @@ import static pro.taskana.common.internal.util.CheckedFunction.wrap;
|
|||
import java.lang.reflect.Method;
|
||||
import java.security.AccessController;
|
||||
import java.security.Principal;
|
||||
import java.security.acl.Group;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -17,6 +16,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.security.CurrentUserContext;
|
||||
import pro.taskana.common.api.security.GroupPrincipal;
|
||||
|
||||
public class CurrentUserContextImpl implements CurrentUserContext {
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class CurrentUserContextImpl implements CurrentUserContext {
|
|||
Subject subject = Subject.getSubject(AccessController.getContext());
|
||||
LOGGER.trace("Subject of caller: {}", subject);
|
||||
if (subject != null) {
|
||||
Set<Group> groups = subject.getPrincipals(Group.class);
|
||||
Set<GroupPrincipal> groups = subject.getPrincipals(GroupPrincipal.class);
|
||||
LOGGER.trace("Public groups of caller: {}", groups);
|
||||
return groups.stream()
|
||||
.map(Principal::getName)
|
||||
|
@ -115,7 +115,7 @@ public class CurrentUserContextImpl implements CurrentUserContext {
|
|||
Set<Principal> principals = subject.getPrincipals();
|
||||
LOGGER.trace("Public principals of caller: {}", principals);
|
||||
return principals.stream()
|
||||
.filter(principal -> !(principal instanceof Group))
|
||||
.filter(principal -> !(principal instanceof GroupPrincipal))
|
||||
.map(Principal::getName)
|
||||
.filter(Objects::nonNull)
|
||||
.map(this::convertAccessId)
|
||||
|
|
|
@ -4,7 +4,6 @@ package pro.taskana.common.internal.transaction;
|
|||
* represents a callable Object.
|
||||
*
|
||||
* @param <T> the type of the returned objects.
|
||||
* @author bbr
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface TaskanaCallable<T> {
|
||||
|
|
|
@ -1,98 +0,0 @@
|
|||
-- LIST OF RECOMMENDED INDEXES
|
||||
-- This list is provided on a as-is basis. It is used for tuning of the internal performance tests.
|
||||
-- The script needs to be reviewed and adapted for each indiviual TASKANA setup.
|
||||
-- ===========================
|
||||
-- index[1], 0,013MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212017540"
|
||||
ON "TASKANA "."CLASSIFICATION" ("ID" ASC) INCLUDE
|
||||
("CUSTOM_8", "CUSTOM_7", "CUSTOM_6", "CUSTOM_5", "CUSTOM_4",
|
||||
"CUSTOM_3", "CUSTOM_2", "CUSTOM_1", "APPLICATION_ENTRY_POINT",
|
||||
"SERVICE_LEVEL", "PRIORITY", "DESCRIPTION", "NAME",
|
||||
"CREATED", "VALID_IN_DOMAIN", "DOMAIN", "TYPE", "CATEGORY",
|
||||
"PARENT_KEY", "PARENT_ID", "KEY") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[2], 3,646MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212018000" ON "TASKANA "."TASK"
|
||||
("WORKBASKET_KEY" ASC, "DOMAIN" DESC) ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[3], 0,056MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212018030" ON "TASKANA "."CLASSIFICATION"
|
||||
("CATEGORY" ASC, "DOMAIN" ASC, "TYPE" ASC, "CUSTOM_1"
|
||||
ASC, "CUSTOM_8" ASC, "CUSTOM_7" ASC, "CUSTOM_6" ASC,
|
||||
"CUSTOM_5" ASC, "CUSTOM_4" ASC, "CUSTOM_3" ASC, "CUSTOM_2"
|
||||
ASC, "APPLICATION_ENTRY_POINT" ASC, "SERVICE_LEVEL"
|
||||
ASC, "PRIORITY" ASC, "DESCRIPTION" ASC, "NAME" ASC,
|
||||
"CREATED" ASC, "VALID_IN_DOMAIN" ASC, "PARENT_KEY" ASC, "PARENT_ID"
|
||||
ASC, "KEY" ASC, "ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[4], 0,126MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212020000" ON "TASKANA "."WORKBASKET_ACCESS_LIST"
|
||||
("ACCESS_ID" ASC, "WORKBASKET_ID" ASC, "PERM_READ"
|
||||
ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[5], 3,356MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212021410" ON "TASKANA "."TASK"
|
||||
("POR_VALUE" ASC, "WORKBASKET_ID" ASC) ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[6], 15,224MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212021430" ON "TASKANA "."ATTACHMENT"
|
||||
("TASK_ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[7], 2,353MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212024540" ON "TASKANA "."ATTACHMENT"
|
||||
("TASK_ID" ASC, "RECEIVED" ASC, "CLASSIFICATION_ID"
|
||||
ASC, "CLASSIFICATION_KEY" ASC, "MODIFIED" ASC, "CREATED"
|
||||
ASC, "ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[8], 0,056MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212025210"
|
||||
ON "TASKANA "."CLASSIFICATION" ("KEY" ASC, "DOMAIN"
|
||||
ASC) INCLUDE ("CUSTOM_8", "CUSTOM_7", "CUSTOM_6",
|
||||
"CUSTOM_5", "CUSTOM_4", "CUSTOM_3", "CUSTOM_2", "CUSTOM_1",
|
||||
"APPLICATION_ENTRY_POINT", "SERVICE_LEVEL", "PRIORITY",
|
||||
"DESCRIPTION", "NAME", "CREATED", "VALID_IN_DOMAIN",
|
||||
"TYPE", "CATEGORY", "PARENT_KEY", "PARENT_ID", "ID") ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[9], 1,056MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212028580"
|
||||
ON "TASKANA "."WORKBASKET" ("ID" ASC) INCLUDE ("ORG_LEVEL_4",
|
||||
"ORG_LEVEL_3", "ORG_LEVEL_2", "ORG_LEVEL_1", "OWNER",
|
||||
"DESCRIPTION", "TYPE", "DOMAIN", "NAME", "KEY") ALLOW
|
||||
REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[10], 1,274MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212034070"
|
||||
ON "TASKANA "."WORKBASKET" ("KEY" ASC, "DOMAIN" ASC)
|
||||
INCLUDE ("ORG_LEVEL_4", "ORG_LEVEL_3", "ORG_LEVEL_2",
|
||||
"ORG_LEVEL_1", "CUSTOM_4", "CUSTOM_3", "CUSTOM_2",
|
||||
"CUSTOM_1", "OWNER", "DESCRIPTION", "TYPE", "NAME",
|
||||
"MODIFIED", "CREATED", "ID") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[11], 0,056MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212039070"
|
||||
ON "TASKANA "."CLASSIFICATION" ("ID" ASC) INCLUDE
|
||||
("CUSTOM_8", "CUSTOM_7", "CUSTOM_6", "CUSTOM_5", "CUSTOM_4",
|
||||
"CUSTOM_3", "CUSTOM_2", "CUSTOM_1", "APPLICATION_ENTRY_POINT",
|
||||
"SERVICE_LEVEL", "PRIORITY", "DESCRIPTION", "NAME",
|
||||
"MODIFIED", "CREATED", "VALID_IN_DOMAIN", "DOMAIN",
|
||||
"TYPE", "CATEGORY", "PARENT_KEY", "PARENT_ID", "KEY") ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[12], 0,325MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212040470"
|
||||
ON "TASKANA "."WORKBASKET" ("KEY" ASC, "DOMAIN" ASC)
|
||||
INCLUDE ("ID") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[13], 0,126MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212042430" ON "TASKANA "."WORKBASKET_ACCESS_LIST"
|
||||
("WORKBASKET_ID" ASC, "PERM_CUSTOM_12" ASC, "PERM_CUSTOM_11"
|
||||
ASC, "PERM_CUSTOM_10" ASC, "PERM_CUSTOM_9" ASC, "PERM_CUSTOM_8"
|
||||
ASC, "PERM_CUSTOM_7" ASC, "PERM_CUSTOM_6" ASC, "PERM_CUSTOM_5"
|
||||
ASC, "PERM_CUSTOM_4" ASC, "PERM_CUSTOM_3" ASC, "PERM_CUSTOM_2"
|
||||
ASC, "PERM_CUSTOM_1" ASC, "PERM_DISTRIBUTE" ASC, "PERM_TRANSFER"
|
||||
ASC, "PERM_APPEND" ASC, "PERM_OPEN" ASC, "PERM_READ"
|
||||
ASC, "ACCESS_ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
|
@ -293,3 +293,102 @@ CREATE SEQUENCE SCHEDULED_JOB_SEQ
|
|||
INCREMENT BY 1
|
||||
CACHE 10;
|
||||
|
||||
|
||||
-- LIST OF RECOMMENDED INDEXES
|
||||
-- This list is provided on a as-is basis. It is used for tuning of the internal performance tests.
|
||||
-- The script needs to be reviewed and adapted for each indiviual TASKANA setup.
|
||||
-- ===========================
|
||||
-- index[1], 0,013MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212017540"
|
||||
ON "TASKANA "."CLASSIFICATION" ("ID" ASC) INCLUDE
|
||||
("CUSTOM_8", "CUSTOM_7", "CUSTOM_6", "CUSTOM_5", "CUSTOM_4",
|
||||
"CUSTOM_3", "CUSTOM_2", "CUSTOM_1", "APPLICATION_ENTRY_POINT",
|
||||
"SERVICE_LEVEL", "PRIORITY", "DESCRIPTION", "NAME",
|
||||
"CREATED", "VALID_IN_DOMAIN", "DOMAIN", "TYPE", "CATEGORY",
|
||||
"PARENT_KEY", "PARENT_ID", "KEY") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[2], 3,646MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212018000" ON "TASKANA "."TASK"
|
||||
("WORKBASKET_KEY" ASC, "DOMAIN" DESC) ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[3], 0,056MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212018030" ON "TASKANA "."CLASSIFICATION"
|
||||
("CATEGORY" ASC, "DOMAIN" ASC, "TYPE" ASC, "CUSTOM_1"
|
||||
ASC, "CUSTOM_8" ASC, "CUSTOM_7" ASC, "CUSTOM_6" ASC,
|
||||
"CUSTOM_5" ASC, "CUSTOM_4" ASC, "CUSTOM_3" ASC, "CUSTOM_2"
|
||||
ASC, "APPLICATION_ENTRY_POINT" ASC, "SERVICE_LEVEL"
|
||||
ASC, "PRIORITY" ASC, "DESCRIPTION" ASC, "NAME" ASC,
|
||||
"CREATED" ASC, "VALID_IN_DOMAIN" ASC, "PARENT_KEY" ASC, "PARENT_ID"
|
||||
ASC, "KEY" ASC, "ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[4], 0,126MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212020000" ON "TASKANA "."WORKBASKET_ACCESS_LIST"
|
||||
("ACCESS_ID" ASC, "WORKBASKET_ID" ASC, "PERM_READ"
|
||||
ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[5], 3,356MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212021410" ON "TASKANA "."TASK"
|
||||
("POR_VALUE" ASC, "WORKBASKET_ID" ASC) ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[6], 15,224MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212021430" ON "TASKANA "."ATTACHMENT"
|
||||
("TASK_ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[7], 2,353MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212024540" ON "TASKANA "."ATTACHMENT"
|
||||
("TASK_ID" ASC, "RECEIVED" ASC, "CLASSIFICATION_ID"
|
||||
ASC, "CLASSIFICATION_KEY" ASC, "MODIFIED" ASC, "CREATED"
|
||||
ASC, "ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[8], 0,056MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212025210"
|
||||
ON "TASKANA "."CLASSIFICATION" ("KEY" ASC, "DOMAIN"
|
||||
ASC) INCLUDE ("CUSTOM_8", "CUSTOM_7", "CUSTOM_6",
|
||||
"CUSTOM_5", "CUSTOM_4", "CUSTOM_3", "CUSTOM_2", "CUSTOM_1",
|
||||
"APPLICATION_ENTRY_POINT", "SERVICE_LEVEL", "PRIORITY",
|
||||
"DESCRIPTION", "NAME", "CREATED", "VALID_IN_DOMAIN",
|
||||
"TYPE", "CATEGORY", "PARENT_KEY", "PARENT_ID", "ID") ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[9], 1,056MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212028580"
|
||||
ON "TASKANA "."WORKBASKET" ("ID" ASC) INCLUDE ("ORG_LEVEL_4",
|
||||
"ORG_LEVEL_3", "ORG_LEVEL_2", "ORG_LEVEL_1", "OWNER",
|
||||
"DESCRIPTION", "TYPE", "DOMAIN", "NAME", "KEY") ALLOW
|
||||
REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[10], 1,274MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212034070"
|
||||
ON "TASKANA "."WORKBASKET" ("KEY" ASC, "DOMAIN" ASC)
|
||||
INCLUDE ("ORG_LEVEL_4", "ORG_LEVEL_3", "ORG_LEVEL_2",
|
||||
"ORG_LEVEL_1", "CUSTOM_4", "CUSTOM_3", "CUSTOM_2",
|
||||
"CUSTOM_1", "OWNER", "DESCRIPTION", "TYPE", "NAME",
|
||||
"MODIFIED", "CREATED", "ID") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[11], 0,056MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212039070"
|
||||
ON "TASKANA "."CLASSIFICATION" ("ID" ASC) INCLUDE
|
||||
("CUSTOM_8", "CUSTOM_7", "CUSTOM_6", "CUSTOM_5", "CUSTOM_4",
|
||||
"CUSTOM_3", "CUSTOM_2", "CUSTOM_1", "APPLICATION_ENTRY_POINT",
|
||||
"SERVICE_LEVEL", "PRIORITY", "DESCRIPTION", "NAME",
|
||||
"MODIFIED", "CREATED", "VALID_IN_DOMAIN", "DOMAIN",
|
||||
"TYPE", "CATEGORY", "PARENT_KEY", "PARENT_ID", "KEY") ALLOW REVERSE
|
||||
SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[12], 0,325MB
|
||||
CREATE UNIQUE INDEX "DB2ADMIN"."IDX1805212040470"
|
||||
ON "TASKANA "."WORKBASKET" ("KEY" ASC, "DOMAIN" ASC)
|
||||
INCLUDE ("ID") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
-- index[13], 0,126MB
|
||||
CREATE INDEX "DB2ADMIN"."IDX1805212042430" ON "TASKANA "."WORKBASKET_ACCESS_LIST"
|
||||
("WORKBASKET_ID" ASC, "PERM_CUSTOM_12" ASC, "PERM_CUSTOM_11"
|
||||
ASC, "PERM_CUSTOM_10" ASC, "PERM_CUSTOM_9" ASC, "PERM_CUSTOM_8"
|
||||
ASC, "PERM_CUSTOM_7" ASC, "PERM_CUSTOM_6" ASC, "PERM_CUSTOM_5"
|
||||
ASC, "PERM_CUSTOM_4" ASC, "PERM_CUSTOM_3" ASC, "PERM_CUSTOM_2"
|
||||
ASC, "PERM_CUSTOM_1" ASC, "PERM_DISTRIBUTE" ASC, "PERM_TRANSFER"
|
||||
ASC, "PERM_APPEND" ASC, "PERM_OPEN" ASC, "PERM_READ"
|
||||
ASC, "ACCESS_ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
|
||||
COMMIT WORK ;
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
SET search_path TO taskana;
|
||||
|
||||
CREATE INDEX IDX_CLASSIFICATION_1 ON CLASSIFICATION
|
||||
(ID ASC, CUSTOM_8, CUSTOM_7, CUSTOM_6, CUSTOM_5, CUSTOM_4,
|
||||
CUSTOM_3, CUSTOM_2, CUSTOM_1, APPLICATION_ENTRY_POINT,
|
||||
SERVICE_LEVEL, PRIORITY, DESCRIPTION, NAME, MODIFIED,
|
||||
CREATED, VALID_IN_DOMAIN, DOMAIN, TYPE, CATEGORY, PARENT_KEY,
|
||||
PARENT_ID, KEY);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_CLASSIFICATION_2 ON CLASSIFICATION
|
||||
(CATEGORY ASC, DOMAIN ASC, TYPE ASC, CUSTOM_1
|
||||
ASC, CUSTOM_8 ASC, CUSTOM_7 ASC, CUSTOM_6 ASC,
|
||||
CUSTOM_5 ASC, CUSTOM_4 ASC, CUSTOM_3 ASC, CUSTOM_2
|
||||
ASC, APPLICATION_ENTRY_POINT ASC, SERVICE_LEVEL
|
||||
ASC, PRIORITY ASC, DESCRIPTION ASC, NAME ASC,
|
||||
CREATED ASC, VALID_IN_DOMAIN ASC, PARENT_KEY ASC, PARENT_ID
|
||||
ASC, KEY ASC, ID ASC);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_CLASSIFICATION_3 ON CLASSIFICATION
|
||||
(KEY ASC, DOMAIN ASC, CUSTOM_8, CUSTOM_7, CUSTOM_6,
|
||||
CUSTOM_5, CUSTOM_4, CUSTOM_3, CUSTOM_2, CUSTOM_1,
|
||||
APPLICATION_ENTRY_POINT, SERVICE_LEVEL, PRIORITY,
|
||||
DESCRIPTION, NAME, CREATED, VALID_IN_DOMAIN,
|
||||
TYPE, CATEGORY, PARENT_KEY, PARENT_ID, ID) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_TASK_1 ON TASK
|
||||
(WORKBASKET_KEY ASC, DOMAIN DESC);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_TASK_2 ON TASK
|
||||
(UPPER(POR_VALUE) ASC, WORKBASKET_ID ASC);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_ATTACHMENT_1 ON ATTACHMENT
|
||||
(TASK_ID ASC) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_ATTACHMENT_2 ON ATTACHMENT
|
||||
(TASK_ID ASC, RECEIVED ASC, CLASSIFICATION_ID
|
||||
ASC, CLASSIFICATION_KEY ASC, MODIFIED ASC, CREATED
|
||||
ASC, ID ASC) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WORKBASKET_1 ON WORKBASKET
|
||||
(ID ASC, ORG_LEVEL_4, ORG_LEVEL_3, ORG_LEVEL_2,
|
||||
ORG_LEVEL_1, OWNER, DESCRIPTION, TYPE, DOMAIN, NAME, KEY);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WORKBASKET_2 ON WORKBASKET
|
||||
(KEY ASC, DOMAIN ASC, ORG_LEVEL_4,
|
||||
ORG_LEVEL_3, ORG_LEVEL_2, ORG_LEVEL_1, CUSTOM_4,
|
||||
CUSTOM_3, CUSTOM_2, CUSTOM_1, OWNER, DESCRIPTION,
|
||||
TYPE, NAME, MODIFIED, CREATED, ID) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WORKBASKET_3 ON WORKBASKET
|
||||
(KEY ASC, DOMAIN ASC, ID) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WBAL_1 ON WORKBASKET_ACCESS_LIST
|
||||
(ACCESS_ID ASC, WORKBASKET_ID ASC, PERM_READ ASC) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WBAL_2 ON WORKBASKET_ACCESS_LIST
|
||||
(WORKBASKET_ID ASC, PERM_CUSTOM_12 ASC, PERM_CUSTOM_11
|
||||
ASC, PERM_CUSTOM_10 ASC, PERM_CUSTOM_9 ASC, PERM_CUSTOM_8
|
||||
ASC, PERM_CUSTOM_7 ASC, PERM_CUSTOM_6 ASC, PERM_CUSTOM_5
|
||||
ASC, PERM_CUSTOM_4 ASC, PERM_CUSTOM_3 ASC, PERM_CUSTOM_2
|
||||
ASC, PERM_CUSTOM_1 ASC, PERM_DISTRIBUTE ASC, PERM_TRANSFER
|
||||
ASC, PERM_APPEND ASC, PERM_OPEN ASC, PERM_READ
|
||||
ASC, ACCESS_ID ASC) ;
|
||||
COMMIT WORK ;
|
|
@ -295,3 +295,79 @@ CREATE SEQUENCE SCHEDULED_JOB_SEQ
|
|||
INCREMENT BY 1
|
||||
CACHE 10;
|
||||
|
||||
SET search_path TO taskana;
|
||||
|
||||
CREATE INDEX IDX_CLASSIFICATION_1 ON CLASSIFICATION
|
||||
(ID ASC, CUSTOM_8, CUSTOM_7, CUSTOM_6, CUSTOM_5, CUSTOM_4,
|
||||
CUSTOM_3, CUSTOM_2, CUSTOM_1, APPLICATION_ENTRY_POINT,
|
||||
SERVICE_LEVEL, PRIORITY, DESCRIPTION, NAME, MODIFIED,
|
||||
CREATED, VALID_IN_DOMAIN, DOMAIN, TYPE, CATEGORY, PARENT_KEY,
|
||||
PARENT_ID, KEY);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_CLASSIFICATION_2 ON CLASSIFICATION
|
||||
(CATEGORY ASC, DOMAIN ASC, TYPE ASC, CUSTOM_1
|
||||
ASC, CUSTOM_8 ASC, CUSTOM_7 ASC, CUSTOM_6 ASC,
|
||||
CUSTOM_5 ASC, CUSTOM_4 ASC, CUSTOM_3 ASC, CUSTOM_2
|
||||
ASC, APPLICATION_ENTRY_POINT ASC, SERVICE_LEVEL
|
||||
ASC, PRIORITY ASC, DESCRIPTION ASC, NAME ASC,
|
||||
CREATED ASC, VALID_IN_DOMAIN ASC, PARENT_KEY ASC, PARENT_ID
|
||||
ASC, KEY ASC, ID ASC);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_CLASSIFICATION_3 ON CLASSIFICATION
|
||||
(KEY ASC, DOMAIN ASC, CUSTOM_8, CUSTOM_7, CUSTOM_6,
|
||||
CUSTOM_5, CUSTOM_4, CUSTOM_3, CUSTOM_2, CUSTOM_1,
|
||||
APPLICATION_ENTRY_POINT, SERVICE_LEVEL, PRIORITY,
|
||||
DESCRIPTION, NAME, CREATED, VALID_IN_DOMAIN,
|
||||
TYPE, CATEGORY, PARENT_KEY, PARENT_ID, ID) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_TASK_1 ON TASK
|
||||
(WORKBASKET_KEY ASC, DOMAIN DESC);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_TASK_2 ON TASK
|
||||
(UPPER(POR_VALUE) ASC, WORKBASKET_ID ASC);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_ATTACHMENT_1 ON ATTACHMENT
|
||||
(TASK_ID ASC) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_ATTACHMENT_2 ON ATTACHMENT
|
||||
(TASK_ID ASC, RECEIVED ASC, CLASSIFICATION_ID
|
||||
ASC, CLASSIFICATION_KEY ASC, MODIFIED ASC, CREATED
|
||||
ASC, ID ASC) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WORKBASKET_1 ON WORKBASKET
|
||||
(ID ASC, ORG_LEVEL_4, ORG_LEVEL_3, ORG_LEVEL_2,
|
||||
ORG_LEVEL_1, OWNER, DESCRIPTION, TYPE, DOMAIN, NAME, KEY);
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WORKBASKET_2 ON WORKBASKET
|
||||
(KEY ASC, DOMAIN ASC, ORG_LEVEL_4,
|
||||
ORG_LEVEL_3, ORG_LEVEL_2, ORG_LEVEL_1, CUSTOM_4,
|
||||
CUSTOM_3, CUSTOM_2, CUSTOM_1, OWNER, DESCRIPTION,
|
||||
TYPE, NAME, MODIFIED, CREATED, ID) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WORKBASKET_3 ON WORKBASKET
|
||||
(KEY ASC, DOMAIN ASC, ID) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WBAL_1 ON WORKBASKET_ACCESS_LIST
|
||||
(ACCESS_ID ASC, WORKBASKET_ID ASC, PERM_READ ASC) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
CREATE INDEX IDX_WBAL_2 ON WORKBASKET_ACCESS_LIST
|
||||
(WORKBASKET_ID ASC, PERM_CUSTOM_12 ASC, PERM_CUSTOM_11
|
||||
ASC, PERM_CUSTOM_10 ASC, PERM_CUSTOM_9 ASC, PERM_CUSTOM_8
|
||||
ASC, PERM_CUSTOM_7 ASC, PERM_CUSTOM_6 ASC, PERM_CUSTOM_5
|
||||
ASC, PERM_CUSTOM_4 ASC, PERM_CUSTOM_3 ASC, PERM_CUSTOM_2
|
||||
ASC, PERM_CUSTOM_1 ASC, PERM_DISTRIBUTE ASC, PERM_TRANSFER
|
||||
ASC, PERM_APPEND ASC, PERM_OPEN ASC, PERM_READ
|
||||
ASC, ACCESS_ID ASC) ;
|
||||
COMMIT WORK ;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.time.Duration;
|
|||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.api.DynamicContainer;
|
||||
import org.junit.jupiter.api.DynamicNode;
|
||||
|
@ -25,7 +25,7 @@ class WorkingDaysToDaysConverterTest {
|
|||
CustomHoliday dayOfReformation = CustomHoliday.of(31, 10);
|
||||
CustomHoliday allSaintsDays = CustomHoliday.of(1, 11);
|
||||
converter =
|
||||
new WorkingDaysToDaysConverter(true, false, Arrays.asList(dayOfReformation, allSaintsDays));
|
||||
new WorkingDaysToDaysConverter(true, false, List.of(dayOfReformation, allSaintsDays));
|
||||
}
|
||||
|
||||
@TestFactory
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<artifactId>taskana-history-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<artifactId>taskana-history-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana history events plugin parent and bom module.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana history events plugin parent and bom module.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>taskana-simplehistory-provider</module>
|
||||
<module>taskana-simplehistory-rest-spring</module>
|
||||
<modules>
|
||||
<module>taskana-simplehistory-provider</module>
|
||||
<module>taskana-simplehistory-rest-spring</module>
|
||||
<module>taskana-loghistory-provider</module>
|
||||
</modules>
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class LogfileHistoryServiceImplTest {
|
|||
|
||||
logfileHistoryServiceImpl.create(eventToBeLogged);
|
||||
|
||||
String logMessage = logger.getLoggingEvents().asList().get(0).getMessage();
|
||||
String logMessage = logger.getLoggingEvents().get(0).getMessage();
|
||||
|
||||
TaskHistoryEvent deserializedEventFromLogMessage =
|
||||
objectMapper.readValue(logMessage, TaskHistoryEvent.class);
|
||||
|
@ -80,7 +80,7 @@ class LogfileHistoryServiceImplTest {
|
|||
|
||||
logfileHistoryServiceImpl.create(eventToBeLogged);
|
||||
|
||||
String logMessage = logger.getLoggingEvents().asList().get(0).getMessage();
|
||||
String logMessage = logger.getLoggingEvents().get(0).getMessage();
|
||||
|
||||
WorkbasketHistoryEvent deserializedEventFromLogMessage =
|
||||
objectMapper.readValue(logMessage, WorkbasketHistoryEvent.class);
|
||||
|
@ -103,7 +103,7 @@ class LogfileHistoryServiceImplTest {
|
|||
|
||||
logfileHistoryServiceImpl.create(eventToBeLogged);
|
||||
|
||||
String logMessage = logger.getLoggingEvents().asList().get(0).getMessage();
|
||||
String logMessage = logger.getLoggingEvents().get(0).getMessage();
|
||||
|
||||
ClassificationHistoryEvent deserializedEventFromLogMessage =
|
||||
objectMapper.readValue(logMessage, ClassificationHistoryEvent.class);
|
||||
|
|
|
@ -1,83 +1,83 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-simplehistory-provider</artifactId>
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-simplehistory-provider</artifactId>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana history events plugin to include in your project.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana history events plugin to include in your project.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<artifactId>taskana-history-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<artifactId>taskana-history-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${version.mybatis}</version>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${version.mybatis}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-data</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-data</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -51,8 +51,7 @@ public class TaskanaHistoryEngineImpl implements TaskanaHistoryEngine {
|
|||
sessionManager = createSqlSessionManager();
|
||||
}
|
||||
|
||||
public static TaskanaHistoryEngineImpl createTaskanaEngine(
|
||||
TaskanaEngine taskanaEngine) {
|
||||
public static TaskanaHistoryEngineImpl createTaskanaEngine(TaskanaEngine taskanaEngine) {
|
||||
return new TaskanaHistoryEngineImpl(taskanaEngine);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,31 +68,32 @@ public interface ClassificationHistoryQueryMapper {
|
|||
+ "</script>")
|
||||
@Results(
|
||||
value = {
|
||||
@Result(property = "id", column = "ID"),
|
||||
@Result(property = "eventType", column = "EVENT_TYPE"),
|
||||
@Result(property = "created", column = "CREATED"),
|
||||
@Result(property = "userId", column = "USER_ID"),
|
||||
@Result(property = "classificationId", column = "CLASSIFICATION_ID"),
|
||||
@Result(property = "applicationEntryPoint", column = "APPLICATION_ENTRY_POINT"),
|
||||
@Result(property = "category", column = "CATEGORY"),
|
||||
@Result(property = "domain", column = "DOMAIN"),
|
||||
@Result(property = "key", column = "KEY"),
|
||||
@Result(property = "name", column = "NAME"),
|
||||
@Result(property = "parentId", column = "PARENT_ID"),
|
||||
@Result(property = "parentKey", column = "PARENT_KEY"),
|
||||
@Result(property = "priority", column = "PRIORITY"),
|
||||
@Result(property = "serviceLevel", column = "SERVICE_LEVEL"),
|
||||
@Result(property = "type", column = "TYPE"),
|
||||
@Result(property = "custom1", column = "CUSTOM_1"),
|
||||
@Result(property = "custom2", column = "CUSTOM_2"),
|
||||
@Result(property = "custom3", column = "CUSTOM_3"),
|
||||
@Result(property = "custom4", column = "CUSTOM_4"),
|
||||
@Result(property = "custom5", column = "CUSTOM_5"),
|
||||
@Result(property = "custom6", column = "CUSTOM_6"),
|
||||
@Result(property = "custom7", column = "CUSTOM_7"),
|
||||
@Result(property = "custom8", column = "CUSTOM_8")
|
||||
@Result(property = "id", column = "ID"),
|
||||
@Result(property = "eventType", column = "EVENT_TYPE"),
|
||||
@Result(property = "created", column = "CREATED"),
|
||||
@Result(property = "userId", column = "USER_ID"),
|
||||
@Result(property = "classificationId", column = "CLASSIFICATION_ID"),
|
||||
@Result(property = "applicationEntryPoint", column = "APPLICATION_ENTRY_POINT"),
|
||||
@Result(property = "category", column = "CATEGORY"),
|
||||
@Result(property = "domain", column = "DOMAIN"),
|
||||
@Result(property = "key", column = "KEY"),
|
||||
@Result(property = "name", column = "NAME"),
|
||||
@Result(property = "parentId", column = "PARENT_ID"),
|
||||
@Result(property = "parentKey", column = "PARENT_KEY"),
|
||||
@Result(property = "priority", column = "PRIORITY"),
|
||||
@Result(property = "serviceLevel", column = "SERVICE_LEVEL"),
|
||||
@Result(property = "type", column = "TYPE"),
|
||||
@Result(property = "custom1", column = "CUSTOM_1"),
|
||||
@Result(property = "custom2", column = "CUSTOM_2"),
|
||||
@Result(property = "custom3", column = "CUSTOM_3"),
|
||||
@Result(property = "custom4", column = "CUSTOM_4"),
|
||||
@Result(property = "custom5", column = "CUSTOM_5"),
|
||||
@Result(property = "custom6", column = "CUSTOM_6"),
|
||||
@Result(property = "custom7", column = "CUSTOM_7"),
|
||||
@Result(property = "custom8", column = "CUSTOM_8")
|
||||
})
|
||||
List<ClassificationHistoryEvent> queryHistoryEvents(ClassificationHistoryQueryImpl historyEventQuery);
|
||||
List<ClassificationHistoryEvent> queryHistoryEvents(
|
||||
ClassificationHistoryQueryImpl historyEventQuery);
|
||||
|
||||
@Select(
|
||||
"<script>"
|
||||
|
@ -200,5 +201,4 @@ public interface ClassificationHistoryQueryMapper {
|
|||
+ "<if test='!orderBy.isEmpty()'>ORDER BY <foreach item='item' collection='orderBy' separator=',' >${item}</foreach></if> "
|
||||
+ "</script>")
|
||||
List<String> queryHistoryColumnValues(ClassificationHistoryQueryImpl historyQuery);
|
||||
|
||||
}
|
||||
|
|
|
@ -177,7 +177,9 @@ public class HistoryCleanupJob extends AbstractTaskanaJob {
|
|||
.getValue()
|
||||
.get(TaskHistoryEventType.CREATED.getName())
|
||||
.size()
|
||||
== idsOfTasksInSameParentBusinessProcessGroupedByType.getValue().entrySet()
|
||||
== idsOfTasksInSameParentBusinessProcessGroupedByType
|
||||
.getValue()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.filter(
|
||||
entry -> !entry.getKey().equals(TaskHistoryEventType.CREATED.getName()))
|
||||
|
|
|
@ -2,11 +2,7 @@ package pro.taskana.simplehistory.impl.task;
|
|||
|
||||
import pro.taskana.common.api.QueryColumnName;
|
||||
|
||||
/**
|
||||
* Enum containing the column names for {@link TaskHistoryQueryMapper#queryHistoryColumnValues}.
|
||||
*
|
||||
* @author bv
|
||||
*/
|
||||
/** Enum containing the column names for {@link TaskHistoryQueryMapper#queryHistoryColumnValues}. */
|
||||
public enum TaskHistoryQueryColumnName implements QueryColumnName {
|
||||
ID("id"),
|
||||
BUSINESS_PROCESS_ID("business_process_id"),
|
||||
|
|
|
@ -33,6 +33,7 @@ class CreateHistoryEventOnClassificationsCreationAccTest extends AbstractAccTest
|
|||
Classification newClassification =
|
||||
classificationService.newClassification("somekey", "DOMAIN_A", "TASK");
|
||||
newClassification.setDescription("some description");
|
||||
newClassification.setServiceLevel("P1D");
|
||||
newClassification = classificationService.createClassification(newClassification);
|
||||
|
||||
List<ClassificationHistoryEvent> events =
|
||||
|
|
|
@ -51,6 +51,5 @@ class CreateHistoryEventOnTaskCancelClaimAccTest extends AbstractAccTest {
|
|||
String eventType = events.get(0).getEventType();
|
||||
|
||||
assertThat(eventType).isEqualTo(TaskHistoryEventType.CLAIM_CANCELLED.getName());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,8 +48,7 @@ class CreateHistoryEventOnTaskCancellationAccTest extends AbstractAccTest {
|
|||
|
||||
final String taskId = "TKI:000000000000000000000000000000000003";
|
||||
|
||||
List<TaskHistoryEvent> events =
|
||||
historyService.createTaskHistoryQuery().taskIdIn(taskId).list();
|
||||
List<TaskHistoryEvent> events = historyService.createTaskHistoryQuery().taskIdIn(taskId).list();
|
||||
|
||||
assertThat(events).isEmpty();
|
||||
|
||||
|
|
|
@ -26,8 +26,7 @@ class CreateHistoryEventOnTaskTerminationAccTest extends AbstractAccTest {
|
|||
|
||||
final String taskId = "TKI:000000000000000000000000000000000001";
|
||||
|
||||
List<TaskHistoryEvent> events =
|
||||
historyService.createTaskHistoryQuery().taskIdIn(taskId).list();
|
||||
List<TaskHistoryEvent> events = historyService.createTaskHistoryQuery().taskIdIn(taskId).list();
|
||||
|
||||
assertThat(events).isEmpty();
|
||||
|
||||
|
@ -48,8 +47,7 @@ class CreateHistoryEventOnTaskTerminationAccTest extends AbstractAccTest {
|
|||
|
||||
final String taskId = "TKI:000000000000000000000000000000000003";
|
||||
|
||||
List<TaskHistoryEvent> events =
|
||||
historyService.createTaskHistoryQuery().taskIdIn(taskId).list();
|
||||
List<TaskHistoryEvent> events = historyService.createTaskHistoryQuery().taskIdIn(taskId).list();
|
||||
|
||||
assertThat(events).isEmpty();
|
||||
|
||||
|
|
|
@ -95,6 +95,5 @@ class CreateHistoryEventOnTaskTransferAccTest extends AbstractAccTest {
|
|||
assertThat(events)
|
||||
.extracting(TaskHistoryEvent::getNewValue)
|
||||
.containsOnly("WBI:100000000000000000000000000000000007");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,5 @@ class CreateHistoryEventOnTaskUpdateAccTest extends AbstractAccTest {
|
|||
String eventType = events.get(0).getEventType();
|
||||
|
||||
assertThat(eventType).isEqualTo(TaskHistoryEventType.UPDATED.getName());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import acceptance.AbstractAccTest;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.assertj.core.api.ThrowableAssert.ThrowingCallable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -74,7 +73,7 @@ class DeleteHistoryEventsOnTaskDeletionAccTest extends AbstractAccTest {
|
|||
historyService.createTaskHistoryQuery().taskIdIn(taskId_1, taskId_2));
|
||||
assertThat(listEvents).hasSize(3);
|
||||
|
||||
taskService.deleteTasks(Arrays.asList(taskId_1, taskId_2));
|
||||
taskService.deleteTasks(List.of(taskId_1, taskId_2));
|
||||
|
||||
// make sure the tasks got deleted
|
||||
ThrowingCallable getDeletedTaskCall =
|
||||
|
@ -145,7 +144,7 @@ class DeleteHistoryEventsOnTaskDeletionAccTest extends AbstractAccTest {
|
|||
historyService.createTaskHistoryQuery().taskIdIn(taskId_1, taskId_2));
|
||||
assertThat(listEvents).hasSize(2);
|
||||
|
||||
taskService.deleteTasks(Arrays.asList(taskId_1, taskId_2));
|
||||
taskService.deleteTasks(List.of(taskId_1, taskId_2));
|
||||
|
||||
// make sure the tasks got deleted
|
||||
ThrowingCallable getDeletedTaskCall =
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.junit.jupiter.api.Test;
|
|||
import pro.taskana.spi.history.api.events.task.TaskHistoryEvent;
|
||||
import pro.taskana.spi.history.api.events.task.TaskHistoryEventType;
|
||||
|
||||
|
||||
class GetTaskHistoryEventAccTest extends AbstractAccTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -62,8 +62,7 @@ class CreateHistoryEventOnWorkbasketAccessItemsSetAccTest extends AbstractAccTes
|
|||
String eventType = events.get(0).getEventType();
|
||||
String details = workbasketHistoryEventMapper.findById(events.get(0).getId()).getDetails();
|
||||
|
||||
assertThat(eventType)
|
||||
.isEqualTo(WorkbasketHistoryEventType.ACCESS_ITEMS_UPDATED.getName());
|
||||
assertThat(eventType).isEqualTo(WorkbasketHistoryEventType.ACCESS_ITEMS_UPDATED.getName());
|
||||
|
||||
assertThat(details).contains("peter");
|
||||
}
|
||||
|
|
|
@ -46,8 +46,7 @@ class CreateHistoryEventOnWorkbasketDistributionTargetAddedAccTest extends Abstr
|
|||
String eventType = events.get(0).getEventType();
|
||||
String details = workbasketHistoryEventMapper.findById(events.get(0).getId()).getDetails();
|
||||
|
||||
assertThat(eventType)
|
||||
.isEqualTo(WorkbasketHistoryEventType.DISTRIBUTION_TARGET_ADDED.getName());
|
||||
assertThat(eventType).isEqualTo(WorkbasketHistoryEventType.DISTRIBUTION_TARGET_ADDED.getName());
|
||||
|
||||
assertThat(details).contains("\"newValue\":\"WBI:100000000000000000000000000000000001\"");
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package acceptance.events.workbasket;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import acceptance.AbstractAccTest;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
@ -33,7 +32,7 @@ class CreateHistoryEventOnWorkbasketDistributionTargetsSetAccTest extends Abstra
|
|||
final String sourceWorkbasketId = "WBI:100000000000000000000000000000000004";
|
||||
|
||||
List<String> targetWorkbaskets =
|
||||
Arrays.asList(
|
||||
List.of(
|
||||
"WBI:100000000000000000000000000000000002", "WBI:100000000000000000000000000000000003");
|
||||
|
||||
List<WorkbasketHistoryEvent> events =
|
||||
|
|
|
@ -45,8 +45,7 @@ class CreateHistoryEventOnWorkbasketMarkedForDeletionAccTest extends AbstractAcc
|
|||
String eventWorkbasketId = events.get(0).getWorkbasketId();
|
||||
String details = workbasketHistoryEventMapper.findById(events.get(0).getId()).getDetails();
|
||||
|
||||
assertThat(eventType)
|
||||
.isEqualTo(WorkbasketHistoryEventType.MARKED_FOR_DELETION.getName());
|
||||
assertThat(eventType).isEqualTo(WorkbasketHistoryEventType.MARKED_FOR_DELETION.getName());
|
||||
|
||||
assertThat(eventWorkbasketId).isEqualTo(workbasketId);
|
||||
}
|
||||
|
|
|
@ -9,11 +9,7 @@ import org.junit.jupiter.api.Test;
|
|||
import pro.taskana.TaskanaEngineConfiguration;
|
||||
import pro.taskana.common.api.TaskanaEngine;
|
||||
|
||||
/**
|
||||
* Unit Test for TaskanaEngineConfigurationTest.
|
||||
*
|
||||
* @author MMR
|
||||
*/
|
||||
/** Unit Test for TaskanaEngineConfigurationTest. */
|
||||
class TaskanaEngineConfigurationTest extends AbstractAccTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,58 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-simplehistory-rest-spring</artifactId>
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-simplehistory-rest-spring</artifactId>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana history events plugin, spring based REST API.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana history events plugin, spring based REST API.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<artifactId>taskana-history-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<artifactId>taskana-history-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>pro.taskana.history</groupId>
|
||||
<artifactId>taskana-simplehistory-provider</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-spring</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.hateoas</groupId>
|
||||
<artifactId>spring-hateoas</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-spring</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.hateoas</groupId>
|
||||
<artifactId>spring-hateoas</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-test</artifactId>
|
||||
|
@ -60,107 +60,107 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-core</artifactId>
|
||||
<version>${version.spring.core}</version>
|
||||
<scope>test</scope>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-core</artifactId>
|
||||
<version>${version.spring.core}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-core</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>${version.maven.asciidoctor}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html</backend>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<snippets>target/generated-snippets</snippets>
|
||||
<docinfo>shared</docinfo>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${version.maven.resources}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-rest-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.directory}/generated-docs
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/js</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>${version.maven.asciidoctor}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html</backend>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<snippets>target/generated-snippets</snippets>
|
||||
<docinfo>shared</docinfo>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${version.maven.resources}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-rest-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>
|
||||
${project.build.directory}/generated-docs
|
||||
</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/js</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -68,8 +68,9 @@ public class TaskHistoryEventListResourceAssembler {
|
|||
|
||||
private UriComponentsBuilder getBaseUri() {
|
||||
HttpServletRequest request =
|
||||
((ServletRequestAttributes) Objects.requireNonNull(
|
||||
RequestContextHolder.getRequestAttributes())).getRequest();
|
||||
((ServletRequestAttributes)
|
||||
Objects.requireNonNull(RequestContextHolder.getRequestAttributes()))
|
||||
.getRequest();
|
||||
UriComponentsBuilder baseUri =
|
||||
ServletUriComponentsBuilder.fromServletMapping(request).path(request.getRequestURI());
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import pro.taskana.common.test.doc.api.BaseRestDocumentation;
|
|||
/** Generate documentation for the history event controller. */
|
||||
class TaskHistoryEventControllerRestDocumentation extends BaseRestDocumentation {
|
||||
|
||||
|
||||
private final HashMap<String, String> taskHistoryEventFieldDescriptionsMap = new HashMap<>();
|
||||
|
||||
private FieldDescriptor[] allTaskHistoryEventFieldDescriptors;
|
||||
|
@ -119,7 +118,7 @@ class TaskHistoryEventControllerRestDocumentation extends BaseRestDocumentation
|
|||
}
|
||||
|
||||
@Test
|
||||
public void getAllTaskHistoryEventDocTest() throws Exception {
|
||||
void getAllTaskHistoryEventDocTest() throws Exception {
|
||||
this.mockMvc
|
||||
.perform(
|
||||
RestDocumentationRequestBuilders.get(
|
||||
|
@ -134,7 +133,7 @@ class TaskHistoryEventControllerRestDocumentation extends BaseRestDocumentation
|
|||
}
|
||||
|
||||
@Test
|
||||
public void getSpecificTaskHistoryEventDocTest() throws Exception {
|
||||
void getSpecificTaskHistoryEventDocTest() throws Exception {
|
||||
this.mockMvc
|
||||
.perform(
|
||||
RestDocumentationRequestBuilders.get(
|
||||
|
|
|
@ -12,6 +12,7 @@ taskana.ldap.userSearchFilterName=objectclass
|
|||
taskana.ldap.userSearchFilterValue=person
|
||||
taskana.ldap.userFirstnameAttribute=givenName
|
||||
taskana.ldap.userLastnameAttribute=sn
|
||||
taskana.ldap.userFullnameAttribute=cn
|
||||
taskana.ldap.userIdAttribute=uid
|
||||
taskana.ldap.groupSearchBase=cn=groups
|
||||
taskana.ldap.groupSearchFilterName=objectclass
|
||||
|
|
42
lib/pom.xml
42
lib/pom.xml
|
@ -1,24 +1,26 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>This pom is parent to all taskana core modules and serves the common build.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>This pom is parent to all taskana core modules and serves the common build.
|
||||
</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>taskana-core</module>
|
||||
<module>taskana-cdi</module>
|
||||
<module>taskana-spring</module>
|
||||
<module>taskana-cdi-example</module>
|
||||
<module>taskana-spring-example</module>
|
||||
</modules>
|
||||
<modules>
|
||||
<module>taskana-core</module>
|
||||
<module>taskana-cdi</module>
|
||||
<module>taskana-spring</module>
|
||||
<module>taskana-cdi-example</module>
|
||||
<module>taskana-spring-example</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-cdi-example</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-cdi-example</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The Taskana Spring sample application.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The Taskana Spring sample application.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-api</artifactId>
|
||||
<version>${version.javaee-api}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-cdi</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-api</artifactId>
|
||||
<version>${version.javaee-api}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-cdi</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -1,114 +1,115 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-cdi</artifactId>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-cdi</artifactId>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The helper module to integrate taskana into CDI projects.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The helper module to integrate taskana into CDI projects.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-api</artifactId>
|
||||
<version>${version.javaee-api}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-api</artifactId>
|
||||
<version>${version.javaee-api}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- TEST dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>jaxrs</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>cdi</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-client</artifactId>
|
||||
<version>${version.resteasy}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>arquillian</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.arquillian.junit</groupId>
|
||||
<artifactId>arquillian-junit-container</artifactId>
|
||||
<version>${version.arquillian}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- TEST dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>jaxrs</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>cdi</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-client</artifactId>
|
||||
<version>${version.resteasy}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>arquillian</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.arquillian.junit</groupId>
|
||||
<artifactId>arquillian-junit-container</artifactId>
|
||||
<version>${version.arquillian}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>thorntail-maven-plugin</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>package</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.thorntail</groupId>
|
||||
<artifactId>thorntail-maven-plugin</artifactId>
|
||||
<version>${version.thorntail}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>package</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jboss</id>
|
||||
<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jboss</id>
|
||||
<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
|
@ -1,129 +1,130 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana library to include in your project.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana library to include in your project.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${version.mybatis}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>${version.json}</version>
|
||||
</dependency>
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-data</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.db2.jcc</groupId>
|
||||
<artifactId>db2jcc4</artifactId>
|
||||
<version>${version.db2}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>nl.jqno.equalsverifier</groupId>
|
||||
<artifactId>equalsverifier</artifactId>
|
||||
<version>${version.equalsverifier}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.openpojo</groupId>
|
||||
<artifactId>openpojo</artifactId>
|
||||
<version>${version.openpojo}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tngtech.archunit</groupId>
|
||||
<artifactId>archunit-junit5-api</artifactId>
|
||||
<version>${version.archunit}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tngtech.archunit</groupId>
|
||||
<artifactId>archunit-junit5-engine</artifactId>
|
||||
<version>${version.archunit}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- this repository is needed to fetch com.ibm.db2.jcc -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>novatec public</id>
|
||||
<name>novatec-repository</name>
|
||||
<url>https://repository.novatec-gmbh.de/content/repositories/novatec/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${version.mybatis}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>${version.json}</version>
|
||||
</dependency>
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-data</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.db2.jcc</groupId>
|
||||
<artifactId>db2jcc4</artifactId>
|
||||
<version>${version.db2}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>nl.jqno.equalsverifier</groupId>
|
||||
<artifactId>equalsverifier</artifactId>
|
||||
<version>${version.equalsverifier}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.openpojo</groupId>
|
||||
<artifactId>openpojo</artifactId>
|
||||
<version>${version.openpojo}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tngtech.archunit</groupId>
|
||||
<artifactId>archunit-junit5-api</artifactId>
|
||||
<version>${version.archunit}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tngtech.archunit</groupId>
|
||||
<artifactId>archunit-junit5-engine</artifactId>
|
||||
<version>${version.archunit}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- this repository is needed to fetch com.ibm.db2.jcc -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>novatec public</id>
|
||||
<name>novatec-repository</name>
|
||||
<url>https://repository.novatec-gmbh.de/content/repositories/novatec/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -5,8 +5,6 @@ import pro.taskana.common.api.QueryColumnName;
|
|||
/**
|
||||
* Enum containing the column names for {@link
|
||||
* pro.taskana.classification.internal.ClassificationQueryMapper#queryClassificationColumnValues}.
|
||||
*
|
||||
* @author jsa
|
||||
*/
|
||||
public enum ClassificationQueryColumnName implements QueryColumnName {
|
||||
ID("id"),
|
||||
|
|
|
@ -6,8 +6,6 @@ import pro.taskana.common.api.exceptions.TaskanaException;
|
|||
/** Thrown, when a classification does already exits, but wanted to create with same ID+domain. */
|
||||
public class ClassificationAlreadyExistException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 4716611657569005013L;
|
||||
|
||||
public ClassificationAlreadyExistException(Classification classification) {
|
||||
super(
|
||||
"ID='"
|
||||
|
|
|
@ -5,8 +5,6 @@ import pro.taskana.common.api.exceptions.TaskanaException;
|
|||
/** Thrown if a specific task is not in the database. */
|
||||
public class ClassificationInUseException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ClassificationInUseException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import pro.taskana.common.api.exceptions.NotFoundException;
|
|||
/** Thrown if a specific task is not in the database. */
|
||||
public class ClassificationNotFoundException extends NotFoundException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String key;
|
||||
private String domain;
|
||||
|
||||
|
|
|
@ -18,11 +18,7 @@ import pro.taskana.common.api.exceptions.SystemException;
|
|||
import pro.taskana.common.api.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.common.internal.InternalTaskanaEngine;
|
||||
|
||||
/**
|
||||
* Implementation of ClassificationQuery interface.
|
||||
*
|
||||
* @author EH
|
||||
*/
|
||||
/** Implementation of ClassificationQuery interface. */
|
||||
public class ClassificationQueryImpl implements ClassificationQuery {
|
||||
|
||||
private static final String LINK_TO_SUMMARYMAPPER =
|
||||
|
|
|
@ -421,7 +421,8 @@ public class ClassificationServiceImpl implements ClassificationService {
|
|||
* Fill missing values and validate classification before saving the classification.
|
||||
*
|
||||
* @param classification the classification which will be verified.
|
||||
* @throws InvalidArgumentException if the given classification has no key.
|
||||
* @throws InvalidArgumentException if the given classification has no key, the service level is
|
||||
* null, the type is not valid or the category for the provided type is invalid.
|
||||
*/
|
||||
private void initDefaultClassificationValues(ClassificationImpl classification)
|
||||
throws InvalidArgumentException {
|
||||
|
@ -442,7 +443,9 @@ public class ClassificationServiceImpl implements ClassificationService {
|
|||
classification.setIsValidInDomain(true);
|
||||
}
|
||||
|
||||
if (classification.getServiceLevel() != null && !"".equals(classification.getServiceLevel())) {
|
||||
if (classification.getServiceLevel() == null) {
|
||||
throw new InvalidArgumentException("Classification Service Level must not be null!");
|
||||
} else if (!classification.getServiceLevel().isEmpty()) {
|
||||
validateServiceLevel(classification.getServiceLevel());
|
||||
}
|
||||
|
||||
|
|
|
@ -13,11 +13,7 @@ import pro.taskana.common.internal.jobs.AbstractTaskanaJob;
|
|||
import pro.taskana.common.internal.transaction.TaskanaTransactionProvider;
|
||||
import pro.taskana.task.internal.TaskServiceImpl;
|
||||
|
||||
/**
|
||||
* This class executes a job of type CLASSIFICATIONCHANGEDJOB.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** This class executes a job of type CLASSIFICATIONCHANGEDJOB. */
|
||||
public class ClassificationChangedJob extends AbstractTaskanaJob {
|
||||
|
||||
public static final String TASK_IDS = "taskIds";
|
||||
|
@ -68,8 +64,8 @@ public class ClassificationChangedJob extends AbstractTaskanaJob {
|
|||
if (!taskIdBatch.isEmpty()) {
|
||||
String taskIds = String.join(",", affectedTaskIds);
|
||||
args.put(TASK_IDS, taskIds);
|
||||
args.put(PRIORITY_CHANGED, Boolean.valueOf(priorityChanged).toString());
|
||||
args.put(SERVICE_LEVEL_CHANGED, Boolean.valueOf(serviceLevelChanged).toString());
|
||||
args.put(PRIORITY_CHANGED, Boolean.toString(priorityChanged));
|
||||
args.put(SERVICE_LEVEL_CHANGED, Boolean.toString(serviceLevelChanged));
|
||||
ScheduledJob job = new ScheduledJob();
|
||||
job.setType(ScheduledJob.Type.UPDATETASKSJOB);
|
||||
job.setArguments(args);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package pro.taskana.classification.internal.models;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Objects;
|
||||
|
||||
import pro.taskana.classification.api.ClassificationCustomField;
|
||||
|
@ -54,20 +55,20 @@ public class ClassificationImpl extends ClassificationSummaryImpl implements Cla
|
|||
|
||||
@Override
|
||||
public Instant getCreated() {
|
||||
return created;
|
||||
return created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setCreated(Instant created) {
|
||||
this.created = created;
|
||||
this.created = created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Instant getModified() {
|
||||
return modified;
|
||||
return modified != null ? modified.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setModified(Instant modified) {
|
||||
this.modified = modified;
|
||||
this.modified = modified != null ? modified.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -137,6 +138,7 @@ public class ClassificationImpl extends ClassificationSummaryImpl implements Cla
|
|||
return summary;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canEqual(Object other) {
|
||||
return (other instanceof ClassificationImpl);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package pro.taskana.common.api;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -9,11 +10,7 @@ import pro.taskana.task.internal.jobs.TaskCleanupJob;
|
|||
import pro.taskana.task.internal.jobs.TaskRefreshJob;
|
||||
import pro.taskana.workbasket.internal.jobs.WorkbasketCleanupJob;
|
||||
|
||||
/**
|
||||
* This class holds all data that go into the Job table.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** This class holds all data that go into the Job table. */
|
||||
public class ScheduledJob {
|
||||
|
||||
Map<String, String> arguments;
|
||||
|
@ -28,7 +25,7 @@ public class ScheduledJob {
|
|||
private int retryCount;
|
||||
|
||||
public ScheduledJob() {
|
||||
created = Instant.now();
|
||||
created = Instant.now().truncatedTo(ChronoUnit.MILLIS);
|
||||
state = State.READY;
|
||||
retryCount = 0;
|
||||
}
|
||||
|
@ -50,19 +47,19 @@ public class ScheduledJob {
|
|||
}
|
||||
|
||||
public Instant getCreated() {
|
||||
return created;
|
||||
return created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setCreated(Instant created) {
|
||||
this.created = created;
|
||||
this.created = created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public Instant getDue() {
|
||||
return due;
|
||||
return due != null ? due.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setDue(Instant due) {
|
||||
this.due = due;
|
||||
this.due = due != null ? due.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public State getState() {
|
||||
|
@ -82,11 +79,11 @@ public class ScheduledJob {
|
|||
}
|
||||
|
||||
public Instant getLockExpires() {
|
||||
return lockExpires;
|
||||
return lockExpires != null ? lockExpires.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setLockExpires(Instant lockExpires) {
|
||||
this.lockExpires = lockExpires;
|
||||
this.lockExpires = lockExpires != null ? lockExpires.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public Map<String, String> getArguments() {
|
||||
|
@ -165,11 +162,7 @@ public class ScheduledJob {
|
|||
+ "]";
|
||||
}
|
||||
|
||||
/**
|
||||
* This enum tracks the state of a job.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** This enum tracks the state of a job. */
|
||||
public enum State {
|
||||
READY,
|
||||
FAILED
|
||||
|
|
|
@ -60,9 +60,7 @@ public class ClassificationReport extends Report<MonitorQueryItem, TimeIntervalC
|
|||
|
||||
public DetailedClassificationReport(
|
||||
List<TimeIntervalColumnHeader> workbasketLevelReportColumnHeaders) {
|
||||
super(
|
||||
workbasketLevelReportColumnHeaders,
|
||||
new String[] {"TASK CLASSIFICATION", "ATTACHMENT"});
|
||||
super(workbasketLevelReportColumnHeaders, new String[] {"TASK CLASSIFICATION", "ATTACHMENT"});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,9 +11,7 @@ public class DetailedClassificationRow extends FoldableRow<DetailedMonitorQueryI
|
|||
|
||||
public DetailedClassificationRow(String key, int columnSize) {
|
||||
super(
|
||||
key,
|
||||
columnSize,
|
||||
item -> item.getAttachmentKey() != null ? item.getAttachmentKey() : "N/A");
|
||||
key, columnSize, item -> item.getAttachmentKey() != null ? item.getAttachmentKey() : "N/A");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -71,7 +71,7 @@ public class TimestampRow extends FoldableRow<TimestampQueryItem> {
|
|||
*/
|
||||
public static final class OrgLevel3Row extends FoldableRow<TimestampQueryItem> {
|
||||
|
||||
private OrgLevel3Row(String key, int columnSize) {
|
||||
private OrgLevel3Row(String key, int columnSize) {
|
||||
super(key, columnSize, TimestampQueryItem::getOrgLevel4);
|
||||
}
|
||||
|
||||
|
|
|
@ -426,7 +426,7 @@ public interface MonitorMapper {
|
|||
@Param("excludedClassificationIds") List<String> excludedClassificationIds,
|
||||
@Param("customAttributeFilter") Map<TaskCustomField, String> customAttributeFilter,
|
||||
@Param("combinedClassificationFilter")
|
||||
List<CombinedClassificationFilter> combinedClassificationFilter,
|
||||
List<CombinedClassificationFilter> combinedClassificationFilter,
|
||||
@Param("customField") TaskCustomField taskCustomField);
|
||||
|
||||
@Select(
|
||||
|
|
|
@ -197,8 +197,8 @@ abstract class TimeIntervalReportBuilderImpl<
|
|||
|
||||
protected List<CombinedClassificationFilter> getCombinedClassificationFilter() {
|
||||
// we are currently aware that this is a code smell. Unfortunately the resolution of this would
|
||||
// cause havoc in our queries, since we do not have a concept for a user validation yet. As soon
|
||||
// as that is done we can resolve this code smell.
|
||||
// cause havoc in our queries, since we do not have a concept for a user input validation yet.
|
||||
// As soon as that is done we can resolve this code smell.
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package pro.taskana.spi.history.api.events.classification;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Objects;
|
||||
|
||||
import pro.taskana.classification.api.ClassificationCustomField;
|
||||
|
@ -134,11 +135,11 @@ public class ClassificationHistoryEvent {
|
|||
}
|
||||
|
||||
public Instant getCreated() {
|
||||
return created;
|
||||
return created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setCreated(Instant created) {
|
||||
this.created = created;
|
||||
this.created = created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package pro.taskana.spi.history.api.events.classification;
|
||||
|
||||
public enum ClassificationHistoryEventType {
|
||||
|
||||
CREATED("CREATED"),
|
||||
UPDATED("UPDATED"),
|
||||
DELETED("DELETED");
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package pro.taskana.spi.history.api.events.task;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Objects;
|
||||
|
||||
import pro.taskana.common.api.exceptions.SystemException;
|
||||
|
@ -217,11 +218,11 @@ public class TaskHistoryEvent {
|
|||
}
|
||||
|
||||
public Instant getCreated() {
|
||||
return created;
|
||||
return created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setCreated(Instant created) {
|
||||
this.created = created;
|
||||
this.created = created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
|
|
|
@ -12,5 +12,4 @@ public class WorkbasketDistributionTargetsUpdatedEvent extends WorkbasketHistory
|
|||
eventType = WorkbasketHistoryEventType.DISTRIBUTION_TARGETS_UPDATED.getName();
|
||||
created = Instant.now();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package pro.taskana.spi.history.api.events.workbasket;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Objects;
|
||||
|
||||
import pro.taskana.common.api.exceptions.SystemException;
|
||||
|
@ -102,11 +103,11 @@ public class WorkbasketHistoryEvent {
|
|||
}
|
||||
|
||||
public Instant getCreated() {
|
||||
return created;
|
||||
return created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public void setCreated(Instant created) {
|
||||
this.created = created;
|
||||
this.created = created != null ? created.truncatedTo(ChronoUnit.MILLIS) : null;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
|
|
|
@ -14,7 +14,6 @@ public enum WorkbasketHistoryEventType {
|
|||
DISTRIBUTION_TARGET_REMOVED("DISTRIBUTION_TARGET_REMOVED"),
|
||||
DISTRIBUTION_TARGETS_UPDATED("DISTRIBUTION_TARGETS_UPDATED");
|
||||
|
||||
|
||||
private String name;
|
||||
|
||||
WorkbasketHistoryEventType(String name) {
|
||||
|
|
|
@ -4,8 +4,6 @@ import pro.taskana.common.api.exceptions.NotFoundException;
|
|||
|
||||
public class TaskanaHistoryEventNotFoundException extends NotFoundException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public TaskanaHistoryEventNotFoundException(String id, String msg) {
|
||||
super(id, msg);
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ public final class TaskRoutingManager {
|
|||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TaskRoutingManager.class);
|
||||
private static TaskRoutingManager singleton;
|
||||
private boolean enabled = false;
|
||||
private final List<TaskRoutingProvider> theTaskRoutingProviders = new ArrayList<>();
|
||||
private final ServiceLoader<TaskRoutingProvider> serviceLoader;
|
||||
private boolean enabled = false;
|
||||
|
||||
private TaskRoutingManager(TaskanaEngine taskanaEngine) {
|
||||
serviceLoader = ServiceLoader.load(TaskRoutingProvider.class);
|
||||
|
|
|
@ -13,8 +13,8 @@ public class CreateTaskPreprocessorManager {
|
|||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(CreateTaskPreprocessorManager.class);
|
||||
private static CreateTaskPreprocessorManager singleton;
|
||||
private boolean enabled = false;
|
||||
private final ServiceLoader<CreateTaskPreprocessor> serviceLoader;
|
||||
private boolean enabled = false;
|
||||
|
||||
private CreateTaskPreprocessorManager() {
|
||||
serviceLoader = ServiceLoader.load(CreateTaskPreprocessor.class);
|
||||
|
|
|
@ -5,8 +5,6 @@ import pro.taskana.common.api.QueryColumnName;
|
|||
/**
|
||||
* Enum containing the column names for {@link
|
||||
* pro.taskana.task.internal.TaskQueryMapper#queryObjectReferenceColumnValues}.
|
||||
*
|
||||
* @author jsa
|
||||
*/
|
||||
public enum ObjectReferenceQueryColumnName implements QueryColumnName {
|
||||
ID("id"),
|
||||
|
|
|
@ -206,7 +206,7 @@ public interface TaskQuery extends BaseQuery<TaskSummary, TaskQueryColumnName> {
|
|||
* Add the owner for pattern matching to your query. It will be compared in SQL with the LIKE
|
||||
* operator. You may use a wildcard like % to specify the pattern.
|
||||
*
|
||||
* <p>If you specify multiple arguments they are combined with the OR keyword.</p>
|
||||
* <p>If you specify multiple arguments they are combined with the OR keyword.
|
||||
*
|
||||
* @param owners the owners of the searched tasks
|
||||
* @return the query
|
||||
|
@ -215,10 +215,10 @@ public interface TaskQuery extends BaseQuery<TaskSummary, TaskQueryColumnName> {
|
|||
|
||||
/**
|
||||
* Add the {@link ObjectReference} to exact match to your query. Each individual value has to
|
||||
* match. Fields with the value 'null' will be ignored.
|
||||
* The id of each ObjectReference will be ignored
|
||||
* match. Fields with the value 'null' will be ignored. The id of each ObjectReference will be
|
||||
* ignored
|
||||
*
|
||||
* <p>If you specify multiple arguments they are combined with the OR keyword.</p>
|
||||
* <p>If you specify multiple arguments they are combined with the OR keyword.
|
||||
*
|
||||
* @param objectReferences the combined values which are searched together.
|
||||
* @return the query
|
||||
|
@ -848,6 +848,15 @@ public interface TaskQuery extends BaseQuery<TaskSummary, TaskQueryColumnName> {
|
|||
*/
|
||||
TaskQuery orderByWorkbasketId(SortDirection sortDirection);
|
||||
|
||||
/**
|
||||
* This method sorts the query result according to the workbasket name of the tasks.
|
||||
*
|
||||
* @param sortDirection Determines whether the result is sorted in ascending or descending order.
|
||||
* If sortDirection is null, the result is sorted in ascending order
|
||||
* @return the query
|
||||
*/
|
||||
TaskQuery orderByWorkbasketName(SortDirection sortDirection);
|
||||
|
||||
/**
|
||||
* This method sorts the query result according to the attachment classification key. (Should only
|
||||
* be used if there is one attachment per task in other case the result would be wrong.)
|
||||
|
|
|
@ -9,8 +9,6 @@ import pro.taskana.common.api.exceptions.TaskanaException;
|
|||
*/
|
||||
public class AttachmentPersistenceException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 123L;
|
||||
|
||||
public AttachmentPersistenceException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
|
|
@ -2,13 +2,8 @@ package pro.taskana.task.api.exceptions;
|
|||
|
||||
import pro.taskana.common.api.exceptions.TaskanaException;
|
||||
|
||||
/**
|
||||
* This exception is thrown when the task state doesn't allow the requested operation.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** This exception is thrown when the task state doesn't allow the requested operation. */
|
||||
public class InvalidOwnerException extends TaskanaException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidOwnerException(String msg) {
|
||||
super(msg);
|
||||
|
|
|
@ -2,13 +2,8 @@ package pro.taskana.task.api.exceptions;
|
|||
|
||||
import pro.taskana.common.api.exceptions.TaskanaException;
|
||||
|
||||
/**
|
||||
* This exception is thrown when the task state doesn't allow the requested operation.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
/** This exception is thrown when the task state doesn't allow the requested operation. */
|
||||
public class InvalidStateException extends TaskanaException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidStateException(String msg) {
|
||||
super(msg);
|
||||
|
|
|
@ -8,8 +8,6 @@ import pro.taskana.common.api.exceptions.TaskanaException;
|
|||
*/
|
||||
public class TaskAlreadyExistException extends TaskanaException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public TaskAlreadyExistException(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ import pro.taskana.common.api.exceptions.NotFoundException;
|
|||
/** This exception will be thrown if a specific task comment is not in the database. */
|
||||
public class TaskCommentNotFoundException extends NotFoundException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public TaskCommentNotFoundException(String id, String msg) {
|
||||
super(id, msg);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue