TSK-925: refactored taskana-simplehistory-rest-spring
This commit is contained in:
parent
d0f06a63c4
commit
51187123df
|
|
@ -1,205 +1,60 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
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">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>taskana-simplehistory-rest-spring</artifactId>
|
<artifactId>taskana-simplehistory-rest-spring</artifactId>
|
||||||
<name>${project.groupId}:${project.artifactId}</name>
|
|
||||||
<description>The taskana history events plugin, spring based REST API.</description>
|
|
||||||
<url>http://taskana.pro</url>
|
|
||||||
<parent>
|
|
||||||
<groupId>pro.taskana.simplehistory</groupId>
|
|
||||||
<artifactId>taskana-simplehistory-parent</artifactId>
|
|
||||||
<version>1.1.5-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>The Apache License, Version 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
|
|
||||||
<developers>
|
<name>${project.groupId}:${project.artifactId}</name>
|
||||||
<developer>
|
<description>The taskana history events plugin, spring based REST API.</description>
|
||||||
<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>
|
<parent>
|
||||||
<connection>scm:git:git://github.com/taskana/TaskanaSimpleHistory.git</connection>
|
<groupId>pro.taskana.simplehistory</groupId>
|
||||||
<developerConnection>scm:git:ssh://github.com:taskana/TaskanaSimpleHistory.git</developerConnection>
|
<artifactId>taskana-simplehistory-parent</artifactId>
|
||||||
<url>http://github.com/taskana/TaskanaSimpleHistory/tree/master</url>
|
<version>1.1.5-SNAPSHOT</version>
|
||||||
</scm>
|
</parent>
|
||||||
|
|
||||||
<profiles>
|
<dependencies>
|
||||||
<profile>
|
<dependency>
|
||||||
<id>snapshot</id>
|
<groupId>pro.taskana.simplehistory</groupId>
|
||||||
<build>
|
<artifactId>taskana-simplehistory-provider</artifactId>
|
||||||
<plugins>
|
<version>${project.version}</version>
|
||||||
<plugin>
|
</dependency>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<dependency>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<groupId>pro.taskana</groupId>
|
||||||
<version>1.6</version>
|
<artifactId>taskana-rest-spring</artifactId>
|
||||||
<executions>
|
<version>${project.version}</version>
|
||||||
<execution>
|
</dependency>
|
||||||
<id>sign-artifacts</id>
|
<dependency>
|
||||||
<phase>verify</phase>
|
<groupId>org.springframework</groupId>
|
||||||
<goals>
|
<artifactId>spring-beans</artifactId>
|
||||||
<goal>sign</goal>
|
<version>${version.spring}</version>
|
||||||
</goals>
|
</dependency>
|
||||||
</execution>
|
<dependency>
|
||||||
</executions>
|
<groupId>org.springframework</groupId>
|
||||||
</plugin>
|
<artifactId>spring-jdbc</artifactId>
|
||||||
<plugin>
|
<version>${version.spring}</version>
|
||||||
<groupId>org.sonatype.plugins</groupId>
|
</dependency>
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
<dependency>
|
||||||
<version>1.6.8</version>
|
<groupId>org.springframework.hateoas</groupId>
|
||||||
<extensions>true</extensions>
|
<artifactId>spring-hateoas</artifactId>
|
||||||
<configuration>
|
<version>${version.spring.hateos}</version>
|
||||||
<serverId>ossrh</serverId>
|
</dependency>
|
||||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
<dependency>
|
||||||
<autoReleaseAfterClose>false</autoReleaseAfterClose>
|
<groupId>javax.servlet</groupId>
|
||||||
</configuration>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
</plugin>
|
<version>${version.javax.servlet}</version>
|
||||||
</plugins>
|
<scope>provided</scope>
|
||||||
</build>
|
</dependency>
|
||||||
<distributionManagement>
|
<dependency>
|
||||||
<snapshotRepository>
|
<groupId>javax.validation</groupId>
|
||||||
<id>ossrh</id>
|
<artifactId>validation-api</artifactId>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<version>${version.javax.validation}</version>
|
||||||
</snapshotRepository>
|
</dependency>
|
||||||
</distributionManagement>
|
<dependency>
|
||||||
</profile>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<profile>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<id>release</id>
|
<version>${version.jackson}</version>
|
||||||
<build>
|
</dependency>
|
||||||
<plugins>
|
</dependencies>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<version>1.6</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>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.5.1</version>
|
|
||||||
<configuration>
|
|
||||||
<showWarnings>true</showWarnings>
|
|
||||||
<compilerArgs>
|
|
||||||
<arg>-Xlint:all</arg>
|
|
||||||
</compilerArgs>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.0.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>3.0.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>pro.taskana.simplehistory</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>
|
|
||||||
<version>${spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-jdbc</artifactId>
|
|
||||||
<version>${spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.hateoas</groupId>
|
|
||||||
<artifactId>spring-hateoas</artifactId>
|
|
||||||
<version>0.24.0.RELEASE</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.servlet</groupId>
|
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
|
||||||
<version>4.0.1</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.validation</groupId>
|
|
||||||
<artifactId>validation-api</artifactId>
|
|
||||||
<version>2.0.1.Final</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
<version>2.9.10</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,8 @@ public abstract class AbstractPagingController {
|
||||||
long pageSize;
|
long pageSize;
|
||||||
long page;
|
long page;
|
||||||
try {
|
try {
|
||||||
pageSize = Long.valueOf(pagesizeParam);
|
pageSize = Long.parseLong(pagesizeParam);
|
||||||
page = Long.valueOf(pageParam);
|
page = Long.parseLong(pageParam);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new InvalidArgumentException("page and pageSize must be a integer value.", e.getCause());
|
throw new InvalidArgumentException("page and pageSize must be a integer value.", e.getCause());
|
||||||
}
|
}
|
||||||
|
|
@ -100,7 +100,7 @@ public abstract class AbstractPagingController {
|
||||||
String param = params.getFirst(PAGING_PAGE);
|
String param = params.getFirst(PAGING_PAGE);
|
||||||
params.remove(PAGING_PAGE);
|
params.remove(PAGING_PAGE);
|
||||||
try {
|
try {
|
||||||
return Long.valueOf(param != null ? param : "1");
|
return Long.parseLong(param != null ? param : "1");
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new InvalidArgumentException("page must be a integer value.", e.getCause());
|
throw new InvalidArgumentException("page must be a integer value.", e.getCause());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue