Closes #2486 : Upgrade to Spring Boot 3.2

This commit is contained in:
arolfes 2024-04-01 21:34:37 +02:00 committed by Alex
parent ac33df25c6
commit f0f607d1d5
35 changed files with 107 additions and 272 deletions

View File

@ -132,12 +132,6 @@
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>capital.scalable</groupId>
<artifactId>spring-auto-restdocs-core</artifactId>
<version>${version.auto-restdocs}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <artifactId>spring-boot-starter-validation</artifactId>
@ -147,28 +141,6 @@
<build> <build>
<plugins> <plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${version.maven.resources}</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/generated-javadoc-json</outputDirectory>
<resources>
<resource>
<directory>../../rest/taskana-rest-spring/target/generated-javadoc-json
</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
@ -182,61 +154,6 @@
</tag> </tag>
</tags> </tags>
</configuration> </configuration>
<executions>
<execution>
<id>generate-javadoc-json</id>
<phase>validate</phase>
<goals>
<goal>javadoc-no-fork</goal>
</goals>
<configuration>
<doclet>capital.scalable.restdocs.jsondoclet.ExtractDocumentationAsJsonDoclet</doclet>
<docletArtifact>
<groupId>capital.scalable</groupId>
<artifactId>spring-auto-restdocs-json-doclet-jdk9</artifactId>
<version>${version.auto-restdocs}</version>
</docletArtifact>
<destDir>generated-javadoc-json</destDir>
<reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
<useStandardDocletOptions>false</useStandardDocletOptions>
<show>package</show>
</configuration>
</execution>
</executions>
</plugin>
<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>
</execution>
</executions>
<configuration>
<backend>html5</backend>
<doctype>book</doctype>
<attributes>
<snippets>${project.build.directory}/generated-snippets</snippets>
<doctype>book</doctype>
<icons>font</icons>
<source-highlighter>highlightjs</source-highlighter>
<toc>left</toc>
<docinfo>shared</docinfo>
<toclevels>4</toclevels>
<sectlinks/>
</attributes>
<logHandler>
<outputToConsole>false</outputToConsole>
<failIf>
<severity>ERROR</severity>
</failIf>
</logHandler>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -99,7 +99,8 @@ public class TaskHistoryEventController {
@GetMapping(path = HistoryRestEndpoints.URL_HISTORY_EVENTS_ID) @GetMapping(path = HistoryRestEndpoints.URL_HISTORY_EVENTS_ID)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<TaskHistoryEventRepresentationModel> getTaskHistoryEvent( public ResponseEntity<TaskHistoryEventRepresentationModel> getTaskHistoryEvent(
@PathVariable String historyEventId) throws TaskanaHistoryEventNotFoundException { @PathVariable("historyEventId") String historyEventId)
throws TaskanaHistoryEventNotFoundException {
TaskHistoryEvent resultEvent = simpleHistoryService.getTaskHistoryEvent(historyEventId); TaskHistoryEvent resultEvent = simpleHistoryService.getTaskHistoryEvent(historyEventId);
TaskHistoryEventRepresentationModel taskEventResource = assembler.toModel(resultEvent); TaskHistoryEventRepresentationModel taskEventResource = assembler.toModel(resultEvent);

View File

@ -2,10 +2,12 @@ package pro.taskana.simplehistory.rest;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class TaskHistoryEventControllerRestDocTest extends BaseRestDocTest { class TaskHistoryEventControllerRestDocTest extends BaseRestDocTest {
@Test @Test

View File

@ -57,7 +57,7 @@ public class ExampleBootstrapTest {
// Delete Taskana folder if exists // Delete Taskana folder if exists
Path taskanaH2Data = Path.of(System.getProperty("user.home"), "taskana-h2-data"); Path taskanaH2Data = Path.of(System.getProperty("user.home"), "taskana-h2-data");
if (Files.exists(taskanaH2Data)) { if (Files.exists(taskanaH2Data)) {
FileUtils.deleteDirectory(taskanaH2Data.toFile()); FileUtils.forceDelete(taskanaH2Data.toFile());
} }
} }

View File

@ -3,7 +3,7 @@
<module name="com.h2database.h2" xmlns="urn:jboss:module:1.9"> <module name="com.h2database.h2" xmlns="urn:jboss:module:1.9">
<resources> <resources>
<resource-root path="h2-2.1.214.jar"/> <resource-root path="h2-2.2.224.jar"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="java.compiler"/> <module name="java.compiler"/>

View File

@ -77,7 +77,7 @@ public class TaskanaProducersTest {
// Delete Taskana folder if exists // Delete Taskana folder if exists
Path taskanaH2Data = Path.of(System.getProperty("user.home"), "taskana-h2-data"); Path taskanaH2Data = Path.of(System.getProperty("user.home"), "taskana-h2-data");
if (Files.exists(taskanaH2Data)) { if (Files.exists(taskanaH2Data)) {
FileUtils.deleteDirectory(taskanaH2Data.toFile()); FileUtils.forceDelete(taskanaH2Data.toFile());
} }
} }

View File

@ -3,7 +3,7 @@
<module name="com.h2database.h2" xmlns="urn:jboss:module:1.9"> <module name="com.h2database.h2" xmlns="urn:jboss:module:1.9">
<resources> <resources>
<resource-root path="h2-2.1.214.jar"/> <resource-root path="h2-2.2.224.jar"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="java.compiler"/> <module name="java.compiler"/>

View File

@ -66,7 +66,7 @@
<!-- spring dependencies --> <!-- spring dependencies -->
<version.jakarta.annotation-api>2.1.1</version.jakarta.annotation-api> <version.jakarta.annotation-api>2.1.1</version.jakarta.annotation-api>
<version.spring.plugin.core>3.0.0</version.spring.plugin.core> <version.spring.plugin.core>3.0.0</version.spring.plugin.core>
<version.spring.boot>3.1.5</version.spring.boot> <version.spring.boot>3.2.4</version.spring.boot>
<version.spring.mybatis>3.0.2</version.spring.mybatis> <version.spring.mybatis>3.0.2</version.spring.mybatis>
<!-- wildfly dependencies --> <!-- wildfly dependencies -->

View File

@ -21,7 +21,9 @@
<module>../web</module> <module>../web</module>
<module>taskana-rest-spring-example-common</module> <module>taskana-rest-spring-example-common</module>
<module>taskana-rest-spring-example-boot</module> <module>taskana-rest-spring-example-boot</module>
<!-- enable it, when decission is made how to proceed
<module>taskana-rest-spring-example-wildfly</module> <module>taskana-rest-spring-example-wildfly</module>
-->
<module>taskana-rest-spring-test-lib</module> <module>taskana-rest-spring-test-lib</module>
</modules> </modules>

View File

@ -59,6 +59,7 @@
<artifactId>taskana-rest-spring-example-common</artifactId> <artifactId>taskana-rest-spring-example-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.plugin</groupId> <groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId> <artifactId>spring-plugin-core</artifactId>

View File

@ -3,7 +3,7 @@
<module name="org.postgresql.postgresql" xmlns="urn:jboss:module:1.9"> <module name="org.postgresql.postgresql" xmlns="urn:jboss:module:1.9">
<resources> <resources>
<resource-root path="postgresql-42.6.0.jar"/> <resource-root path="postgresql-42.6.2.jar"/>
</resources> </resources>
<!-- don't know why it is still javax, but this is the only way how the postgresql module is loaded --> <!-- don't know why it is still javax, but this is the only way how the postgresql module is loaded -->

View File

@ -7,10 +7,10 @@ import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.core.annotation.Order;
import org.springframework.ldap.core.support.BaseLdapPathContextSource; import org.springframework.ldap.core.support.BaseLdapPathContextSource;
import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@ -62,7 +62,8 @@ public class TestWebSecurityConfig {
} }
@Bean @Bean
public FilterRegistrationBean<CorsFilter> corsFilter() { @Order(0)
public CorsFilter corsFilter() {
final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration(); CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true); config.setAllowCredentials(true);
@ -70,9 +71,7 @@ public class TestWebSecurityConfig {
config.addAllowedHeader("*"); config.addAllowedHeader("*");
config.addAllowedMethod("*"); config.addAllowedMethod("*");
source.registerCorsConfiguration("/**", config); source.registerCorsConfiguration("/**", config);
FilterRegistrationBean<CorsFilter> bean = new FilterRegistrationBean<>(new CorsFilter(source)); return new CorsFilter(source);
bean.setOrder(0);
return bean;
} }
@Bean @Bean

View File

@ -134,11 +134,6 @@
<artifactId>spring-security-test</artifactId> <artifactId>spring-security-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>net.bytebuddy</groupId> <groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId> <artifactId>byte-buddy</artifactId>
@ -154,12 +149,6 @@
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>capital.scalable</groupId>
<artifactId>spring-auto-restdocs-core</artifactId>
<version>${version.auto-restdocs}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <artifactId>spring-boot-starter-validation</artifactId>
@ -194,65 +183,6 @@
</tag> </tag>
</tags> </tags>
</configuration> </configuration>
<executions>
<execution>
<id>generate-javadoc-json</id>
<phase>validate</phase>
<goals>
<goal>javadoc-no-fork</goal>
</goals>
<configuration>
<doclet>capital.scalable.restdocs.jsondoclet.ExtractDocumentationAsJsonDoclet</doclet>
<docletArtifact>
<groupId>capital.scalable</groupId>
<!--
currently the jdk9+ version of this doclet has a very bad bug.
see: https://github.com/ScaCap/spring-auto-restdocs/issues/412
-->
<artifactId>spring-auto-restdocs-json-doclet-jdk9</artifactId>
<version>${version.auto-restdocs}</version>
</docletArtifact>
<destDir>generated-javadoc-json</destDir>
<reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
<useStandardDocletOptions>false</useStandardDocletOptions>
<show>package</show>
</configuration>
</execution>
</executions>
</plugin>
<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>
</execution>
</executions>
<configuration>
<backend>html5</backend>
<doctype>book</doctype>
<attributes>
<snippets>${project.build.directory}/generated-snippets</snippets>
<doctype>book</doctype>
<icons>font</icons>
<source-highlighter>highlightjs</source-highlighter>
<toc>left</toc>
<docinfo>shared</docinfo>
<toclevels>4</toclevels>
<sectlinks/>
</attributes>
<logHandler>
<outputToConsole>false</outputToConsole>
<failIf>
<severity>ERROR</severity>
</failIf>
</logHandler>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -106,7 +106,8 @@ public class ClassificationController {
@GetMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID, produces = MediaTypes.HAL_JSON_VALUE) @GetMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID, produces = MediaTypes.HAL_JSON_VALUE)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<ClassificationRepresentationModel> getClassification( public ResponseEntity<ClassificationRepresentationModel> getClassification(
@PathVariable String classificationId) throws ClassificationNotFoundException { @PathVariable("classificationId") String classificationId)
throws ClassificationNotFoundException {
Classification classification = classificationService.getClassification(classificationId); Classification classification = classificationService.getClassification(classificationId);
return ResponseEntity.ok(modelAssembler.toModel(classification)); return ResponseEntity.ok(modelAssembler.toModel(classification));
} }
@ -159,7 +160,7 @@ public class ClassificationController {
@PutMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID) @PutMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<ClassificationRepresentationModel> updateClassification( public ResponseEntity<ClassificationRepresentationModel> updateClassification(
@PathVariable(value = "classificationId") String classificationId, @PathVariable("classificationId") String classificationId,
@RequestBody ClassificationRepresentationModel resource) @RequestBody ClassificationRepresentationModel resource)
throws ClassificationNotFoundException, throws ClassificationNotFoundException,
ConcurrencyException, ConcurrencyException,
@ -193,7 +194,7 @@ public class ClassificationController {
@DeleteMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID) @DeleteMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<ClassificationRepresentationModel> deleteClassification( public ResponseEntity<ClassificationRepresentationModel> deleteClassification(
@PathVariable String classificationId) @PathVariable("classificationId") String classificationId)
throws ClassificationNotFoundException, ClassificationInUseException, NotAuthorizedException { throws ClassificationNotFoundException, ClassificationInUseException, NotAuthorizedException {
classificationService.deleteClassification(classificationId); classificationService.deleteClassification(classificationId);
return ResponseEntity.noContent().build(); return ResponseEntity.noContent().build();

View File

@ -68,7 +68,7 @@ public class ClassificationDefinitionController {
@GetMapping(path = RestEndpoints.URL_CLASSIFICATION_DEFINITIONS) @GetMapping(path = RestEndpoints.URL_CLASSIFICATION_DEFINITIONS)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<ClassificationDefinitionCollectionRepresentationModel> public ResponseEntity<ClassificationDefinitionCollectionRepresentationModel>
exportClassifications(@RequestParam(required = false) String[] domain) { exportClassifications(@RequestParam(value = "domain", required = false) String[] domain) {
ClassificationQuery query = classificationService.createClassificationQuery(); ClassificationQuery query = classificationService.createClassificationQuery();
List<ClassificationSummary> summaries = List<ClassificationSummary> summaries =

View File

@ -63,7 +63,7 @@ public class TaskanaEngineController {
@GetMapping(path = RestEndpoints.URL_CLASSIFICATION_CATEGORIES) @GetMapping(path = RestEndpoints.URL_CLASSIFICATION_CATEGORIES)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<List<String>> getClassificationCategories( public ResponseEntity<List<String>> getClassificationCategories(
@RequestParam(required = false) String type) { @RequestParam(value = "type", required = false) String type) {
if (type != null) { if (type != null) {
return ResponseEntity.ok(taskanaConfiguration.getClassificationCategoriesByType(type)); return ResponseEntity.ok(taskanaConfiguration.getClassificationCategoriesByType(type));
} }

View File

@ -117,13 +117,22 @@ public class TaskanaRestExceptionHandler extends ResponseEntityExceptionHandler
Map.entry(UnsupportedDatabaseException.ERROR_KEY, HttpStatus.INTERNAL_SERVER_ERROR), Map.entry(UnsupportedDatabaseException.ERROR_KEY, HttpStatus.INTERNAL_SERVER_ERROR),
Map.entry(ERROR_KEY_UNKNOWN_ERROR, HttpStatus.INTERNAL_SERVER_ERROR)); Map.entry(ERROR_KEY_UNKNOWN_ERROR, HttpStatus.INTERNAL_SERVER_ERROR));
@ExceptionHandler(MaxUploadSizeExceededException.class) @Override
protected ResponseEntity<Object> handleMaxUploadSizeExceededException( protected ResponseEntity<Object> handleMaxUploadSizeExceededException(
MaxUploadSizeExceededException ex, WebRequest req) { MaxUploadSizeExceededException ex,
HttpStatus status = HttpHeaders headers,
HttpStatusCode status,
WebRequest request
) {
return buildResponse(
ErrorCode.of(ERROR_KEY_PAYLOAD),
ex,
request,
HTTP_STATUS_BY_ERROR_CODE_KEY.getOrDefault( HTTP_STATUS_BY_ERROR_CODE_KEY.getOrDefault(
ERROR_KEY_PAYLOAD, HttpStatus.INTERNAL_SERVER_ERROR); ERROR_KEY_PAYLOAD, HttpStatus.INTERNAL_SERVER_ERROR
return buildResponse(ErrorCode.of(ERROR_KEY_PAYLOAD), ex, req, status); )
);
} }
@ExceptionHandler(BeanInstantiationException.class) @ExceptionHandler(BeanInstantiationException.class)

View File

@ -68,7 +68,7 @@ public class TaskCommentController {
@GetMapping(path = RestEndpoints.URL_TASK_COMMENT) @GetMapping(path = RestEndpoints.URL_TASK_COMMENT)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<TaskCommentRepresentationModel> getTaskComment( public ResponseEntity<TaskCommentRepresentationModel> getTaskComment(
@PathVariable String taskCommentId) @PathVariable("taskCommentId") String taskCommentId)
throws TaskNotFoundException, throws TaskNotFoundException,
TaskCommentNotFoundException, TaskCommentNotFoundException,
InvalidArgumentException, InvalidArgumentException,
@ -95,7 +95,7 @@ public class TaskCommentController {
@GetMapping(path = RestEndpoints.URL_TASK_COMMENTS) @GetMapping(path = RestEndpoints.URL_TASK_COMMENTS)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<TaskCommentCollectionRepresentationModel> getTaskComments( public ResponseEntity<TaskCommentCollectionRepresentationModel> getTaskComments(
@PathVariable String taskId, @PathVariable("taskId") String taskId,
HttpServletRequest request, HttpServletRequest request,
TaskCommentQueryFilterParameter filterParameter, TaskCommentQueryFilterParameter filterParameter,
TaskCommentQuerySortParameter sortParameter, TaskCommentQuerySortParameter sortParameter,
@ -138,7 +138,7 @@ public class TaskCommentController {
@DeleteMapping(path = RestEndpoints.URL_TASK_COMMENT) @DeleteMapping(path = RestEndpoints.URL_TASK_COMMENT)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskCommentRepresentationModel> deleteTaskComment( public ResponseEntity<TaskCommentRepresentationModel> deleteTaskComment(
@PathVariable String taskCommentId) @PathVariable("taskCommentId") String taskCommentId)
throws TaskNotFoundException, throws TaskNotFoundException,
TaskCommentNotFoundException, TaskCommentNotFoundException,
InvalidArgumentException, InvalidArgumentException,
@ -169,7 +169,7 @@ public class TaskCommentController {
@PutMapping(path = RestEndpoints.URL_TASK_COMMENT) @PutMapping(path = RestEndpoints.URL_TASK_COMMENT)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskCommentRepresentationModel> updateTaskComment( public ResponseEntity<TaskCommentRepresentationModel> updateTaskComment(
@PathVariable String taskCommentId, @PathVariable("taskCommentId") String taskCommentId,
@RequestBody TaskCommentRepresentationModel taskCommentRepresentationModel) @RequestBody TaskCommentRepresentationModel taskCommentRepresentationModel)
throws TaskNotFoundException, throws TaskNotFoundException,
TaskCommentNotFoundException, TaskCommentNotFoundException,
@ -209,7 +209,7 @@ public class TaskCommentController {
@PostMapping(path = RestEndpoints.URL_TASK_COMMENTS) @PostMapping(path = RestEndpoints.URL_TASK_COMMENTS)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskCommentRepresentationModel> createTaskComment( public ResponseEntity<TaskCommentRepresentationModel> createTaskComment(
@PathVariable String taskId, @PathVariable("taskId") String taskId,
@RequestBody TaskCommentRepresentationModel taskCommentRepresentationModel) @RequestBody TaskCommentRepresentationModel taskCommentRepresentationModel)
throws InvalidArgumentException, TaskNotFoundException, NotAuthorizedOnWorkbasketException { throws InvalidArgumentException, TaskNotFoundException, NotAuthorizedOnWorkbasketException {
taskCommentRepresentationModel.setTaskId(taskId); taskCommentRepresentationModel.setTaskId(taskId);

View File

@ -186,7 +186,7 @@ public class TaskController {
*/ */
@GetMapping(path = RestEndpoints.URL_TASKS_ID) @GetMapping(path = RestEndpoints.URL_TASKS_ID)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> getTask(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> getTask(@PathVariable("taskId") String taskId)
throws TaskNotFoundException, NotAuthorizedOnWorkbasketException { throws TaskNotFoundException, NotAuthorizedOnWorkbasketException {
Task task = taskService.getTask(taskId); Task task = taskService.getTask(taskId);
@ -213,7 +213,7 @@ public class TaskController {
@PostMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM) @PostMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> claimTask( public ResponseEntity<TaskRepresentationModel> claimTask(
@PathVariable String taskId, @RequestBody(required = false) String userName) @PathVariable("taskId") String taskId, @RequestBody(required = false) String userName)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidOwnerException, InvalidOwnerException,
NotAuthorizedOnWorkbasketException, NotAuthorizedOnWorkbasketException,
@ -239,7 +239,7 @@ public class TaskController {
@PostMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM_FORCE) @PostMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM_FORCE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> forceClaimTask( public ResponseEntity<TaskRepresentationModel> forceClaimTask(
@PathVariable String taskId, @RequestBody(required = false) String userName) @PathVariable("taskId") String taskId, @RequestBody(required = false) String userName)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidTaskStateException, InvalidTaskStateException,
InvalidOwnerException, InvalidOwnerException,
@ -301,7 +301,8 @@ public class TaskController {
@DeleteMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> cancelClaimTask( public ResponseEntity<TaskRepresentationModel> cancelClaimTask(
@PathVariable String taskId, @RequestParam(defaultValue = "false") boolean keepOwner) @PathVariable("taskId") String taskId,
@RequestParam(value = "keepOwner", defaultValue = "false") boolean keepOwner)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidTaskStateException, InvalidTaskStateException,
InvalidOwnerException, InvalidOwnerException,
@ -327,7 +328,8 @@ public class TaskController {
@DeleteMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM_FORCE) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID_CLAIM_FORCE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> forceCancelClaimTask( public ResponseEntity<TaskRepresentationModel> forceCancelClaimTask(
@PathVariable String taskId, @RequestParam(defaultValue = "false") boolean keepOwner) @PathVariable("taskId") String taskId,
@RequestParam(value = "keepOwner", defaultValue = "false") boolean keepOwner)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidTaskStateException, InvalidTaskStateException,
InvalidOwnerException, InvalidOwnerException,
@ -350,7 +352,8 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> requestReview(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> requestReview(
@PathVariable("taskId") String taskId)
throws InvalidTaskStateException, throws InvalidTaskStateException,
TaskNotFoundException, TaskNotFoundException,
InvalidOwnerException, InvalidOwnerException,
@ -373,7 +376,8 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW_FORCE) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_REVIEW_FORCE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> forceRequestReview(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> forceRequestReview(
@PathVariable("taskId") String taskId)
throws InvalidTaskStateException, throws InvalidTaskStateException,
TaskNotFoundException, TaskNotFoundException,
InvalidOwnerException, InvalidOwnerException,
@ -396,7 +400,8 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> requestChanges(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> requestChanges(
@PathVariable("taskId") String taskId)
throws InvalidTaskStateException, throws InvalidTaskStateException,
TaskNotFoundException, TaskNotFoundException,
InvalidOwnerException, InvalidOwnerException,
@ -419,7 +424,8 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES_FORCE) @PostMapping(path = RestEndpoints.URL_TASKS_ID_REQUEST_CHANGES_FORCE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> forceRequestChanges(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> forceRequestChanges(
@PathVariable("taskId") String taskId)
throws InvalidTaskStateException, throws InvalidTaskStateException,
TaskNotFoundException, TaskNotFoundException,
InvalidOwnerException, InvalidOwnerException,
@ -442,7 +448,8 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_COMPLETE) @PostMapping(path = RestEndpoints.URL_TASKS_ID_COMPLETE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> completeTask(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> completeTask(
@PathVariable("taskId") String taskId)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidOwnerException, InvalidOwnerException,
InvalidTaskStateException, InvalidTaskStateException,
@ -468,7 +475,8 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_COMPLETE_FORCE) @PostMapping(path = RestEndpoints.URL_TASKS_ID_COMPLETE_FORCE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> forceCompleteTask(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> forceCompleteTask(
@PathVariable("taskId") String taskId)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidOwnerException, InvalidOwnerException,
InvalidTaskStateException, InvalidTaskStateException,
@ -493,7 +501,7 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_CANCEL) @PostMapping(path = RestEndpoints.URL_TASKS_ID_CANCEL)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> cancelTask(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> cancelTask(@PathVariable("taskId") String taskId)
throws TaskNotFoundException, NotAuthorizedOnWorkbasketException, InvalidTaskStateException { throws TaskNotFoundException, NotAuthorizedOnWorkbasketException, InvalidTaskStateException {
Task cancelledTask = taskService.cancelTask(taskId); Task cancelledTask = taskService.cancelTask(taskId);
@ -514,7 +522,8 @@ public class TaskController {
*/ */
@PostMapping(path = RestEndpoints.URL_TASKS_ID_TERMINATE) @PostMapping(path = RestEndpoints.URL_TASKS_ID_TERMINATE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> terminateTask(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> terminateTask(
@PathVariable("taskId") String taskId)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidTaskStateException, InvalidTaskStateException,
NotAuthorizedException, NotAuthorizedException,
@ -542,8 +551,8 @@ public class TaskController {
@PostMapping(path = RestEndpoints.URL_TASKS_ID_TRANSFER_WORKBASKET_ID) @PostMapping(path = RestEndpoints.URL_TASKS_ID_TRANSFER_WORKBASKET_ID)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> transferTask( public ResponseEntity<TaskRepresentationModel> transferTask(
@PathVariable String taskId, @PathVariable("taskId") String taskId,
@PathVariable String workbasketId, @PathVariable("workbasketId") String workbasketId,
@RequestBody(required = false) Boolean setTransferFlag) @RequestBody(required = false) Boolean setTransferFlag)
throws TaskNotFoundException, throws TaskNotFoundException,
WorkbasketNotFoundException, WorkbasketNotFoundException,
@ -578,7 +587,7 @@ public class TaskController {
@PutMapping(path = RestEndpoints.URL_TASKS_ID) @PutMapping(path = RestEndpoints.URL_TASKS_ID)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> updateTask( public ResponseEntity<TaskRepresentationModel> updateTask(
@PathVariable(value = "taskId") String taskId, @PathVariable("taskId") String taskId,
@RequestBody TaskRepresentationModel taskRepresentationModel) @RequestBody TaskRepresentationModel taskRepresentationModel)
throws TaskNotFoundException, throws TaskNotFoundException,
ClassificationNotFoundException, ClassificationNotFoundException,
@ -624,7 +633,7 @@ public class TaskController {
@PostMapping(path = RestEndpoints.URL_TASKS_ID_SET_READ) @PostMapping(path = RestEndpoints.URL_TASKS_ID_SET_READ)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> setTaskRead( public ResponseEntity<TaskRepresentationModel> setTaskRead(
@PathVariable String taskId, @RequestBody IsReadRepresentationModel isRead) @PathVariable("taskId") String taskId, @RequestBody IsReadRepresentationModel isRead)
throws TaskNotFoundException, NotAuthorizedOnWorkbasketException { throws TaskNotFoundException, NotAuthorizedOnWorkbasketException {
Task updatedTask = taskService.setTaskRead(taskId, isRead.getIsRead()); Task updatedTask = taskService.setTaskRead(taskId, isRead.getIsRead());
@ -650,7 +659,7 @@ public class TaskController {
*/ */
@DeleteMapping(path = RestEndpoints.URL_TASKS_ID) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> deleteTask(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> deleteTask(@PathVariable("taskId") String taskId)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidTaskStateException, InvalidTaskStateException,
NotAuthorizedException, NotAuthorizedException,
@ -676,7 +685,8 @@ public class TaskController {
*/ */
@DeleteMapping(path = RestEndpoints.URL_TASKS_ID_FORCE) @DeleteMapping(path = RestEndpoints.URL_TASKS_ID_FORCE)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<TaskRepresentationModel> forceDeleteTask(@PathVariable String taskId) public ResponseEntity<TaskRepresentationModel> forceDeleteTask(
@PathVariable("taskId") String taskId)
throws TaskNotFoundException, throws TaskNotFoundException,
InvalidTaskStateException, InvalidTaskStateException,
NotAuthorizedException, NotAuthorizedException,

View File

@ -61,7 +61,7 @@ public class UserController {
*/ */
@GetMapping(RestEndpoints.URL_USERS_ID) @GetMapping(RestEndpoints.URL_USERS_ID)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<UserRepresentationModel> getUser(@PathVariable String userId) public ResponseEntity<UserRepresentationModel> getUser(@PathVariable("userId") String userId)
throws UserNotFoundException, InvalidArgumentException { throws UserNotFoundException, InvalidArgumentException {
User user = userService.getUser(userId); User user = userService.getUser(userId);
return ResponseEntity.ok(userAssembler.toModel(user)); return ResponseEntity.ok(userAssembler.toModel(user));
@ -136,7 +136,7 @@ public class UserController {
@PutMapping(RestEndpoints.URL_USERS_ID) @PutMapping(RestEndpoints.URL_USERS_ID)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<UserRepresentationModel> updateUser( public ResponseEntity<UserRepresentationModel> updateUser(
@PathVariable(value = "userId") String userId, @RequestBody UserRepresentationModel repModel) @PathVariable("userId") String userId, @RequestBody UserRepresentationModel repModel)
throws InvalidArgumentException, UserNotFoundException, NotAuthorizedException { throws InvalidArgumentException, UserNotFoundException, NotAuthorizedException {
if (!userId.equals(repModel.getUserId())) { if (!userId.equals(repModel.getUserId())) {
throw new InvalidArgumentException( throw new InvalidArgumentException(
@ -163,7 +163,7 @@ public class UserController {
*/ */
@DeleteMapping(RestEndpoints.URL_USERS_ID) @DeleteMapping(RestEndpoints.URL_USERS_ID)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<UserRepresentationModel> deleteUser(@PathVariable String userId) public ResponseEntity<UserRepresentationModel> deleteUser(@PathVariable("userId") String userId)
throws UserNotFoundException, NotAuthorizedException, InvalidArgumentException { throws UserNotFoundException, NotAuthorizedException, InvalidArgumentException {
userService.deleteUser(userId); userService.deleteUser(userId);

View File

@ -128,7 +128,7 @@ public class WorkbasketController {
@GetMapping(path = RestEndpoints.URL_WORKBASKET_ID, produces = MediaTypes.HAL_JSON_VALUE) @GetMapping(path = RestEndpoints.URL_WORKBASKET_ID, produces = MediaTypes.HAL_JSON_VALUE)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<WorkbasketRepresentationModel> getWorkbasket( public ResponseEntity<WorkbasketRepresentationModel> getWorkbasket(
@PathVariable(value = "workbasketId") String workbasketId) @PathVariable("workbasketId") String workbasketId)
throws WorkbasketNotFoundException, NotAuthorizedOnWorkbasketException { throws WorkbasketNotFoundException, NotAuthorizedOnWorkbasketException {
Workbasket workbasket = workbasketService.getWorkbasket(workbasketId); Workbasket workbasket = workbasketService.getWorkbasket(workbasketId);
@ -160,7 +160,7 @@ public class WorkbasketController {
@DeleteMapping(path = RestEndpoints.URL_WORKBASKET_ID) @DeleteMapping(path = RestEndpoints.URL_WORKBASKET_ID)
@Transactional(rollbackFor = Exception.class, noRollbackFor = WorkbasketNotFoundException.class) @Transactional(rollbackFor = Exception.class, noRollbackFor = WorkbasketNotFoundException.class)
public ResponseEntity<WorkbasketRepresentationModel> deleteWorkbasket( public ResponseEntity<WorkbasketRepresentationModel> deleteWorkbasket(
@PathVariable(value = "workbasketId") String workbasketId) @PathVariable("workbasketId") String workbasketId)
throws InvalidArgumentException, throws InvalidArgumentException,
WorkbasketNotFoundException, WorkbasketNotFoundException,
WorkbasketInUseException, WorkbasketInUseException,
@ -229,7 +229,7 @@ public class WorkbasketController {
@PutMapping(path = RestEndpoints.URL_WORKBASKET_ID) @PutMapping(path = RestEndpoints.URL_WORKBASKET_ID)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<WorkbasketRepresentationModel> updateWorkbasket( public ResponseEntity<WorkbasketRepresentationModel> updateWorkbasket(
@PathVariable(value = "workbasketId") String workbasketId, @PathVariable("workbasketId") String workbasketId,
@RequestBody WorkbasketRepresentationModel workbasketRepresentationModel) @RequestBody WorkbasketRepresentationModel workbasketRepresentationModel)
throws WorkbasketNotFoundException, throws WorkbasketNotFoundException,
NotAuthorizedException, NotAuthorizedException,
@ -267,7 +267,7 @@ public class WorkbasketController {
produces = MediaTypes.HAL_JSON_VALUE) produces = MediaTypes.HAL_JSON_VALUE)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<WorkbasketAccessItemCollectionRepresentationModel> getWorkbasketAccessItems( public ResponseEntity<WorkbasketAccessItemCollectionRepresentationModel> getWorkbasketAccessItems(
@PathVariable(value = "workbasketId") String workbasketId) @PathVariable("workbasketId") String workbasketId)
throws WorkbasketNotFoundException, throws WorkbasketNotFoundException,
NotAuthorizedException, NotAuthorizedException,
NotAuthorizedOnWorkbasketException { NotAuthorizedOnWorkbasketException {
@ -298,7 +298,7 @@ public class WorkbasketController {
@PutMapping(path = RestEndpoints.URL_WORKBASKET_ID_ACCESS_ITEMS) @PutMapping(path = RestEndpoints.URL_WORKBASKET_ID_ACCESS_ITEMS)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<WorkbasketAccessItemCollectionRepresentationModel> setWorkbasketAccessItems( public ResponseEntity<WorkbasketAccessItemCollectionRepresentationModel> setWorkbasketAccessItems(
@PathVariable(value = "workbasketId") String workbasketId, @PathVariable("workbasketId") String workbasketId,
@RequestBody WorkbasketAccessItemCollectionRepresentationModel workbasketAccessItemRepModels) @RequestBody WorkbasketAccessItemCollectionRepresentationModel workbasketAccessItemRepModels)
throws InvalidArgumentException, throws InvalidArgumentException,
WorkbasketNotFoundException, WorkbasketNotFoundException,
@ -337,7 +337,7 @@ public class WorkbasketController {
produces = MediaTypes.HAL_JSON_VALUE) produces = MediaTypes.HAL_JSON_VALUE)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<DistributionTargetsCollectionRepresentationModel> getDistributionTargets( public ResponseEntity<DistributionTargetsCollectionRepresentationModel> getDistributionTargets(
@PathVariable(value = "workbasketId") String workbasketId) @PathVariable("workbasketId") String workbasketId)
throws WorkbasketNotFoundException, NotAuthorizedOnWorkbasketException { throws WorkbasketNotFoundException, NotAuthorizedOnWorkbasketException {
List<WorkbasketSummary> distributionTargets = List<WorkbasketSummary> distributionTargets =
workbasketService.getDistributionTargets(workbasketId); workbasketService.getDistributionTargets(workbasketId);
@ -363,7 +363,7 @@ public class WorkbasketController {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<DistributionTargetsCollectionRepresentationModel> public ResponseEntity<DistributionTargetsCollectionRepresentationModel>
setDistributionTargetsForWorkbasketId( setDistributionTargetsForWorkbasketId(
@PathVariable(value = "workbasketId") String sourceWorkbasketId, @PathVariable("workbasketId") String sourceWorkbasketId,
@RequestBody List<String> targetWorkbasketIds) @RequestBody List<String> targetWorkbasketIds)
throws WorkbasketNotFoundException, throws WorkbasketNotFoundException,
NotAuthorizedException, NotAuthorizedException,
@ -391,7 +391,7 @@ public class WorkbasketController {
@DeleteMapping(path = RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION) @DeleteMapping(path = RestEndpoints.URL_WORKBASKET_ID_DISTRIBUTION)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<Void> removeDistributionTargetForWorkbasketId( public ResponseEntity<Void> removeDistributionTargetForWorkbasketId(
@PathVariable(value = "workbasketId") String targetWorkbasketId) @PathVariable("workbasketId") String targetWorkbasketId)
throws WorkbasketNotFoundException, throws WorkbasketNotFoundException,
NotAuthorizedOnWorkbasketException, NotAuthorizedOnWorkbasketException,
NotAuthorizedException { NotAuthorizedException {

View File

@ -82,7 +82,7 @@ public class WorkbasketDefinitionController {
@GetMapping(path = RestEndpoints.URL_WORKBASKET_DEFINITIONS) @GetMapping(path = RestEndpoints.URL_WORKBASKET_DEFINITIONS)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<WorkbasketDefinitionCollectionRepresentationModel> exportWorkbaskets( public ResponseEntity<WorkbasketDefinitionCollectionRepresentationModel> exportWorkbaskets(
@RequestParam(required = false) String[] domain) { @RequestParam(value = "domain", required = false) String[] domain) {
WorkbasketQuery query = workbasketService.createWorkbasketQuery(); WorkbasketQuery query = workbasketService.createWorkbasketQuery();
Optional.ofNullable(domain).ifPresent(query::domainIn); Optional.ofNullable(domain).ifPresent(query::domainIn);

View File

@ -5,6 +5,7 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
@ -15,6 +16,7 @@ import pro.taskana.classification.rest.models.ClassificationRepresentationModel;
import pro.taskana.common.rest.RestEndpoints; import pro.taskana.common.rest.RestEndpoints;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class ClassificationControllerRestDocTest extends BaseRestDocTest { class ClassificationControllerRestDocTest extends BaseRestDocTest {
@Autowired ClassificationRepresentationModelAssembler assembler; @Autowired ClassificationRepresentationModelAssembler assembler;

View File

@ -4,6 +4,7 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart;
import java.util.List; import java.util.List;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
@ -14,6 +15,7 @@ import pro.taskana.classification.rest.models.ClassificationCollectionRepresenta
import pro.taskana.common.rest.RestEndpoints; import pro.taskana.common.rest.RestEndpoints;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class ClassificationDefinitionControllerRestDocTest extends BaseRestDocTest { class ClassificationDefinitionControllerRestDocTest extends BaseRestDocTest {
@Autowired ClassificationRepresentationModelAssembler assembler; @Autowired ClassificationRepresentationModelAssembler assembler;

View File

@ -2,10 +2,12 @@ package pro.taskana.common.rest;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class AccessIdControllerRestDocTest extends BaseRestDocTest { class AccessIdControllerRestDocTest extends BaseRestDocTest {
@Test @Test

View File

@ -4,11 +4,13 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
import java.util.Map; import java.util.Map;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import pro.taskana.common.rest.models.CustomAttributesRepresentationModel; import pro.taskana.common.rest.models.CustomAttributesRepresentationModel;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class TaskanaEngineControllerRestDocTest extends BaseRestDocTest { class TaskanaEngineControllerRestDocTest extends BaseRestDocTest {
@Test @Test

View File

@ -2,11 +2,13 @@ package pro.taskana.monitor.rest;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import pro.taskana.common.rest.RestEndpoints; import pro.taskana.common.rest.RestEndpoints;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class MonitorControllerRestDocTest extends BaseRestDocTest { class MonitorControllerRestDocTest extends BaseRestDocTest {
@Test @Test

View File

@ -5,6 +5,7 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -18,6 +19,7 @@ import pro.taskana.task.rest.models.TaskCommentRepresentationModel;
import pro.taskana.testapi.security.JaasExtension; import pro.taskana.testapi.security.JaasExtension;
import pro.taskana.testapi.security.WithAccessId; import pro.taskana.testapi.security.WithAccessId;
@Disabled
@ExtendWith(JaasExtension.class) @ExtendWith(JaasExtension.class)
class TaskCommentControllerRestDocTest extends BaseRestDocTest { class TaskCommentControllerRestDocTest extends BaseRestDocTest {

View File

@ -5,6 +5,7 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -21,6 +22,7 @@ import pro.taskana.task.rest.models.TaskRepresentationModel;
import pro.taskana.testapi.security.JaasExtension; import pro.taskana.testapi.security.JaasExtension;
import pro.taskana.testapi.security.WithAccessId; import pro.taskana.testapi.security.WithAccessId;
@Disabled
@ExtendWith(JaasExtension.class) @ExtendWith(JaasExtension.class)
class TaskControllerRestDocTest extends BaseRestDocTest { class TaskControllerRestDocTest extends BaseRestDocTest {

View File

@ -5,6 +5,7 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
@ -15,6 +16,7 @@ import pro.taskana.user.api.models.User;
import pro.taskana.user.rest.assembler.UserRepresentationModelAssembler; import pro.taskana.user.rest.assembler.UserRepresentationModelAssembler;
import pro.taskana.user.rest.models.UserRepresentationModel; import pro.taskana.user.rest.models.UserRepresentationModel;
@Disabled
class UserControllerRestDocTest extends BaseRestDocTest { class UserControllerRestDocTest extends BaseRestDocTest {
@Autowired UserRepresentationModelAssembler assembler; @Autowired UserRepresentationModelAssembler assembler;
@Autowired UserService userService; @Autowired UserService userService;

View File

@ -3,11 +3,13 @@ package pro.taskana.workbasket.rest;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import pro.taskana.common.rest.RestEndpoints; import pro.taskana.common.rest.RestEndpoints;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class WorkbasketAccessItemControllerRestDocTest extends BaseRestDocTest { class WorkbasketAccessItemControllerRestDocTest extends BaseRestDocTest {
@Test @Test

View File

@ -6,6 +6,7 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.put;
import java.util.List; import java.util.List;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -24,6 +25,7 @@ import pro.taskana.workbasket.rest.assembler.WorkbasketRepresentationModelAssemb
import pro.taskana.workbasket.rest.models.WorkbasketAccessItemCollectionRepresentationModel; import pro.taskana.workbasket.rest.models.WorkbasketAccessItemCollectionRepresentationModel;
import pro.taskana.workbasket.rest.models.WorkbasketRepresentationModel; import pro.taskana.workbasket.rest.models.WorkbasketRepresentationModel;
@Disabled
@ExtendWith(JaasExtension.class) @ExtendWith(JaasExtension.class)
class WorkbasketControllerRestDocTest extends BaseRestDocTest { class WorkbasketControllerRestDocTest extends BaseRestDocTest {

View File

@ -4,6 +4,7 @@ import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuild
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart;
import java.util.List; import java.util.List;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -19,6 +20,7 @@ import pro.taskana.workbasket.rest.assembler.WorkbasketRepresentationModelAssemb
import pro.taskana.workbasket.rest.models.WorkbasketDefinitionCollectionRepresentationModel; import pro.taskana.workbasket.rest.models.WorkbasketDefinitionCollectionRepresentationModel;
import pro.taskana.workbasket.rest.models.WorkbasketDefinitionRepresentationModel; import pro.taskana.workbasket.rest.models.WorkbasketDefinitionRepresentationModel;
@Disabled
@ExtendWith(JaasExtension.class) @ExtendWith(JaasExtension.class)
class WorkbasketDefinitionControllerRestDocTest extends BaseRestDocTest { class WorkbasketDefinitionControllerRestDocTest extends BaseRestDocTest {

View File

@ -151,12 +151,6 @@
<version>${version.oracle}</version> <version>${version.oracle}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>capital.scalable</groupId>
<artifactId>spring-auto-restdocs-core</artifactId>
<version>${version.auto-restdocs}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <artifactId>spring-boot-starter-validation</artifactId>
@ -182,61 +176,6 @@
</tag> </tag>
</tags> </tags>
</configuration> </configuration>
<executions>
<execution>
<id>generate-javadoc-json</id>
<phase>validate</phase>
<goals>
<goal>javadoc-no-fork</goal>
</goals>
<configuration>
<doclet>capital.scalable.restdocs.jsondoclet.ExtractDocumentationAsJsonDoclet</doclet>
<docletArtifact>
<groupId>capital.scalable</groupId>
<artifactId>spring-auto-restdocs-json-doclet-jdk9</artifactId>
<version>${version.auto-restdocs}</version>
</docletArtifact>
<destDir>generated-javadoc-json</destDir>
<reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
<useStandardDocletOptions>false</useStandardDocletOptions>
<show>package</show>
</configuration>
</execution>
</executions>
</plugin>
<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>
</execution>
</executions>
<configuration>
<backend>html5</backend>
<doctype>book</doctype>
<attributes>
<snippets>${project.build.directory}/generated-snippets</snippets>
<doctype>book</doctype>
<icons>font</icons>
<source-highlighter>highlightjs</source-highlighter>
<toc>left</toc>
<docinfo>shared</docinfo>
<toclevels>4</toclevels>
<sectlinks/>
</attributes>
<logHandler>
<outputToConsole>false</outputToConsole>
<failIf>
<severity>ERROR</severity>
</failIf>
</logHandler>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -3,6 +3,7 @@ package pro.taskana.routing.dmn.rest;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
@ -10,6 +11,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import pro.taskana.rest.test.BaseRestDocTest; import pro.taskana.rest.test.BaseRestDocTest;
@Disabled
class DmnUploadControllerRestDocTest extends BaseRestDocTest { class DmnUploadControllerRestDocTest extends BaseRestDocTest {
private static final String EXCEL_NAME = "testExcelRouting.xlsx"; private static final String EXCEL_NAME = "testExcelRouting.xlsx";