continuous delivery now working
removed meta informations from parent now building frontend aswell typo in config merged sign and build-extras to snapshot format xml deployment script WIP added release plugin fixed deploy script enhanced deploy script added plugins for javadoc & source attachement now deploying snapshots of core and cdi fixed travis config file removed subshells generalized deploy scripts enabled release via git tag fixed pattern matching fixed release deployment now decripting key while deploying tag made deploy script prettier shortened build time debug messages Revert "shortened build time" This reverts commit d4efc9e6bfb6e4913291ba8a3e940e59c73bc6b1. Revert "debug messages" This reverts commit d9f23d1e002f8ea0b31612d4ec3873c92b3ab5a3. cleanup of deploy script added debug feature of deploy script [ci skip] added repo check fixed travis config file removed subshells Revert "shortened build time" This reverts commit d4efc9e6bfb6e4913291ba8a3e940e59c73bc6b1. generalized deploy scripts enabled release via git tag Revert "debug messages" This reverts commit d9f23d1e002f8ea0b31612d4ec3873c92b3ab5a3. testing if build fails testing commit pushing Revert "testing if build fails" This reverts commit e1a742689f20d220fdf836ea957e0df6e03ce214. deployment only on tags fixed travis file now deploying to sonatype from mustaphazorgati/taskana do not do tests [ci skip] overwrite files added head detection for branch now pushing new snapshot version back to git Updated poms to version 0.0.5-SNAPSHOT refactoring Revert "Updated poms to version 0.0.5-SNAPSHOT" This reverts commit 9f1db8824e4bca4ae076df3ea39ad2439e8ed5d5.
This commit is contained in:
parent
1093e04920
commit
afa6314cd7
21
.travis.yml
21
.travis.yml
|
@ -3,19 +3,7 @@ jdk:
|
|||
- oraclejdk8
|
||||
env:
|
||||
global:
|
||||
- NODE_VERSION: 6
|
||||
before_install:
|
||||
- nvm install $NODE_VERSION
|
||||
before-script:
|
||||
-
|
||||
script:
|
||||
- (npm install -g @angular/cli)
|
||||
&& (cd lib && mvn clean install)
|
||||
&& (cd rest && mvn clean install)
|
||||
&& (cd workplace && npm install && ng build --environment=prod)
|
||||
&& (cd admin && npm install && ng build --environment=prod)
|
||||
&& (cd monitor && npm install && ng build --environment=prod)
|
||||
|
||||
- NODE_VERSION: 6
|
||||
cache:
|
||||
timeout: 604800 #1 week
|
||||
directories:
|
||||
|
@ -23,6 +11,10 @@ cache:
|
|||
- "workplace/node_modules"
|
||||
- "admin/node_modules"
|
||||
- "monitor/node_modules"
|
||||
install:
|
||||
- mvn clean install -f lib/ -DskipTests=true -Dmaven.javadoc.skip=true -B
|
||||
script:
|
||||
- lib/deployment/deploy.sh --dry-run lib/ lib/taskana-core/ lib/taskana-spring/ lib/taskana-cdi/
|
||||
deploy:
|
||||
provider: cloudfoundry
|
||||
username: tobias.schaefer@novatec-gmbh.de
|
||||
|
@ -32,5 +24,4 @@ deploy:
|
|||
organization: '"NovaTec Consulting GmbH"'
|
||||
space: Taskana
|
||||
on:
|
||||
repo: Taskana/taskana
|
||||
|
||||
repo: Taskana/taskana
|
Binary file not shown.
|
@ -0,0 +1,102 @@
|
|||
#!/bin/bash
|
||||
set -e #fail fast
|
||||
|
||||
reqRepo="Taskana/taskana"
|
||||
|
||||
#H Usage:
|
||||
#H deploy.sh [OPTION] <parent dir> <project dir> [project dir ...]
|
||||
#H Where OPTION is one of
|
||||
#H --help: prints this help messge
|
||||
#H --dry-run: echos all commands instead of excecution
|
||||
function helpAndExit {
|
||||
cat "$0" | grep "^#H" | cut -c4-
|
||||
exit 0
|
||||
}
|
||||
|
||||
# decripting gpg keys and importing them (needed to sign artifacts)
|
||||
# Global:
|
||||
# $encrypted_fbbd56f3fa0c_key: decription key
|
||||
# $encrypted_fbbd56f3fa0c_iv: initialisation vector
|
||||
# Arguments:
|
||||
# $1: basedir
|
||||
function decodeAndImportKeys {
|
||||
$debug openssl aes-256-cbc -K "$encrypted_fbbd56f3fa0c_key" -iv "$encrypted_fbbd56f3fa0c_iv" -in "$1/codesigning.asc.enc" -out "$1/codesigning.asc" -d
|
||||
$debug gpg --import "$1/codesigning.asc"
|
||||
}
|
||||
|
||||
|
||||
# deploying a given project
|
||||
# Arguments:
|
||||
# $1: project folder (dir)
|
||||
# $2: profile name
|
||||
# $3: settings file (dir)
|
||||
function deploy {
|
||||
$debug mvn deploy -f "$1" -P "$2" --settings "$3" -DskipTests=true -B -U
|
||||
}
|
||||
|
||||
function push_new_poms() {
|
||||
#setup username
|
||||
git config --global user.email "travis@travis-ci.org"
|
||||
git config --global user.name "Travis CI"
|
||||
|
||||
#commit all poms
|
||||
git checkout -b "$branch"
|
||||
git add "./*pom.xml"
|
||||
git commit -m "Updated poms to version ${TRAVIS_TAG##v}-SNAPSHOT"
|
||||
|
||||
#push poms (authentication via GH_TOKEN)
|
||||
git remote add origin-pages "https://$GH_TOKEN@github.com/Taskana/taskana.git" >/dev/null 2>&1
|
||||
git push --quiet --set-upstream origin-pages "$branch"
|
||||
}
|
||||
|
||||
function main {
|
||||
if [[ "$1" = '--help' || $# -eq 0 ]]; then
|
||||
helpAndExit
|
||||
fi
|
||||
|
||||
local debug=
|
||||
if [[ "$1" = '--dry-run' ]]; then
|
||||
debug=echo
|
||||
shift
|
||||
fi
|
||||
|
||||
if [[ -z "$debug" && ("$TRAVIS" != 'true' || -z "$encrypted_fbbd56f3fa0c_key" || -z "$encrypted_fbbd56f3fa0c_iv") ]]; then
|
||||
echo "you are not travis or travis does not have the correct encryption key and iv" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$TRAVIS" == 'true' && "$TRAVIS_REPO_SLUG" != "$reqRepo" ]]; then
|
||||
echo "Skipping release to sonatype because this repo's name does not match with: $reqRepo"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
decodeAndImportKeys `dirname "$0"`
|
||||
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
#check if tagged commit is a head commit of any branch
|
||||
local commit=`git ls-remote origin | grep "$TRAVIS_TAG" | cut -c1-40`
|
||||
local branch=`git ls-remote origin | grep -v refs/tags | grep "$commit" | sed "s/$commit.*refs\/heads\///"`
|
||||
if [[ -z $branch ]]; then
|
||||
echo "tag $TRAVIS_TAG is not a head commit. Can not release" >&2
|
||||
exit 1;
|
||||
fi
|
||||
mvn org.codehaus.mojo:versions-maven-plugin:2.5:set -f "$1" -DnewVersion="${TRAVIS_TAG##v}" -DartifactId=* -DgroupId=*
|
||||
local profile="release"
|
||||
else
|
||||
local profile="snapshot"
|
||||
fi
|
||||
shift
|
||||
for dir in "$@"; do
|
||||
deploy "$PWD/$dir" "$profile" "`dirname "$0"`/mvnsettings.xml"
|
||||
done
|
||||
|
||||
if [[ -n $branch ]]; then
|
||||
mvn org.codehaus.mojo:versions-maven-plugin:2.5:set -f "$1" -DnewVersion="${TRAVIS_TAG##v}-SNAPSHOT" -DartifactId=* -DgroupId=*
|
||||
if [[ -z $GH_TOKEN ]]; then
|
||||
echo 'GH_TOKEN not set' >&2
|
||||
exit 1
|
||||
fi
|
||||
push_new_poms
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
|
@ -0,0 +1,24 @@
|
|||
<settings>
|
||||
<servers>
|
||||
<server>
|
||||
<id>ossrh</id>
|
||||
<username>${env.OSSRH_JIRA_USERNAME}</username>
|
||||
<password>${env.OSSRH_JIRA_PASSWORD}</password>
|
||||
</server>
|
||||
</servers>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ossrh</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<properties>
|
||||
<gpg.executable>gpg</gpg.executable>
|
||||
<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
|
||||
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
|
||||
</properties>
|
||||
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
|
@ -5,6 +5,32 @@
|
|||
<artifactId>taskana-cdi</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>TODO</description>
|
||||
<url>http://taskana-workplace.mybluemix.net</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Holger Hagen</name>
|
||||
<email>holger.hagen@novatec-gmbh.de</email>
|
||||
<organization>NovaTec Consulting GmbH</organization>
|
||||
<organizationUrl>https://www.novatec-gmbh.de</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/taskana/taskana.git</connection>
|
||||
<developerConnection>scm:git:ssh://github.com:taskana/taskana.git</developerConnection>
|
||||
<url>http://github.com/taskana/taskana/tree/master</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
@ -13,6 +39,85 @@
|
|||
<version.resteasy>3.1.2.Final</version.resteasy>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>snapshot</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.8</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>false</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.8</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>false</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -106,6 +211,32 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -5,12 +5,117 @@
|
|||
<artifactId>taskana-core</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>TODO</description>
|
||||
<url>http://taskana-workplace.mybluemix.net</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Holger Hagen</name>
|
||||
<email>holger.hagen@novatec-gmbh.de</email>
|
||||
<organization>NovaTec Consulting GmbH</organization>
|
||||
<organizationUrl>https://www.novatec-gmbh.de</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/taskana/taskana.git</connection>
|
||||
<developerConnection>scm:git:ssh://github.com:taskana/taskana.git</developerConnection>
|
||||
<url>http://github.com/taskana/taskana/tree/master</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>snapshot</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.8</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>false</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.8</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>false</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
|
@ -96,6 +201,32 @@
|
|||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!--
|
||||
|
|
|
@ -14,25 +14,25 @@ public interface BaseQuery<T> {
|
|||
|
||||
/**
|
||||
* This method will return a list of defined {@link T} objects.
|
||||
* @return
|
||||
* @throws NotAuthorizedException
|
||||
* @return TODO
|
||||
* @throws NotAuthorizedException TODO
|
||||
*/
|
||||
List<T> list() throws NotAuthorizedException;
|
||||
|
||||
/**
|
||||
* This method will return a list of defined {@link T} objects with specified
|
||||
* offset and an limit.
|
||||
* @param offset
|
||||
* @param limit
|
||||
* @return
|
||||
* @throws NotAuthorizedException
|
||||
* @param offset TODO
|
||||
* @param limit TODO
|
||||
* @return TODO
|
||||
* @throws NotAuthorizedException TODO
|
||||
*/
|
||||
List<T> list(int offset, int limit) throws NotAuthorizedException;
|
||||
|
||||
/**
|
||||
* This method will return a single object of {@link T}.
|
||||
* @return
|
||||
* @throws NotAuthorizedException
|
||||
* @return TODO
|
||||
* @throws NotAuthorizedException TODO
|
||||
*/
|
||||
T single() throws NotAuthorizedException;
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.Date;
|
|||
*/
|
||||
public interface ClassificationQuery extends BaseQuery<Classification> {
|
||||
|
||||
|
||||
/**
|
||||
* Add your parentClassification to your query.
|
||||
* @param parentClassificationId
|
||||
|
@ -34,22 +33,22 @@ public interface ClassificationQuery extends BaseQuery<Classification> {
|
|||
|
||||
/**
|
||||
* Add your domain to your query.
|
||||
* @param domain
|
||||
* @return
|
||||
* @param domain TODO
|
||||
* @return TODO
|
||||
*/
|
||||
ClassificationQuery domain(String... domain);
|
||||
|
||||
/**
|
||||
* Add to your query if the Classification shall be valid in its domain.
|
||||
* @param validInDomain
|
||||
* @return
|
||||
* @param validInDomain TODO
|
||||
* @return TODO
|
||||
*/
|
||||
ClassificationQuery validInDomain(Boolean validInDomain);
|
||||
|
||||
/**
|
||||
* Add your created-Dates to your query.
|
||||
* @param created
|
||||
* @return
|
||||
* @param created TODO
|
||||
* @return TODO
|
||||
*/
|
||||
ClassificationQuery created(Date... created);
|
||||
|
||||
|
@ -88,22 +87,22 @@ public interface ClassificationQuery extends BaseQuery<Classification> {
|
|||
|
||||
/**
|
||||
* Add your customFields to your query.
|
||||
* @param customFields
|
||||
* @return
|
||||
* @param customFields TODO
|
||||
* @return TODO
|
||||
*/
|
||||
ClassificationQuery customFields(String... customFields);
|
||||
|
||||
/**
|
||||
* Define after which date the classifications should be valid.
|
||||
* @param validFrom
|
||||
* @return
|
||||
* @param validFrom TODO
|
||||
* @return TODO
|
||||
*/
|
||||
ClassificationQuery validFrom(Date... validFrom);
|
||||
|
||||
/**
|
||||
* Define until which date the classifications should be valid.
|
||||
* @param validUntil
|
||||
* @return
|
||||
* @param validUntil TODO
|
||||
* @return TODO
|
||||
*/
|
||||
ClassificationQuery validUntil(Date... validUntil);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ public interface ClassificationService {
|
|||
/**
|
||||
* Get all available Classifications as a tree.
|
||||
* @return The List of all Classifications
|
||||
* @throws NotAuthorizedException TODO
|
||||
*/
|
||||
List<Classification> getClassificationTree() throws NotAuthorizedException;
|
||||
|
||||
|
@ -21,16 +22,18 @@ public interface ClassificationService {
|
|||
* Get all Classifications with the given id.
|
||||
* Returns also older and domain-specific versions of the classification.
|
||||
*
|
||||
* @param id
|
||||
* @param id TODO
|
||||
* @param domain TODO
|
||||
* @return List with all versions of the Classification
|
||||
*/
|
||||
List<Classification> getAllClassificationsWithId(String id, String domain);
|
||||
|
||||
/**
|
||||
* Get the Classification for id and domain.
|
||||
* @param id
|
||||
* @param domain
|
||||
* @param id TODO
|
||||
* @param domain TODO
|
||||
* @return If exist: domain-specific classification, else default classification
|
||||
* @throws ClassificationNotFoundException TODO
|
||||
*/
|
||||
Classification getClassification(String id, String domain) throws ClassificationNotFoundException;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public interface TaskService {
|
|||
* @param userName
|
||||
* user who claims the task
|
||||
* @return modified claimed Task
|
||||
* @throws TaskNotFoundException
|
||||
* @throws TaskNotFoundException TODO
|
||||
*/
|
||||
Task claim(String id, String userName) throws TaskNotFoundException;
|
||||
|
||||
|
@ -33,15 +33,16 @@ public interface TaskService {
|
|||
* @param taskId
|
||||
* the task id
|
||||
* @return changed Task after update.
|
||||
* @throws TaskNotFoundException
|
||||
* @throws TaskNotFoundException TODO
|
||||
*/
|
||||
Task complete(String taskId) throws TaskNotFoundException;
|
||||
|
||||
/**
|
||||
* Create a task by a task object.
|
||||
* @param task
|
||||
* @param task TODO
|
||||
* @return the created task
|
||||
* @throws NotAuthorizedException
|
||||
* @throws NotAuthorizedException TODO
|
||||
* @throws WorkbasketNotFoundException TODO
|
||||
*/
|
||||
Task createTask(Task task) throws NotAuthorizedException, WorkbasketNotFoundException, ClassificationNotFoundException;
|
||||
|
||||
|
@ -50,6 +51,7 @@ public interface TaskService {
|
|||
* @param taskId
|
||||
* the id of the task
|
||||
* @return the Task
|
||||
* @throws TaskNotFoundException TODO
|
||||
*/
|
||||
Task getTaskById(String taskId) throws TaskNotFoundException;
|
||||
|
||||
|
@ -64,10 +66,10 @@ public interface TaskService {
|
|||
/**
|
||||
* Count all Tasks in a given workbasket with daysInPast as Days from today in
|
||||
* the past and a specific state.
|
||||
* @param workbasketId
|
||||
* @param daysInPast
|
||||
* @param states
|
||||
* @return
|
||||
* @param workbasketId TODO
|
||||
* @param daysInPast TODO
|
||||
* @param states TODO
|
||||
* @return TODO
|
||||
*/
|
||||
long getTaskCountForWorkbasketByDaysInPastAndState(String workbasketId, long daysInPast, List<TaskState> states);
|
||||
|
||||
|
@ -76,9 +78,12 @@ public interface TaskService {
|
|||
/**
|
||||
* Transfer task to another workbasket. The transfer set the transferred flag
|
||||
* and resets the read flag.
|
||||
* @param workbasketId
|
||||
* @param taskId TODO
|
||||
* @param workbasketId TODO
|
||||
* @return the updated task
|
||||
* @throws NotAuthorizedException
|
||||
* @throws TaskNotFoundException TODO
|
||||
* @throws WorkbasketNotFoundException TODO
|
||||
* @throws NotAuthorizedException TODO
|
||||
*/
|
||||
Task transfer(String taskId, String workbasketId)
|
||||
throws TaskNotFoundException, WorkbasketNotFoundException, NotAuthorizedException;
|
||||
|
@ -90,6 +95,7 @@ public interface TaskService {
|
|||
* @param isRead
|
||||
* the new status of the read flag.
|
||||
* @return Task the updated Task
|
||||
* @throws TaskNotFoundException TODO
|
||||
*/
|
||||
Task setTaskRead(String taskId, boolean isRead) throws TaskNotFoundException;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public interface TaskanaEngine {
|
|||
/**
|
||||
* sets the connection management mode for taskana.
|
||||
*
|
||||
* @param mode. See ConnectionManagementMode
|
||||
* @param mode See ConnectionManagementMode
|
||||
*/
|
||||
void setConnectionManagementMode(ConnectionManagementMode mode);
|
||||
|
||||
|
|
|
@ -15,14 +15,15 @@ public interface WorkbasketService {
|
|||
|
||||
/**
|
||||
* Get Workbasket for a given id.
|
||||
* @param workbasketId
|
||||
* @param workbasketId TODO
|
||||
* @return the requested Workbasket
|
||||
* @throws WorkbasketNotFoundException TODO
|
||||
*/
|
||||
Workbasket getWorkbasket(String workbasketId) throws WorkbasketNotFoundException;
|
||||
|
||||
/**
|
||||
* Get all available Workbaskets.
|
||||
* @return List<Workbasket> the list of all workbaskets
|
||||
* @return a list containing all workbaskets
|
||||
*/
|
||||
List<Workbasket> getWorkbaskets();
|
||||
|
||||
|
@ -30,7 +31,7 @@ public interface WorkbasketService {
|
|||
* Create a new Workbasket.
|
||||
* @param workbasket
|
||||
* The workbasket to create
|
||||
* @throws NotAuthorizedException
|
||||
* @return TODO
|
||||
*/
|
||||
Workbasket createWorkbasket(Workbasket workbasket);
|
||||
|
||||
|
@ -38,7 +39,8 @@ public interface WorkbasketService {
|
|||
* Update a Workbasket.
|
||||
* @param workbasket
|
||||
* The workbasket to update
|
||||
* @throws NotAuthorizedException
|
||||
* @return TODO
|
||||
* @throws NotAuthorizedException TODO
|
||||
*/
|
||||
Workbasket updateWorkbasket(Workbasket workbasket) throws NotAuthorizedException;
|
||||
|
||||
|
@ -46,7 +48,7 @@ public interface WorkbasketService {
|
|||
* Create a new Workbasket Authorization with a Workbasket and a AccessId.
|
||||
* @param workbasketAccessItem
|
||||
* the new workbasketAccessItem
|
||||
* @return
|
||||
* @return TODO
|
||||
*/
|
||||
WorkbasketAccessItem createWorkbasketAuthorization(WorkbasketAccessItem workbasketAccessItem);
|
||||
|
||||
|
@ -78,9 +80,7 @@ public interface WorkbasketService {
|
|||
* the workbasket we want to access
|
||||
* @param authorization
|
||||
* the needed Authorization
|
||||
* @throws WorkbasketNotFoundException
|
||||
* if the workbasket do not exist
|
||||
* @throws NotAuthorizedException
|
||||
* @throws NotAuthorizedException TODO
|
||||
*/
|
||||
void checkAuthorization(String workbasketId, WorkbasketAuthorization authorization) throws NotAuthorizedException;
|
||||
|
||||
|
@ -94,8 +94,8 @@ public interface WorkbasketService {
|
|||
|
||||
/**
|
||||
* Get all authorizations for a Workbasket.
|
||||
* @param workbasketId
|
||||
* @return List<WorkbasketAccessItem>
|
||||
* @param workbasketId TODO
|
||||
* @return List of WorkbasketAccessItems
|
||||
*/
|
||||
List<WorkbasketAccessItem> getWorkbasketAuthorizations(String workbasketId);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class DbScriptRunner {
|
|||
|
||||
/**
|
||||
* Run all db scripts.
|
||||
* @throws SQLException
|
||||
* @throws SQLException TODO
|
||||
*/
|
||||
public void run() throws SQLException {
|
||||
Connection connection = dataSource.getConnection();
|
||||
|
|
|
@ -64,7 +64,7 @@ public class TaskanaEngineConfiguration {
|
|||
/**
|
||||
* This method creates the TaskanaEngine without an sqlSessionFactory.
|
||||
* @return the TaskanaEngine
|
||||
* @throws SQLException
|
||||
* @throws SQLException TODO
|
||||
*/
|
||||
public TaskanaEngine buildTaskanaEngine() throws SQLException {
|
||||
return new TaskanaEngineImpl(this);
|
||||
|
@ -72,7 +72,10 @@ public class TaskanaEngineConfiguration {
|
|||
|
||||
/**
|
||||
* This method creates a PooledDataSource, if the needed properties are provided.
|
||||
* @param dbConfiguration
|
||||
* @param driver TODO
|
||||
* @param jdbcUrl TODO
|
||||
* @param username TODO
|
||||
* @param password TODO
|
||||
* @return DataSource
|
||||
*/
|
||||
public static DataSource createDatasource(String driver, String jdbcUrl, String username, String password) {
|
||||
|
|
|
@ -107,7 +107,7 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
|||
* Control over commit and rollback is the responsibility of the client.
|
||||
* In order to close the connection, the client can call TaskanaEngine.closeConnection() or
|
||||
* TaskanaEngine.setConnection(null). Both calls have the same effect.
|
||||
* @param connection
|
||||
* @param connection TODO
|
||||
*/
|
||||
@Override
|
||||
public void setConnection(java.sql.Connection connection) {
|
||||
|
@ -244,7 +244,6 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
|||
* On the first call to openConnection, we call sessionManager.startManagedSession() to open a database connection.
|
||||
* On each call to returnConnection() we pop one instance of sessionManager from the stack.
|
||||
* When the stack becomes empty, we close the database connection by calling sessionManager.close()
|
||||
* @param
|
||||
* @return Stack of SqlSessionManager
|
||||
*/
|
||||
protected static Stack<SqlSessionManager> getSessionStack() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -5,6 +6,142 @@
|
|||
<artifactId>taskana-spring</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>TODO</description>
|
||||
<url>http://taskana-workplace.mybluemix.net</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Holger Hagen</name>
|
||||
<email>holger.hagen@novatec-gmbh.de</email>
|
||||
<organization>NovaTec Consulting GmbH</organization>
|
||||
<organizationUrl>https://www.novatec-gmbh.de</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/Taskana/taskana.git</connection>
|
||||
<developerConnection>scm:git:ssh://github.com:Taskana/taskana.git</developerConnection>
|
||||
<url>http://github.com/Taskana/taskana/tree/master</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>snapshot</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.8</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>false</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.8</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>false</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
|
|
|
@ -21,7 +21,6 @@ public class SpringTaskanaEngineConfiguration extends TaskanaEngineConfiguration
|
|||
* sqlSessionFactory
|
||||
*
|
||||
* @return the TaskanaEngine
|
||||
* @throws SQLException
|
||||
*/
|
||||
public TaskanaEngine buildTaskanaEngine() {
|
||||
this.useContainerManagedTransactions = true;
|
||||
|
|
Loading…
Reference in New Issue