From 1fd0922766fb3ffc54d225bbf01a1bf35348cd48 Mon Sep 17 00:00:00 2001
From: Eloy Coto
Date: Fri, 28 Jul 2023 10:04:39 +0200
Subject: [PATCH 1/4] feat: multiple authn changes
These changes are not definitive, and it's just a quick fix for a user
POC. The idea is still moving to openid.
- Using LDAP env variables in the config makes it easy for users to move
things around.
- Disable example app-config to be able to log in as multiple users.
Signed-off-by: Eloy Coto
---
hack/manifests/backstage/app-config.yaml | 6 ++++--
.../src/main/resources/application-dev.yml | 12 ++++++------
.../src/main/resources/application-local.yml | 12 ++++++------
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/hack/manifests/backstage/app-config.yaml b/hack/manifests/backstage/app-config.yaml
index e3a19bfc1..0ec97d29e 100644
--- a/hack/manifests/backstage/app-config.yaml
+++ b/hack/manifests/backstage/app-config.yaml
@@ -63,20 +63,22 @@ proxy:
changeOrigin: true
redirect: follow
cache: 'no-cache'
+ allowedHeaders:
+ - Authorization
headers:
Content-Type: 'application/json'
accept: 'application/json'
- Authorization: 'Basic dGVzdDp0ZXN0'
'/parodos-notifications':
target: 'http://notification-service:8080/api/v1'
changeOrigin: true
redirect: follow
cache: 'no-cache'
+ allowedHeaders:
+ - Authorization
headers:
Content-Type: 'application/json'
accept: 'application/json'
- Authorization: 'Basic dGVzdDp0ZXN0'
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
# Note: After experimenting with basic setup, use CI/CD to generate docs
diff --git a/workflow-service/src/main/resources/application-dev.yml b/workflow-service/src/main/resources/application-dev.yml
index d056e28dc..575255d95 100644
--- a/workflow-service/src/main/resources/application-dev.yml
+++ b/workflow-service/src/main/resources/application-dev.yml
@@ -9,12 +9,12 @@ spring:
base-dn: dc=springframework,dc=org
port: 8389
connection:
- userDNPatterns: "uid={0},ou=people"
- groupSearchBase: "ou=groups"
- url: "ldap://ldap:389/dc=parodos,dc=dev"
- passwordAttribute: "userPassword"
- managerDN: "cn=admin,dc=parodos,dc=dev"
- managerPassword: "admin"
+ userDNPatterns: "${LDAP_USERDNPATTERNS:uid={0},ou=people}"
+ groupSearchBase: "${LDAP_GROUP_SEARCH_BASE:ou=groups}"
+ url: "${LDAP_URL:ldap://ldap:389/dc=parodos,dc=dev}"
+ passwordAttribute: "${LDAP_PASSWORD_ATTRIBUTE:userPassword}"
+ managerDN: "${LDAP_MANAGER_DN:cn=admin,dc=parodos,dc=dev}"
+ managerPassword: "${LDAP_MANAGER_PASSWORD:admin}"
lifecycle:
timeout-per-shutdown-phase: "25s"
diff --git a/workflow-service/src/main/resources/application-local.yml b/workflow-service/src/main/resources/application-local.yml
index 663ddab8e..db7709c30 100644
--- a/workflow-service/src/main/resources/application-local.yml
+++ b/workflow-service/src/main/resources/application-local.yml
@@ -9,12 +9,12 @@ spring:
base-dn: dc=springframework,dc=org
port: 8389
connection:
- userDNPatterns: "uid={0},ou=people"
- groupSearchBase: "ou=groups"
- url: "ldap://localhost:8389/dc=springframework,dc=org"
- passwordAttribute: "userPassword"
- managerDN: null
- managerPassword: null
+ userDNPatterns: "${LDAP_USERDNPATTERNS:uid={0},ou=people}"
+ groupSearchBase: "${LDAP_GROUP_SEARCH_BASE:ou=groups}"
+ url: "${LDAP_URL:ldap://localhost:8389/dc=springframework,dc=org}"
+ passwordAttribute: "${LDAP_PASSWORD_ATTRIBUTE:userPassword}"
+ managerDN: "${LDAP_MANAGER_DN:}"
+ managerPassword: "${LDAP_MANAGER_PASSWORD:}"
lifecycle:
timeout-per-shutdown-phase: "25s"
cloud:
From aac25afcba5c944fcfc74193ee262287c0f00dea Mon Sep 17 00:00:00 2001
From: richardwang98
Date: Thu, 29 Jun 2023 12:39:54 -0400
Subject: [PATCH 2/4] upgrade spring-boot to 2.7.13
---
pom.xml | 2 +-
workflow-service/pom.xml | 6 ++++
.../security/LocalSecurityConfiguration.java | 9 ++----
.../security/SecurityConfiguration.java | 28 ++++++++-----------
4 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/pom.xml b/pom.xml
index 16003b0e0..90518795c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,7 @@
0.8.8
1.5
3.2.1
- 2.5.14
+ 2.7.13
0.0.34
4.13.1
3.5.13
diff --git a/workflow-service/pom.xml b/workflow-service/pom.xml
index 1d2f60d90..be0ed76f1 100644
--- a/workflow-service/pom.xml
+++ b/workflow-service/pom.xml
@@ -31,6 +31,8 @@
6.5.0.202303070854-r
2.11.0
3.1.1
+ 2021.0.7
+ 1.6.4
3.1.0
@@ -80,6 +82,10 @@
org.springframework.ldap
spring-ldap-core
+
+ org.springframework.boot
+ spring-boot-starter-data-ldap
+
com.unboundid
unboundid-ldapsdk
diff --git a/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java b/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java
index fd198ce3b..228a76dec 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java
@@ -18,7 +18,6 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.web.SecurityFilterChain;
/**
* Turn off security for Local testing only. Do not enable this profile in production
@@ -31,11 +30,9 @@
public class LocalSecurityConfiguration extends SecurityConfiguration {
@Override
- public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
- HttpSecurity httpSec = this.setHttpSecurity(http);
- httpSec.cors().disable();
- httpSec.csrf().disable();
- return httpSec.build();
+ protected void configure(HttpSecurity http) throws Exception {
+ http.cors().disable().csrf().disable();
+ super.configure(http);
}
}
\ No newline at end of file
diff --git a/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java b/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java
index e416ac75c..1ad23a803 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java
@@ -27,10 +27,9 @@
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper;
-import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
import org.springframework.stereotype.Component;
/**
@@ -45,7 +44,7 @@
@Configuration
@Profile("!local")
@DependsOn("org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor")
-public class SecurityConfiguration {
+public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Autowired
private LdapConnectionProperties ldapConnectionProperties;
@@ -53,11 +52,12 @@ public class SecurityConfiguration {
@Autowired
private SecurityProperties securityProperties;
- public HttpSecurity setHttpSecurity(HttpSecurity http) throws Exception {
- http.csrf().csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());
+ @Override
+ protected void configure(HttpSecurity http) throws Exception {
+ http.csrf().disable().cors().disable();
if (!this.securityProperties.getAuthentication()) {
- return http;
+ return;
}
// @formatter:off
@@ -75,22 +75,21 @@ public HttpSecurity setHttpSecurity(HttpSecurity http) throws Exception {
.logout()
.logoutSuccessUrl("/login").permitAll();
// @formatter:on
- return http;
}
@Bean
- public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
- HttpSecurity httpSec = this.setHttpSecurity(http);
- return httpSec.build();
+ public InetOrgPersonContextMapper userContextMapper() {
+ return new InetOrgPersonContextMapper();
}
- @Autowired
+ @Override
public void configure(AuthenticationManagerBuilder auth) throws Exception {
if (!this.securityProperties.getAuthentication()) {
return;
}
// @formatter:off
- auth.ldapAuthentication()
+ auth
+ .ldapAuthentication()
.userDetailsContextMapper(userContextMapper())
.userDnPatterns(this.ldapConnectionProperties.getUserDNPatterns())
.groupSearchBase(this.ldapConnectionProperties.getGroupSearchBase()).contextSource()
@@ -104,9 +103,4 @@ public void configure(AuthenticationManagerBuilder auth) throws Exception {
// @formatter:on
}
- @Bean
- public InetOrgPersonContextMapper userContextMapper() {
- return new InetOrgPersonContextMapper();
- }
-
}
From 53fa2dae8fce4ed94e32f3523b147255bab31a69 Mon Sep 17 00:00:00 2001
From: richardwang98
Date: Fri, 28 Jul 2023 17:45:21 -0400
Subject: [PATCH 3/4] upgrade spring to 3.1.0
---
notification-service-sdk/README.md | 2 +-
notification-service-sdk/api/openapi.yaml | 8 +-
.../docs/NotificationRecordApi.md | 4 +-
.../docs/PageNotificationRecordResponseDTO.md | 2 +-
.../docs/PageableObject.md | 2 +-
notification-service-sdk/docs/Sort.md | 15 --
notification-service-sdk/pom.xml | 2 +
.../notification/sdk/api/ApiClient.java | 39 ++-
.../notification/sdk/api/ApiException.java | 2 +-
.../notification/sdk/api/Configuration.java | 2 +-
.../parodos/notification/sdk/api/JSON.java | 2 +-
.../sdk/api/NotificationRecordApi.java | 8 +-
.../parodos/notification/sdk/api/Pair.java | 2 +-
.../notification/sdk/api/StringUtil.java | 2 +-
.../notification/sdk/api/auth/ApiKeyAuth.java | 2 +-
.../sdk/api/auth/HttpBearerAuth.java | 2 +-
.../sdk/model/AbstractOpenApiSchema.java | 4 +-
.../sdk/model/ErrorMessageDTO.java | 8 +-
.../NotificationMessageCreateRequestDTO.java | 12 +-
.../model/NotificationRecordResponseDTO.java | 20 +-
.../PageNotificationRecordResponseDTO.java | 34 +--
.../sdk/model/PageableObject.java | 24 +-
.../parodos/notification/sdk/model/Sort.java | 242 ------------------
.../notification/sdk/model/SortObject.java | 8 +-
notification-service/generated/openapi.json | 10 +-
notification-service/pom.xml | 6 +-
.../config/SecurityProperties.java | 2 +-
.../NotificationMessageController.java | 2 +-
.../NotificationRecordController.java | 2 +-
.../advice/ControllerExceptionHandler.java | 6 +-
.../jpa/entity/NotificationGroup.java | 12 +-
.../jpa/entity/NotificationMessage.java | 12 +-
.../jpa/entity/NotificationRecord.java | 20 +-
.../jpa/entity/NotificationUser.java | 18 +-
.../jpa/entity/base/AbstractEntity.java | 10 +-
.../NotificationRecordRepository.java | 2 +-
.../security/LocalSecurityConfiguration.java | 13 +-
.../security/SecurityConfiguration.java | 51 ++--
.../validation/AllowedSortFields.java | 4 +-
.../AllowedSortFieldsValidator.java | 4 +-
.../ValidNotificationMessageUserOrGroup.java | 4 +-
...tificationMessageUserOrGroupValidator.java | 4 +-
.../NotificationMessageControllerTests.java | 2 +-
.../NotificationRecordControllerTests.java | 2 +
.../AllowedSortFieldsValidatorTest.java | 2 +-
...cationMessageUserOrGroupValidatorTest.java | 2 +-
pom.xml | 8 +-
.../migrationtoolkit/GetAnalysisTask.java | 2 +-
.../MTAApplicationClientImpl.java | 3 +-
.../com/redhat/parodos/utils/RestUtils.java | 2 +-
workflow-service-sdk/api/openapi.yaml | 4 +
.../docs/WorkFlowResponseDTO.md | 1 +
workflow-service-sdk/pom.xml | 7 +-
.../redhat/parodos/sdk/invoker/ApiClient.java | 8 +-
.../parodos/sdk/invoker/ApiException.java | 2 +-
.../parodos/sdk/invoker/Configuration.java | 2 +-
.../com/redhat/parodos/sdk/invoker/Pair.java | 2 +-
.../parodos/sdk/invoker/StringUtil.java | 2 +-
.../parodos/sdk/invoker/auth/ApiKeyAuth.java | 2 +-
.../sdk/invoker/auth/HttpBearerAuth.java | 2 +-
.../sdk/model/AbstractOpenApiSchema.java | 4 +-
.../parodos/sdk/model/AccessRequestDTO.java | 6 +-
.../parodos/sdk/model/AccessResponseDTO.java | 10 +-
.../sdk/model/AccessStatusRequestDTO.java | 6 +-
.../sdk/model/AccessStatusResponseDTO.java | 6 +-
.../parodos/sdk/model/AdditionalInfo.java | 6 +-
.../parodos/sdk/model/ArgumentRequestDTO.java | 6 +-
.../parodos/sdk/model/ErrorMessageDTO.java | 10 +-
.../redhat/parodos/sdk/model/ProjectDTO.java | 10 +-
.../parodos/sdk/model/ProjectRequestDTO.java | 6 +-
.../parodos/sdk/model/ProjectResponseDTO.java | 18 +-
.../sdk/model/ProjectUserRoleResponseDTO.java | 8 +-
.../parodos/sdk/model/UserRoleRequestDTO.java | 6 +-
.../sdk/model/UserRoleResponseDTO.java | 6 +-
.../sdk/model/WorkDefinitionResponseDTO.java | 22 +-
.../model/WorkFlowCheckerTaskRequestDTO.java | 4 +-
.../sdk/model/WorkFlowContextResponseDTO.java | 6 +-
.../model/WorkFlowDefinitionResponseDTO.java | 26 +-
.../model/WorkFlowExecutionResponseDTO.java | 6 +-
.../parodos/sdk/model/WorkFlowOption.java | 14 +-
.../sdk/model/WorkFlowOptionsResponseDTO.java | 14 +-
.../WorkFlowPropertiesDefinitionDTO.java | 4 +-
.../parodos/sdk/model/WorkFlowRequestDTO.java | 12 +-
.../sdk/model/WorkFlowResponseDTO.java | 57 ++++-
.../sdk/model/WorkFlowStatusResponseDTO.java | 18 +-
.../model/WorkParameterValueRequestDTO.java | 8 +-
.../model/WorkParameterValueResponseDTO.java | 10 +-
.../parodos/sdk/model/WorkRequestDTO.java | 10 +-
.../sdk/model/WorkStatusResponseDTO.java | 14 +-
.../generated/openapi/openapi.json | 2 +-
workflow-service/pom.xml | 8 +-
.../client/NotificationSenderClient.java | 2 +-
.../common/audit/AuditEnabledEntity.java | 6 +-
.../ControllerExceptionHandler.java | 4 +-
.../parodos/common/entity/AbstractEntity.java | 8 +-
.../config/properties/SecurityProperties.java | 4 +-
.../project/controller/ProjectController.java | 4 +-
.../parodos/project/entity/Project.java | 12 +-
.../project/entity/ProjectAccessRequest.java | 14 +-
.../project/entity/ProjectUserRole.java | 16 +-
.../redhat/parodos/project/entity/Role.java | 4 +-
.../ProjectAccessStatusConverter.java | 4 +-
.../security/LocalSecurityConfiguration.java | 20 +-
.../security/SecurityConfiguration.java | 55 ++--
.../parodos/user/dto/UserResponseDTO.java | 2 +-
.../com/redhat/parodos/user/entity/User.java | 10 +-
.../WorkFlowDefinitionController.java | 2 +-
.../dto/WorkParameterValueRequestDTO.java | 2 +-
.../converter/WorkParametersConverter.java | 4 +-
.../WorkFlowCheckerMappingDefinition.java | 14 +-
.../definition/entity/WorkFlowDefinition.java | 28 +-
.../entity/WorkFlowPropertiesDefinition.java | 6 +-
.../entity/WorkFlowTaskDefinition.java | 14 +-
.../entity/WorkFlowWorkDefinition.java | 14 +-
.../controller/WorkFlowController.java | 4 +-
.../execution/entity/WorkFlowExecution.java | 16 +-
.../entity/WorkFlowExecutionContext.java | 10 +-
.../entity/WorkFlowTaskExecution.java | 8 +-
.../entity/WorkFlowTaskExecutionLog.java | 8 +-
.../converter/WorkContextConverter.java | 4 +-
.../entity/converter/WorkStatusConverter.java | 4 +-
.../repository/WorkFlowRepository.java | 2 +-
.../service/WorkFlowServiceImpl.java | 2 +-
.../validation/PublicVisibilityValidator.java | 4 +-
.../execution/validation/PubliclyVisible.java | 4 +-
.../registry/BeanWorkFlowRegistryImpl.java | 4 +-
.../controller/ProjectControllerTest.java | 6 +-
.../repository/ProjectRepositoryTest.java | 2 +-
.../user/repository/UserRepositoryTest.java | 2 +-
.../repository/WorkFlowRepositoryTest.java | 3 +-
.../PubliclyVisibleValidatorTest.java | 2 +-
131 files changed, 598 insertions(+), 764 deletions(-)
delete mode 100644 notification-service-sdk/docs/Sort.md
delete mode 100644 notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/Sort.java
diff --git a/notification-service-sdk/README.md b/notification-service-sdk/README.md
index 2356501e0..26c5e5458 100644
--- a/notification-service-sdk/README.md
+++ b/notification-service-sdk/README.md
@@ -126,7 +126,7 @@ Class | Method | HTTP request | Description
- [NotificationRecordResponseDTO](docs/NotificationRecordResponseDTO.md)
- [PageNotificationRecordResponseDTO](docs/PageNotificationRecordResponseDTO.md)
- [PageableObject](docs/PageableObject.md)
- - [Sort](docs/Sort.md)
+ - [SortObject](docs/SortObject.md)
diff --git a/notification-service-sdk/api/openapi.yaml b/notification-service-sdk/api/openapi.yaml
index 9bddb9c59..f38854757 100644
--- a/notification-service-sdk/api/openapi.yaml
+++ b/notification-service-sdk/api/openapi.yaml
@@ -66,7 +66,7 @@ paths:
minimum: 1
type: integer
style: form
- - description: "Sorting criteria in the format: property(,asc|desc). Default\
+ - description: "Sorting criteria in the format: property,(asc|desc). Default\
\ sort order is ascending. Multiple sort criteria are supported."
explode: true
in: query
@@ -398,7 +398,7 @@ components:
format: int32
type: integer
sort:
- $ref: '#/components/schemas/Sort'
+ $ref: '#/components/schemas/SortObject'
totalElements:
format: int64
type: integer
@@ -430,11 +430,11 @@ components:
paged:
type: boolean
sort:
- $ref: '#/components/schemas/Sort'
+ $ref: '#/components/schemas/SortObject'
unpaged:
type: boolean
type: object
- Sort:
+ SortObject:
example:
unsorted: true
sorted: true
diff --git a/notification-service-sdk/docs/NotificationRecordApi.md b/notification-service-sdk/docs/NotificationRecordApi.md
index f06e606b4..9444122c2 100644
--- a/notification-service-sdk/docs/NotificationRecordApi.md
+++ b/notification-service-sdk/docs/NotificationRecordApi.md
@@ -158,7 +158,7 @@ public class Example {
NotificationRecordApi apiInstance = new NotificationRecordApi(defaultClient);
Integer page = 0; // Integer | Zero-based page index (0..N)
Integer size = 100; // Integer | The size of the page to be returned
- List sort = Arrays.asList(); // List | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
+ List sort = Arrays.asList(); // List | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
String state = "ARCHIVED"; // String |
String searchTerm = "searchTerm_example"; // String |
try {
@@ -181,7 +181,7 @@ public class Example {
|------------- | ------------- | ------------- | -------------|
| **page** | **Integer**| Zero-based page index (0..N) | [optional] [default to 0] |
| **size** | **Integer**| The size of the page to be returned | [optional] [default to 100] |
-| **sort** | [**List<String>**](String.md)| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] |
+| **sort** | [**List<String>**](String.md)| Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] |
| **state** | **String**| | [optional] [enum: ARCHIVED, UNREAD] |
| **searchTerm** | **String**| | [optional] |
diff --git a/notification-service-sdk/docs/PageNotificationRecordResponseDTO.md b/notification-service-sdk/docs/PageNotificationRecordResponseDTO.md
index 1c44aebf0..b167e6db2 100644
--- a/notification-service-sdk/docs/PageNotificationRecordResponseDTO.md
+++ b/notification-service-sdk/docs/PageNotificationRecordResponseDTO.md
@@ -15,7 +15,7 @@
|**numberOfElements** | **Integer** | | [optional] |
|**pageable** | [**PageableObject**](PageableObject.md) | | [optional] |
|**size** | **Integer** | | [optional] |
-|**sort** | [**Sort**](Sort.md) | | [optional] |
+|**sort** | [**SortObject**](SortObject.md) | | [optional] |
|**totalElements** | **Long** | | [optional] |
|**totalPages** | **Integer** | | [optional] |
diff --git a/notification-service-sdk/docs/PageableObject.md b/notification-service-sdk/docs/PageableObject.md
index 3494005bd..7f9f3c632 100644
--- a/notification-service-sdk/docs/PageableObject.md
+++ b/notification-service-sdk/docs/PageableObject.md
@@ -11,7 +11,7 @@
|**pageNumber** | **Integer** | | [optional] |
|**pageSize** | **Integer** | | [optional] |
|**paged** | **Boolean** | | [optional] |
-|**sort** | [**Sort**](Sort.md) | | [optional] |
+|**sort** | [**SortObject**](SortObject.md) | | [optional] |
|**unpaged** | **Boolean** | | [optional] |
diff --git a/notification-service-sdk/docs/Sort.md b/notification-service-sdk/docs/Sort.md
deleted file mode 100644
index 9ce4665b7..000000000
--- a/notification-service-sdk/docs/Sort.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-# Sort
-
-
-## Properties
-
-| Name | Type | Description | Notes |
-|------------ | ------------- | ------------- | -------------|
-|**empty** | **Boolean** | | [optional] |
-|**sorted** | **Boolean** | | [optional] |
-|**unsorted** | **Boolean** | | [optional] |
-
-
-
diff --git a/notification-service-sdk/pom.xml b/notification-service-sdk/pom.xml
index df1b97fa5..2f329724f 100644
--- a/notification-service-sdk/pom.xml
+++ b/notification-service-sdk/pom.xml
@@ -136,6 +136,8 @@
true
true
+ true
+ true
true
com.redhat.parodos.notification.sdk
com.redhat.parodos.notification.sdk.configuration
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiClient.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiClient.java
index d7e2791d5..6228c648b 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiClient.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiClient.java
@@ -28,20 +28,42 @@
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
import java.text.DateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
+import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.net.ssl.*;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
import com.redhat.parodos.notification.sdk.api.auth.ApiKeyAuth;
import com.redhat.parodos.notification.sdk.api.auth.Authentication;
import com.redhat.parodos.notification.sdk.api.auth.HttpBasicAuth;
-import okhttp3.*;
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.Headers;
+import okhttp3.Interceptor;
+import okhttp3.MediaType;
+import okhttp3.MultipartBody;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
import okhttp3.internal.http.HttpMethod;
import okhttp3.internal.tls.OkHostnameVerifier;
import okhttp3.logging.HttpLoggingInterceptor;
@@ -499,10 +521,9 @@ public ApiClient setDebugging(boolean debugging) {
* The path of temporary folder used to store downloaded files from endpoints with
* file response. The default value is null
, i.e. using the system's
* default temporary folder.
- *
+ * @return Temporary folder path
* @see createTempFile
- * @return Temporary folder path
*/
public String getTempFolderPath() {
return tempFolderPath;
@@ -607,7 +628,7 @@ else if (param instanceof Collection) {
/**
* Formats the specified query parameter to a list containing a single {@code Pair}
* object.
- *
+ *
* Note that {@code value} must not be a collection.
* @param name The name of the parameter.
* @param value The value of the parameter.
@@ -628,7 +649,7 @@ public List parameterToPair(String name, Object value) {
/**
* Formats the specified collection query parameters to a list of {@code Pair}
* objects.
- *
+ *
* Note that the values of each of the returned Pair objects are percent-encoded.
* @param collectionFormat The collection format of the parameter.
* @param name The name of the parameter.
@@ -897,9 +918,9 @@ else if (obj instanceof String) {
/**
* Download file from the given response.
* @param response An instance of the Response object
+ * @return Downloaded file
* @throws com.redhat.parodos.notification.sdk.api.ApiException If fail to read file
* content from response and write to disk
- * @return Downloaded file
*/
public File downloadFileFromResponse(Response response) throws ApiException {
try {
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiException.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiException.java
index 997b7661c..3705651ba 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiException.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/ApiException.java
@@ -21,7 +21,7 @@
*
*/
@SuppressWarnings("serial")
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApiException extends Exception {
private int code = 0;
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Configuration.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Configuration.java
index 948858433..bb8dd390b 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Configuration.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Configuration.java
@@ -12,7 +12,7 @@
package com.redhat.parodos.notification.sdk.api;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "1.0.20-SNAPSHOT";
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/JSON.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/JSON.java
index 8266cf157..677b79acc 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/JSON.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/JSON.java
@@ -96,7 +96,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(
new com.redhat.parodos.notification.sdk.model.PageableObject.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new com.redhat.parodos.notification.sdk.model.Sort.CustomTypeAdapterFactory());
+ new com.redhat.parodos.notification.sdk.model.SortObject.CustomTypeAdapterFactory());
gson = gsonBuilder.create();
}
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/NotificationRecordApi.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/NotificationRecordApi.java
index bd8477e28..f3f945e35 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/NotificationRecordApi.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/NotificationRecordApi.java
@@ -507,7 +507,7 @@ public okhttp3.Call deleteNotificationAsync(UUID id, final ApiCallback _ca
* Build call for getNotifications
* @param page Zero-based page index (0..N) (optional, default to 0)
* @param size The size of the page to be returned (optional, default to 100)
- * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order
+ * @param sort Sorting criteria in the format: property,(asc|desc). Default sort order
* is ascending. Multiple sort criteria are supported. (optional)
* @param state (optional)
* @param searchTerm (optional)
@@ -620,7 +620,7 @@ private okhttp3.Call getNotificationsValidateBeforeCall(Integer page, Integer si
* Return a list of notification records for the user
* @param page Zero-based page index (0..N) (optional, default to 0)
* @param size The size of the page to be returned (optional, default to 100)
- * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order
+ * @param sort Sorting criteria in the format: property,(asc|desc). Default sort order
* is ascending. Multiple sort criteria are supported. (optional)
* @param state (optional)
* @param searchTerm (optional)
@@ -667,7 +667,7 @@ public PageNotificationRecordResponseDTO getNotifications(Integer page, Integer
* Return a list of notification records for the user
* @param page Zero-based page index (0..N) (optional, default to 0)
* @param size The size of the page to be returned (optional, default to 100)
- * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order
+ * @param sort Sorting criteria in the format: property,(asc|desc). Default sort order
* is ascending. Multiple sort criteria are supported. (optional)
* @param state (optional)
* @param searchTerm (optional)
@@ -715,7 +715,7 @@ public ApiResponse getNotificationsWithHttpIn
* Return a list of notification records for the user (asynchronously)
* @param page Zero-based page index (0..N) (optional, default to 0)
* @param size The size of the page to be returned (optional, default to 100)
- * @param sort Sorting criteria in the format: property(,asc|desc). Default sort order
+ * @param sort Sorting criteria in the format: property,(asc|desc). Default sort order
* is ascending. Multiple sort criteria are supported. (optional)
* @param state (optional)
* @param searchTerm (optional)
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Pair.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Pair.java
index cd5b850a0..1fb34eced 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Pair.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/Pair.java
@@ -12,7 +12,7 @@
package com.redhat.parodos.notification.sdk.api;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Pair {
private String name = "";
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/StringUtil.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/StringUtil.java
index 60773a89f..e3800f8fd 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/StringUtil.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/StringUtil.java
@@ -15,7 +15,7 @@
import java.util.Collection;
import java.util.Iterator;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class StringUtil {
/**
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/ApiKeyAuth.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/ApiKeyAuth.java
index 970e3254e..e4b5a9504 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/ApiKeyAuth.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/ApiKeyAuth.java
@@ -19,7 +19,7 @@
import com.redhat.parodos.notification.sdk.api.ApiException;
import com.redhat.parodos.notification.sdk.api.Pair;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApiKeyAuth implements Authentication {
private final String location;
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/HttpBearerAuth.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/HttpBearerAuth.java
index bb73fbfcf..436d39b39 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/HttpBearerAuth.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/api/auth/HttpBearerAuth.java
@@ -19,7 +19,7 @@
import com.redhat.parodos.notification.sdk.api.ApiException;
import com.redhat.parodos.notification.sdk.api.Pair;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HttpBearerAuth implements Authentication {
private final String scheme;
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/AbstractOpenApiSchema.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/AbstractOpenApiSchema.java
index a6d524517..0a2365518 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/AbstractOpenApiSchema.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/AbstractOpenApiSchema.java
@@ -15,14 +15,14 @@
import java.util.Map;
import java.util.Objects;
-import javax.ws.rs.core.GenericType;
+import jakarta.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
/**
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public abstract class AbstractOpenApiSchema {
// store the actual instance of the schema/object
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/ErrorMessageDTO.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/ErrorMessageDTO.java
index 7318ec92d..7f3811915 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/ErrorMessageDTO.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/ErrorMessageDTO.java
@@ -33,7 +33,7 @@
/**
* ErrorMessageDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ErrorMessageDTO {
public static final String SERIALIZED_NAME_DATE = "date";
@@ -64,7 +64,7 @@ public ErrorMessageDTO date(Date date) {
* Get date
* @return date
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getDate() {
return date;
}
@@ -83,7 +83,7 @@ public ErrorMessageDTO description(String description) {
* Get description
* @return description
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getDescription() {
return description;
}
@@ -102,7 +102,7 @@ public ErrorMessageDTO message(String message) {
* Get message
* @return message
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getMessage() {
return message;
}
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationMessageCreateRequestDTO.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationMessageCreateRequestDTO.java
index da51cfa12..f51e14692 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationMessageCreateRequestDTO.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationMessageCreateRequestDTO.java
@@ -34,7 +34,7 @@
/**
* NotificationMessageCreateRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class NotificationMessageCreateRequestDTO {
public static final String SERIALIZED_NAME_BODY = "body";
@@ -75,7 +75,7 @@ public NotificationMessageCreateRequestDTO body(String body) {
* Get body
* @return body
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getBody() {
return body;
}
@@ -102,7 +102,7 @@ public NotificationMessageCreateRequestDTO addGroupNamesItem(String groupNamesIt
* Get groupNames
* @return groupNames
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getGroupNames() {
return groupNames;
}
@@ -121,7 +121,7 @@ public NotificationMessageCreateRequestDTO messageType(String messageType) {
* Get messageType
* @return messageType
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getMessageType() {
return messageType;
}
@@ -140,7 +140,7 @@ public NotificationMessageCreateRequestDTO subject(String subject) {
* Get subject
* @return subject
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getSubject() {
return subject;
}
@@ -167,7 +167,7 @@ public NotificationMessageCreateRequestDTO addUsernamesItem(String usernamesItem
* Get usernames
* @return usernames
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getUsernames() {
return usernames;
}
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationRecordResponseDTO.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationRecordResponseDTO.java
index 51746818d..1ef33329d 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationRecordResponseDTO.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/NotificationRecordResponseDTO.java
@@ -36,7 +36,7 @@
/**
* NotificationRecordResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class NotificationRecordResponseDTO {
public static final String SERIALIZED_NAME_BODY = "body";
@@ -97,7 +97,7 @@ public NotificationRecordResponseDTO body(String body) {
* Get body
* @return body
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getBody() {
return body;
}
@@ -116,7 +116,7 @@ public NotificationRecordResponseDTO createdOn(Date createdOn) {
* Get createdOn
* @return createdOn
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getCreatedOn() {
return createdOn;
}
@@ -135,7 +135,7 @@ public NotificationRecordResponseDTO folder(String folder) {
* Get folder
* @return folder
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getFolder() {
return folder;
}
@@ -154,7 +154,7 @@ public NotificationRecordResponseDTO fromuser(String fromuser) {
* Get fromuser
* @return fromuser
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getFromuser() {
return fromuser;
}
@@ -173,7 +173,7 @@ public NotificationRecordResponseDTO id(UUID id) {
* Get id
* @return id
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getId() {
return id;
}
@@ -192,7 +192,7 @@ public NotificationRecordResponseDTO messageType(String messageType) {
* Get messageType
* @return messageType
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getMessageType() {
return messageType;
}
@@ -211,7 +211,7 @@ public NotificationRecordResponseDTO read(Boolean read) {
* Get read
* @return read
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getRead() {
return read;
}
@@ -230,7 +230,7 @@ public NotificationRecordResponseDTO subject(String subject) {
* Get subject
* @return subject
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getSubject() {
return subject;
}
@@ -257,7 +257,7 @@ public NotificationRecordResponseDTO addTagsItem(String tagsItem) {
* Get tags
* @return tags
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getTags() {
return tags;
}
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageNotificationRecordResponseDTO.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageNotificationRecordResponseDTO.java
index e7303dcb3..8fe14da34 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageNotificationRecordResponseDTO.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageNotificationRecordResponseDTO.java
@@ -35,7 +35,7 @@
/**
* PageNotificationRecordResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PageNotificationRecordResponseDTO {
public static final String SERIALIZED_NAME_CONTENT = "content";
@@ -81,7 +81,7 @@ public class PageNotificationRecordResponseDTO {
public static final String SERIALIZED_NAME_SORT = "sort";
@SerializedName(SERIALIZED_NAME_SORT)
- private Sort sort;
+ private SortObject sort;
public static final String SERIALIZED_NAME_TOTAL_ELEMENTS = "totalElements";
@@ -114,7 +114,7 @@ public PageNotificationRecordResponseDTO addContentItem(NotificationRecordRespon
* Get content
* @return content
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getContent() {
return content;
}
@@ -133,7 +133,7 @@ public PageNotificationRecordResponseDTO empty(Boolean empty) {
* Get empty
* @return empty
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getEmpty() {
return empty;
}
@@ -152,7 +152,7 @@ public PageNotificationRecordResponseDTO first(Boolean first) {
* Get first
* @return first
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getFirst() {
return first;
}
@@ -171,7 +171,7 @@ public PageNotificationRecordResponseDTO last(Boolean last) {
* Get last
* @return last
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getLast() {
return last;
}
@@ -190,7 +190,7 @@ public PageNotificationRecordResponseDTO number(Integer number) {
* Get number
* @return number
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getNumber() {
return number;
}
@@ -209,7 +209,7 @@ public PageNotificationRecordResponseDTO numberOfElements(Integer numberOfElemen
* Get numberOfElements
* @return numberOfElements
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getNumberOfElements() {
return numberOfElements;
}
@@ -228,7 +228,7 @@ public PageNotificationRecordResponseDTO pageable(PageableObject pageable) {
* Get pageable
* @return pageable
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public PageableObject getPageable() {
return pageable;
}
@@ -247,7 +247,7 @@ public PageNotificationRecordResponseDTO size(Integer size) {
* Get size
* @return size
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getSize() {
return size;
}
@@ -256,7 +256,7 @@ public void setSize(Integer size) {
this.size = size;
}
- public PageNotificationRecordResponseDTO sort(Sort sort) {
+ public PageNotificationRecordResponseDTO sort(SortObject sort) {
this.sort = sort;
return this;
@@ -266,12 +266,12 @@ public PageNotificationRecordResponseDTO sort(Sort sort) {
* Get sort
* @return sort
**/
- @javax.annotation.Nullable
- public Sort getSort() {
+ @jakarta.annotation.Nullable
+ public SortObject getSort() {
return sort;
}
- public void setSort(Sort sort) {
+ public void setSort(SortObject sort) {
this.sort = sort;
}
@@ -285,7 +285,7 @@ public PageNotificationRecordResponseDTO totalElements(Long totalElements) {
* Get totalElements
* @return totalElements
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Long getTotalElements() {
return totalElements;
}
@@ -304,7 +304,7 @@ public PageNotificationRecordResponseDTO totalPages(Integer totalPages) {
* Get totalPages
* @return totalPages
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getTotalPages() {
return totalPages;
}
@@ -448,7 +448,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
}
// validate the optional field `sort`
if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) {
- Sort.validateJsonObject(jsonObj.getAsJsonObject("sort"));
+ SortObject.validateJsonObject(jsonObj.getAsJsonObject("sort"));
}
}
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageableObject.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageableObject.java
index f7ddaf2e2..eee1460f9 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageableObject.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/PageableObject.java
@@ -32,7 +32,7 @@
/**
* PageableObject
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PageableObject {
public static final String SERIALIZED_NAME_OFFSET = "offset";
@@ -58,7 +58,7 @@ public class PageableObject {
public static final String SERIALIZED_NAME_SORT = "sort";
@SerializedName(SERIALIZED_NAME_SORT)
- private Sort sort;
+ private SortObject sort;
public static final String SERIALIZED_NAME_UNPAGED = "unpaged";
@@ -78,7 +78,7 @@ public PageableObject offset(Long offset) {
* Get offset
* @return offset
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Long getOffset() {
return offset;
}
@@ -97,7 +97,7 @@ public PageableObject pageNumber(Integer pageNumber) {
* Get pageNumber
* @return pageNumber
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getPageNumber() {
return pageNumber;
}
@@ -116,7 +116,7 @@ public PageableObject pageSize(Integer pageSize) {
* Get pageSize
* @return pageSize
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getPageSize() {
return pageSize;
}
@@ -135,7 +135,7 @@ public PageableObject paged(Boolean paged) {
* Get paged
* @return paged
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getPaged() {
return paged;
}
@@ -144,7 +144,7 @@ public void setPaged(Boolean paged) {
this.paged = paged;
}
- public PageableObject sort(Sort sort) {
+ public PageableObject sort(SortObject sort) {
this.sort = sort;
return this;
@@ -154,12 +154,12 @@ public PageableObject sort(Sort sort) {
* Get sort
* @return sort
**/
- @javax.annotation.Nullable
- public Sort getSort() {
+ @jakarta.annotation.Nullable
+ public SortObject getSort() {
return sort;
}
- public void setSort(Sort sort) {
+ public void setSort(SortObject sort) {
this.sort = sort;
}
@@ -173,7 +173,7 @@ public PageableObject unpaged(Boolean unpaged) {
* Get unpaged
* @return unpaged
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getUnpaged() {
return unpaged;
}
@@ -273,7 +273,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
}
// validate the optional field `sort`
if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) {
- Sort.validateJsonObject(jsonObj.getAsJsonObject("sort"));
+ SortObject.validateJsonObject(jsonObj.getAsJsonObject("sort"));
}
}
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/Sort.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/Sort.java
deleted file mode 100644
index fef6e251b..000000000
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/Sort.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Parodos Notification Service API
- * This is the API documentation for the Parodos Notification Service. It provides operations to send out and check notification. The endpoints are secured with oAuth2/OpenID and cannot be accessed without a valid token.
- *
- * The version of the OpenAPI document: v1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.redhat.parodos.notification.sdk.model;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Set;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.TypeAdapter;
-import com.google.gson.TypeAdapterFactory;
-import com.google.gson.annotations.SerializedName;
-import com.google.gson.reflect.TypeToken;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-import com.redhat.parodos.notification.sdk.api.JSON;
-
-/**
- * Sort
- */
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class Sort {
-
- public static final String SERIALIZED_NAME_EMPTY = "empty";
-
- @SerializedName(SERIALIZED_NAME_EMPTY)
- private Boolean empty;
-
- public static final String SERIALIZED_NAME_SORTED = "sorted";
-
- @SerializedName(SERIALIZED_NAME_SORTED)
- private Boolean sorted;
-
- public static final String SERIALIZED_NAME_UNSORTED = "unsorted";
-
- @SerializedName(SERIALIZED_NAME_UNSORTED)
- private Boolean unsorted;
-
- public Sort() {
- }
-
- public Sort empty(Boolean empty) {
-
- this.empty = empty;
- return this;
- }
-
- /**
- * Get empty
- * @return empty
- **/
- @javax.annotation.Nullable
- public Boolean getEmpty() {
- return empty;
- }
-
- public void setEmpty(Boolean empty) {
- this.empty = empty;
- }
-
- public Sort sorted(Boolean sorted) {
-
- this.sorted = sorted;
- return this;
- }
-
- /**
- * Get sorted
- * @return sorted
- **/
- @javax.annotation.Nullable
- public Boolean getSorted() {
- return sorted;
- }
-
- public void setSorted(Boolean sorted) {
- this.sorted = sorted;
- }
-
- public Sort unsorted(Boolean unsorted) {
-
- this.unsorted = unsorted;
- return this;
- }
-
- /**
- * Get unsorted
- * @return unsorted
- **/
- @javax.annotation.Nullable
- public Boolean getUnsorted() {
- return unsorted;
- }
-
- public void setUnsorted(Boolean unsorted) {
- this.unsorted = unsorted;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- Sort sort = (Sort) o;
- return Objects.equals(this.empty, sort.empty) && Objects.equals(this.sorted, sort.sorted)
- && Objects.equals(this.unsorted, sort.unsorted);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(empty, sorted, unsorted);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class Sort {\n");
- sb.append(" empty: ").append(toIndentedString(empty)).append("\n");
- sb.append(" sorted: ").append(toIndentedString(sorted)).append("\n");
- sb.append(" unsorted: ").append(toIndentedString(unsorted)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the
- * first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
- public static HashSet openapiFields;
-
- public static HashSet openapiRequiredFields;
-
- static {
- // a set of all properties/fields (JSON key names)
- openapiFields = new HashSet();
- openapiFields.add("empty");
- openapiFields.add("sorted");
- openapiFields.add("unsorted");
-
- // a set of required properties/fields (JSON key names)
- openapiRequiredFields = new HashSet();
- }
-
- /**
- * Validates the JSON Object and throws an exception if issues found
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to Sort
- */
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!Sort.openapiRequiredFields.isEmpty()) { // has required fields but JSON
- // object is null
- throw new IllegalArgumentException(
- String.format("The required field(s) %s in Sort is not found in the empty JSON string",
- Sort.openapiRequiredFields.toString()));
- }
- }
-
- Set> entries = jsonObj.entrySet();
- // check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
- if (!Sort.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(
- "The field `%s` in the JSON string is not defined in the `Sort` properties. JSON: %s",
- entry.getKey(), jsonObj.toString()));
- }
- }
- }
-
- public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
-
- @SuppressWarnings("unchecked")
- @Override
- public TypeAdapter create(Gson gson, TypeToken type) {
- if (!Sort.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'Sort' and its subtypes
- }
- final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(Sort.class));
-
- return (TypeAdapter) new TypeAdapter() {
- @Override
- public void write(JsonWriter out, Sort value) throws IOException {
- JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
- elementAdapter.write(out, obj);
- }
-
- @Override
- public Sort read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
- }
-
- }.nullSafe();
- }
-
- }
-
- /**
- * Create an instance of Sort given an JSON string
- * @param jsonString JSON string
- * @return An instance of Sort
- * @throws IOException if the JSON string is invalid with respect to Sort
- */
- public static Sort fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, Sort.class);
- }
-
- /**
- * Convert an instance of Sort to an JSON string
- * @return JSON string
- */
- public String toJson() {
- return JSON.getGson().toJson(this);
- }
-
-}
diff --git a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/SortObject.java b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/SortObject.java
index 9d88d7413..8eca4ca4c 100644
--- a/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/SortObject.java
+++ b/notification-service-sdk/src/main/java/com/redhat/parodos/notification/sdk/model/SortObject.java
@@ -32,7 +32,7 @@
/**
* SortObject
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SortObject {
public static final String SERIALIZED_NAME_EMPTY = "empty";
@@ -63,7 +63,7 @@ public SortObject empty(Boolean empty) {
* Get empty
* @return empty
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getEmpty() {
return empty;
}
@@ -82,7 +82,7 @@ public SortObject sorted(Boolean sorted) {
* Get sorted
* @return sorted
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getSorted() {
return sorted;
}
@@ -101,7 +101,7 @@ public SortObject unsorted(Boolean unsorted) {
* Get unsorted
* @return unsorted
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getUnsorted() {
return unsorted;
}
diff --git a/notification-service/generated/openapi.json b/notification-service/generated/openapi.json
index f30c96a08..e695efcb8 100644
--- a/notification-service/generated/openapi.json
+++ b/notification-service/generated/openapi.json
@@ -1,8 +1,8 @@
{
"openapi" : "3.0.1",
"info" : {
- "title" : "Parodos Notification Service API",
"description" : "This is the API documentation for the Parodos Notification Service. It provides operations to send out and check notification. The endpoints are secured with oAuth2/OpenID and cannot be accessed without a valid token.",
+ "title" : "Parodos Notification Service API",
"version" : "v1.0.0"
},
"servers" : [ {
@@ -82,7 +82,7 @@
"default" : 100
}
}, {
- "description" : "Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
+ "description" : "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"in" : "query",
"name" : "sort",
"required" : false,
@@ -437,7 +437,7 @@
"format" : "int32"
},
"sort" : {
- "$ref" : "#/components/schemas/Sort"
+ "$ref" : "#/components/schemas/SortObject"
},
"totalElements" : {
"type" : "integer",
@@ -468,14 +468,14 @@
"type" : "boolean"
},
"sort" : {
- "$ref" : "#/components/schemas/Sort"
+ "$ref" : "#/components/schemas/SortObject"
},
"unpaged" : {
"type" : "boolean"
}
}
},
- "Sort" : {
+ "SortObject" : {
"type" : "object",
"properties" : {
"empty" : {
diff --git a/notification-service/pom.xml b/notification-service/pom.xml
index 3d1f8b3cc..7e97ab8ac 100644
--- a/notification-service/pom.xml
+++ b/notification-service/pom.xml
@@ -79,7 +79,7 @@
org.springdoc
- springdoc-openapi-ui
+ springdoc-openapi-starter-webmvc-ui
${springdoc-openapi-ui.version}
@@ -142,8 +142,8 @@
test
- javax.validation
- validation-api
+ jakarta.validation
+ jakarta.validation-api
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/config/SecurityProperties.java b/notification-service/src/main/java/com/redhat/parodos/notification/config/SecurityProperties.java
index 0237772aa..bc96ade52 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/config/SecurityProperties.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/config/SecurityProperties.java
@@ -10,6 +10,6 @@
@Data
public class SecurityProperties {
- Boolean authentication;
+ private boolean authentication;
}
\ No newline at end of file
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationMessageController.java b/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationMessageController.java
index 9ff36c495..8d3f699e5 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationMessageController.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationMessageController.java
@@ -15,7 +15,7 @@
*/
package com.redhat.parodos.notification.controller;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.redhat.parodos.notification.dto.NotificationMessageCreateRequestDTO;
import com.redhat.parodos.notification.service.NotificationMessageService;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationRecordController.java b/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationRecordController.java
index 1ed5ac048..50821bd8c 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationRecordController.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/controller/NotificationRecordController.java
@@ -29,7 +29,7 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springdoc.api.annotations.ParameterObject;
+import org.springdoc.core.annotations.ParameterObject;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/controller/advice/ControllerExceptionHandler.java b/notification-service/src/main/java/com/redhat/parodos/notification/controller/advice/ControllerExceptionHandler.java
index b48e9db28..2ff5c3d72 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/controller/advice/ControllerExceptionHandler.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/controller/advice/ControllerExceptionHandler.java
@@ -4,9 +4,9 @@
import java.util.Set;
import java.util.stream.Collectors;
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.ConstraintViolation;
+import jakarta.validation.ConstraintViolationException;
import com.redhat.parodos.notification.exceptions.NotificationRecordNotFoundException;
import com.redhat.parodos.notification.exceptions.UnsupportedStateException;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationGroup.java b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationGroup.java
index 77c2afe0c..4c3e25001 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationGroup.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationGroup.java
@@ -18,12 +18,12 @@
import java.util.ArrayList;
import java.util.List;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.ManyToMany;
-import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.ManyToMany;
+import jakarta.persistence.Table;
+import jakarta.validation.constraints.NotNull;
import com.redhat.parodos.notification.jpa.entity.base.AbstractEntity;
import lombok.Getter;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationMessage.java b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationMessage.java
index 3cdf602b6..02c2258a3 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationMessage.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationMessage.java
@@ -18,12 +18,12 @@
import java.time.Instant;
import java.util.List;
-import javax.persistence.Column;
-import javax.persistence.ElementCollection;
-import javax.persistence.Entity;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
+import jakarta.persistence.Column;
+import jakarta.persistence.ElementCollection;
+import jakarta.persistence.Entity;
+import jakarta.persistence.OneToOne;
+import jakarta.persistence.Table;
+import jakarta.validation.constraints.NotNull;
import com.redhat.parodos.notification.jpa.entity.base.AbstractEntity;
import lombok.Getter;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationRecord.java b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationRecord.java
index df2c3260a..dd0a415e9 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationRecord.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationRecord.java
@@ -18,16 +18,16 @@
import java.util.ArrayList;
import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.ElementCollection;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.ElementCollection;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.JoinTable;
+import jakarta.persistence.ManyToMany;
+import jakarta.persistence.OneToOne;
+import jakarta.persistence.Table;
import com.redhat.parodos.notification.jpa.entity.base.AbstractEntity;
import lombok.Data;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationUser.java b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationUser.java
index 1578bb2ea..2d9b88fab 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationUser.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/NotificationUser.java
@@ -18,15 +18,15 @@
import java.util.ArrayList;
import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.JoinTable;
+import jakarta.persistence.ManyToMany;
+import jakarta.persistence.Table;
+import jakarta.validation.constraints.NotNull;
import com.redhat.parodos.notification.jpa.entity.base.AbstractEntity;
import lombok.AllArgsConstructor;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/base/AbstractEntity.java b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/base/AbstractEntity.java
index a3e296d43..c77ed2762 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/base/AbstractEntity.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/entity/base/AbstractEntity.java
@@ -17,11 +17,11 @@
import java.util.UUID;
-import javax.persistence.Column;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.MappedSuperclass;
-import javax.persistence.Version;
+import jakarta.persistence.Column;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
+import jakarta.persistence.MappedSuperclass;
+import jakarta.persistence.Version;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/repository/NotificationRecordRepository.java b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/repository/NotificationRecordRepository.java
index 98ad5d635..615e3ef4e 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/jpa/repository/NotificationRecordRepository.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/jpa/repository/NotificationRecordRepository.java
@@ -50,7 +50,7 @@ Page findByFolderAndNotificationUserListContaining(String fo
+ " (LOWER(notificationRecord.notificationMessage.body) LIKE %:searchTerm% OR "
+ " LOWER(notificationRecord.notificationMessage.messageType) LIKE %:searchTerm% OR "
+ " LOWER(notificationRecord.notificationMessage.subject) LIKE %:searchTerm%) AND "
- + " :user member notificationRecord.notificationUserList ")
+ + " :user IN (notificationRecord.notificationUserList) ")
Page search(@Param("user") NotificationUser user, @Param("searchTerm") String searchTerm,
Pageable pageable);
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/security/LocalSecurityConfiguration.java b/notification-service/src/main/java/com/redhat/parodos/notification/security/LocalSecurityConfiguration.java
index 8156571fc..9916984a1 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/security/LocalSecurityConfiguration.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/security/LocalSecurityConfiguration.java
@@ -15,21 +15,24 @@
*/
package com.redhat.parodos.notification.security;
+import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.web.SecurityFilterChain;
@Profile("local")
@Configuration
+@EnableWebSecurity
public class LocalSecurityConfiguration extends SecurityConfiguration {
@Override
- public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
- HttpSecurity httpSec = this.setHttpSecurity(http);
- httpSec.cors().disable();
- httpSec.csrf().disable();
- return httpSec.build();
+ @Bean
+ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+ http.csrf(AbstractHttpConfigurer::disable).cors(AbstractHttpConfigurer::disable);
+ return super.filterChain(http);
}
}
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/security/SecurityConfiguration.java b/notification-service/src/main/java/com/redhat/parodos/notification/security/SecurityConfiguration.java
index ee1cf1c4d..059d7e4b2 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/security/SecurityConfiguration.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/security/SecurityConfiguration.java
@@ -26,9 +26,11 @@
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper;
import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
import org.springframework.stereotype.Component;
/**
@@ -37,7 +39,6 @@
* application.yml file
*
* @author Luke Shannon (Github: lshannon)
- *
*/
@Component
@@ -52,41 +53,39 @@ public class SecurityConfiguration {
@Autowired
private SecurityProperties securityProperties;
- public HttpSecurity setHttpSecurity(HttpSecurity http) throws Exception {
- // @formatter:off
- http
- .csrf()
- .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse());
- if (!securityProperties.getAuthentication()) {
- return http;
+ @Bean
+ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+ http.csrf(AbstractHttpConfigurer::disable).cors(AbstractHttpConfigurer::disable);
+
+ if (!this.securityProperties.isAuthentication()) {
+ return http.build();
}
+ // @formatter:off
http
- .authorizeRequests()
- .mvcMatchers(HttpMethod.OPTIONS, "/**")
- .permitAll()
- .mvcMatchers("/api/**")
- .fullyAuthenticated()
- .and()
- .httpBasic(Customizer.withDefaults())
- .headers().frameOptions().disable()
- .and()
- .formLogin(form -> form.loginProcessingUrl("/login"))
- .logout()
- .logoutSuccessUrl("/login").permitAll();
+ .authorizeHttpRequests(auth ->auth
+ .requestMatchers(HttpMethod.OPTIONS, "/**")
+ .permitAll()
+ .requestMatchers("/api/**")
+ .fullyAuthenticated()
+ .anyRequest().permitAll())
+ .httpBasic(Customizer.withDefaults())
+ .headers(httpSecurityHeadersConfigurer -> httpSecurityHeadersConfigurer.frameOptions(HeadersConfigurer.FrameOptionsConfig::disable))
+ .formLogin(form -> form.loginProcessingUrl("/login"))
+ .logout(httpSecurityLogoutConfigurer -> httpSecurityLogoutConfigurer
+ .logoutSuccessUrl("/login").permitAll());
// @formatter:on
- return http;
+ return http.build();
}
@Bean
- public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
- HttpSecurity httpSec = this.setHttpSecurity(http);
- return httpSec.build();
+ public InetOrgPersonContextMapper userContextMapper() {
+ return new InetOrgPersonContextMapper();
}
@Autowired
public void configure(AuthenticationManagerBuilder auth) throws Exception {
- if (!securityProperties.getAuthentication()) {
+ if (!securityProperties.isAuthentication()) {
return;
}
// @formatter:off
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFields.java b/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFields.java
index 1353a0443..a577c1947 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFields.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFields.java
@@ -6,8 +6,8 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
+import jakarta.validation.Constraint;
+import jakarta.validation.Payload;
@Documented
@Constraint(validatedBy = { AllowedSortFieldsValidator.class })
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidator.java b/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidator.java
index bfc8b23ed..444938ee3 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidator.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidator.java
@@ -3,8 +3,8 @@
import java.util.List;
import java.util.stream.Collectors;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
+import jakarta.validation.ConstraintValidator;
+import jakarta.validation.ConstraintValidatorContext;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroup.java b/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroup.java
index 3d35bc4b4..1f725408c 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroup.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroup.java
@@ -6,8 +6,8 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
+import jakarta.validation.Constraint;
+import jakarta.validation.Payload;
@Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
diff --git a/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidator.java b/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidator.java
index 492f5c983..66fca05cb 100644
--- a/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidator.java
+++ b/notification-service/src/main/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidator.java
@@ -1,7 +1,7 @@
package com.redhat.parodos.notification.validation;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
+import jakarta.validation.ConstraintValidator;
+import jakarta.validation.ConstraintValidatorContext;
import com.redhat.parodos.notification.dto.NotificationMessageCreateRequestDTO;
diff --git a/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationMessageControllerTests.java b/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationMessageControllerTests.java
index 2ea7af09d..fb2d92317 100644
--- a/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationMessageControllerTests.java
+++ b/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationMessageControllerTests.java
@@ -20,7 +20,7 @@
import java.util.List;
import java.util.Optional;
-import javax.transaction.Transactional;
+import jakarta.transaction.Transactional;
import com.redhat.parodos.notification.dto.NotificationMessageCreateRequestDTO;
import com.redhat.parodos.notification.jpa.NotificationsDataCreator;
diff --git a/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationRecordControllerTests.java b/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationRecordControllerTests.java
index 615020d65..cb39bef60 100644
--- a/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationRecordControllerTests.java
+++ b/notification-service/src/test/java/com/redhat/parodos/notification/controller/NotificationRecordControllerTests.java
@@ -37,6 +37,7 @@
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.http.MediaType;
+import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
@@ -163,6 +164,7 @@ public void failCountNoAuth() throws Exception {
}
@Test
+ @WithMockUser
public void failCountMissingState() throws Exception {
// given
int count = 4;
diff --git a/notification-service/src/test/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidatorTest.java b/notification-service/src/test/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidatorTest.java
index 3164ede32..2a35e066e 100644
--- a/notification-service/src/test/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidatorTest.java
+++ b/notification-service/src/test/java/com/redhat/parodos/notification/validation/AllowedSortFieldsValidatorTest.java
@@ -1,6 +1,6 @@
package com.redhat.parodos.notification.validation;
-import javax.validation.ConstraintValidatorContext;
+import jakarta.validation.ConstraintValidatorContext;
import org.junit.Before;
import org.junit.Test;
diff --git a/notification-service/src/test/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidatorTest.java b/notification-service/src/test/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidatorTest.java
index 46edded80..7f458de2e 100644
--- a/notification-service/src/test/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidatorTest.java
+++ b/notification-service/src/test/java/com/redhat/parodos/notification/validation/ValidNotificationMessageUserOrGroupValidatorTest.java
@@ -2,7 +2,7 @@
import java.util.List;
-import javax.validation.ConstraintValidatorContext;
+import jakarta.validation.ConstraintValidatorContext;
import com.redhat.parodos.notification.dto.NotificationMessageCreateRequestDTO;
import org.junit.Before;
diff --git a/pom.xml b/pom.xml
index 90518795c..ed00e56ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,17 +54,17 @@
0.8.8
1.5
3.2.1
- 2.7.13
+ 3.1.0
0.0.34
4.13.1
3.5.13
3.17.2
4.9.2
6.6.0
- 1.6.5
- 2020.0.6
+ 2.1.0
+ 2022.0.3
1.8.5
- 1.28
+ 2.0
workflow-engine
diff --git a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/GetAnalysisTask.java b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/GetAnalysisTask.java
index b0ba0ab21..dcb4a5d3c 100644
--- a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/GetAnalysisTask.java
+++ b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/GetAnalysisTask.java
@@ -5,7 +5,7 @@
import java.util.List;
import java.util.Objects;
-import javax.inject.Inject;
+import jakarta.inject.Inject;
import com.redhat.parodos.infrastructure.Notifier;
import com.redhat.parodos.workflow.exception.MissingParameterException;
diff --git a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/MTAApplicationClientImpl.java b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/MTAApplicationClientImpl.java
index 252d174c1..63a647c3c 100644
--- a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/MTAApplicationClientImpl.java
+++ b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/migrationtoolkit/MTAApplicationClientImpl.java
@@ -16,7 +16,8 @@
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
-import javax.ws.rs.NotFoundException;
+
+import jakarta.ws.rs.NotFoundException;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.type.TypeReference;
diff --git a/prebuilt-tasks/src/main/java/com/redhat/parodos/utils/RestUtils.java b/prebuilt-tasks/src/main/java/com/redhat/parodos/utils/RestUtils.java
index 6554c00c2..5aa8f5af7 100644
--- a/prebuilt-tasks/src/main/java/com/redhat/parodos/utils/RestUtils.java
+++ b/prebuilt-tasks/src/main/java/com/redhat/parodos/utils/RestUtils.java
@@ -121,7 +121,7 @@ public static RestTemplate ignoreSSLVerifyRestTemplate() {
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
- requestFactory.setHttpClient(httpClient);
+ // requestFactory.setHttpClient(httpClient);
return new RestTemplate(requestFactory);
}
catch (NoSuchAlgorithmException | KeyStoreException | KeyManagementException e) {
diff --git a/workflow-service-sdk/api/openapi.yaml b/workflow-service-sdk/api/openapi.yaml
index 84282ff4d..7983604f2 100644
--- a/workflow-service-sdk/api/openapi.yaml
+++ b/workflow-service-sdk/api/openapi.yaml
@@ -1737,6 +1737,7 @@ components:
type: object
WorkFlowResponseDTO:
example:
+ originalExecutionId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
workStatus: FAILED
additionalInfos:
- value: value
@@ -1759,6 +1760,9 @@ components:
type: string
executeBy:
type: string
+ originalExecutionId:
+ format: uuid
+ type: string
projectId:
format: uuid
type: string
diff --git a/workflow-service-sdk/docs/WorkFlowResponseDTO.md b/workflow-service-sdk/docs/WorkFlowResponseDTO.md
index 4092986d5..5beaa5745 100644
--- a/workflow-service-sdk/docs/WorkFlowResponseDTO.md
+++ b/workflow-service-sdk/docs/WorkFlowResponseDTO.md
@@ -10,6 +10,7 @@
|**additionalInfos** | [**List<AdditionalInfo>**](AdditionalInfo.md) | | [optional] |
|**endDate** | **String** | | [optional] |
|**executeBy** | **String** | | [optional] |
+|**originalExecutionId** | **UUID** | | [optional] |
|**projectId** | **UUID** | | [optional] |
|**startDate** | **String** | | [optional] |
|**workFlowExecutionId** | **UUID** | | [optional] |
diff --git a/workflow-service-sdk/pom.xml b/workflow-service-sdk/pom.xml
index 7b88b102b..c05908c12 100644
--- a/workflow-service-sdk/pom.xml
+++ b/workflow-service-sdk/pom.xml
@@ -137,6 +137,8 @@
true
true
+ true
+ true
true
com.redhat.parodos.sdk
com.redhat.parodos.sdk.configuration
@@ -176,8 +178,9 @@
${gson-fire-version}
- javax.validation
- validation-api
+ jakarta.annotation
+ jakarta.annotation-api
+ provided
jakarta.ws.rs
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiClient.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiClient.java
index 29424de8d..fadf631dd 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiClient.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiClient.java
@@ -36,7 +36,13 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.net.ssl.*;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
import com.redhat.parodos.sdk.invoker.auth.ApiKeyAuth;
import com.redhat.parodos.sdk.invoker.auth.Authentication;
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiException.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiException.java
index 410431a48..1c01c1281 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiException.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/ApiException.java
@@ -21,7 +21,7 @@
*
*/
@SuppressWarnings("serial")
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApiException extends Exception {
private int code = 0;
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Configuration.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Configuration.java
index 1ca02f184..3c56baed9 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Configuration.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Configuration.java
@@ -12,7 +12,7 @@
package com.redhat.parodos.sdk.invoker;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "1.0.20-SNAPSHOT";
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Pair.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Pair.java
index 7b6833e71..ca05860bd 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Pair.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/Pair.java
@@ -12,7 +12,7 @@
package com.redhat.parodos.sdk.invoker;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Pair {
private String name = "";
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/StringUtil.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/StringUtil.java
index 6b4b454ea..c686be9ce 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/StringUtil.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/StringUtil.java
@@ -15,7 +15,7 @@
import java.util.Collection;
import java.util.Iterator;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class StringUtil {
/**
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/ApiKeyAuth.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/ApiKeyAuth.java
index 799a67321..1de4e95fa 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/ApiKeyAuth.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/ApiKeyAuth.java
@@ -19,7 +19,7 @@
import com.redhat.parodos.sdk.invoker.ApiException;
import com.redhat.parodos.sdk.invoker.Pair;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApiKeyAuth implements Authentication {
private final String location;
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/HttpBearerAuth.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/HttpBearerAuth.java
index fee3fa69c..90c4bd863 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/HttpBearerAuth.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/invoker/auth/HttpBearerAuth.java
@@ -19,7 +19,7 @@
import com.redhat.parodos.sdk.invoker.ApiException;
import com.redhat.parodos.sdk.invoker.Pair;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HttpBearerAuth implements Authentication {
private final String scheme;
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AbstractOpenApiSchema.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AbstractOpenApiSchema.java
index b82f6a0e9..cd793b887 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AbstractOpenApiSchema.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AbstractOpenApiSchema.java
@@ -15,14 +15,14 @@
import java.util.Map;
import java.util.Objects;
-import javax.ws.rs.core.GenericType;
+import jakarta.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
/**
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public abstract class AbstractOpenApiSchema {
// store the actual instance of the schema/object
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessRequestDTO.java
index e7b536c4d..5394f1b3c 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessRequestDTO.java
@@ -33,7 +33,7 @@
/**
* AccessRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AccessRequestDTO {
/**
@@ -112,7 +112,7 @@ public AccessRequestDTO role(RoleEnum role) {
* Get role
* @return role
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public RoleEnum getRole() {
return role;
}
@@ -131,7 +131,7 @@ public AccessRequestDTO username(String username) {
* Get username
* @return username
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getUsername() {
return username;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessResponseDTO.java
index 58e0ca0af..c77912f19 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessResponseDTO.java
@@ -35,7 +35,7 @@
/**
* AccessResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AccessResponseDTO {
public static final String SERIALIZED_NAME_ACCESS_REQUEST_ID = "accessRequestId";
@@ -71,7 +71,7 @@ public AccessResponseDTO accessRequestId(UUID accessRequestId) {
* Get accessRequestId
* @return accessRequestId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getAccessRequestId() {
return accessRequestId;
}
@@ -98,7 +98,7 @@ public AccessResponseDTO addApprovalSentToItem(String approvalSentToItem) {
* Get approvalSentTo
* @return approvalSentTo
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getApprovalSentTo() {
return approvalSentTo;
}
@@ -117,7 +117,7 @@ public AccessResponseDTO escalationSentTo(String escalationSentTo) {
* Get escalationSentTo
* @return escalationSentTo
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getEscalationSentTo() {
return escalationSentTo;
}
@@ -136,7 +136,7 @@ public AccessResponseDTO project(ProjectDTO project) {
* Get project
* @return project
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public ProjectDTO getProject() {
return project;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusRequestDTO.java
index b5c40c04d..09ff04a10 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusRequestDTO.java
@@ -33,7 +33,7 @@
/**
* AccessStatusRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AccessStatusRequestDTO {
public static final String SERIALIZED_NAME_COMMENT = "comment";
@@ -112,7 +112,7 @@ public AccessStatusRequestDTO comment(String comment) {
* Get comment
* @return comment
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getComment() {
return comment;
}
@@ -131,7 +131,7 @@ public AccessStatusRequestDTO status(StatusEnum status) {
* Get status
* @return status
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public StatusEnum getStatus() {
return status;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusResponseDTO.java
index 247bfd3c5..a98b27972 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AccessStatusResponseDTO.java
@@ -34,7 +34,7 @@
/**
* AccessStatusResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AccessStatusResponseDTO {
public static final String SERIALIZED_NAME_ACCESS_REQUEST_ID = "accessRequestId";
@@ -113,7 +113,7 @@ public AccessStatusResponseDTO accessRequestId(UUID accessRequestId) {
* Get accessRequestId
* @return accessRequestId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getAccessRequestId() {
return accessRequestId;
}
@@ -132,7 +132,7 @@ public AccessStatusResponseDTO status(StatusEnum status) {
* Get status
* @return status
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public StatusEnum getStatus() {
return status;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AdditionalInfo.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AdditionalInfo.java
index b4bf33177..66c36ba1c 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AdditionalInfo.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/AdditionalInfo.java
@@ -32,7 +32,7 @@
/**
* AdditionalInfo
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AdditionalInfo {
public static final String SERIALIZED_NAME_KEY = "key";
@@ -58,7 +58,7 @@ public AdditionalInfo key(String key) {
* Get key
* @return key
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getKey() {
return key;
}
@@ -77,7 +77,7 @@ public AdditionalInfo value(String value) {
* Get value
* @return value
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getValue() {
return value;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ArgumentRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ArgumentRequestDTO.java
index 8d3dfcd06..8781203a0 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ArgumentRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ArgumentRequestDTO.java
@@ -32,7 +32,7 @@
/**
* ArgumentRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ArgumentRequestDTO {
public static final String SERIALIZED_NAME_KEY = "key";
@@ -58,7 +58,7 @@ public ArgumentRequestDTO key(String key) {
* Get key
* @return key
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getKey() {
return key;
}
@@ -77,7 +77,7 @@ public ArgumentRequestDTO value(String value) {
* Get value
* @return value
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getValue() {
return value;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ErrorMessageDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ErrorMessageDTO.java
index 216b5464b..25f56f892 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ErrorMessageDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ErrorMessageDTO.java
@@ -33,7 +33,7 @@
/**
* ErrorMessageDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ErrorMessageDTO {
public static final String SERIALIZED_NAME_DATE = "date";
@@ -69,7 +69,7 @@ public ErrorMessageDTO date(Date date) {
* Get date
* @return date
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getDate() {
return date;
}
@@ -88,7 +88,7 @@ public ErrorMessageDTO description(String description) {
* Get description
* @return description
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getDescription() {
return description;
}
@@ -107,7 +107,7 @@ public ErrorMessageDTO message(String message) {
* Get message
* @return message
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getMessage() {
return message;
}
@@ -126,7 +126,7 @@ public ErrorMessageDTO status(Integer status) {
* Get status
* @return status
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getStatus() {
return status;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectDTO.java
index a597aaf0d..ee90ca917 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectDTO.java
@@ -34,7 +34,7 @@
/**
* ProjectDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ProjectDTO {
public static final String SERIALIZED_NAME_CREATED_BY = "createdBy";
@@ -70,7 +70,7 @@ public ProjectDTO createdBy(String createdBy) {
* Get createdBy
* @return createdBy
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getCreatedBy() {
return createdBy;
}
@@ -89,7 +89,7 @@ public ProjectDTO createdDate(Date createdDate) {
* Get createdDate
* @return createdDate
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getCreatedDate() {
return createdDate;
}
@@ -108,7 +108,7 @@ public ProjectDTO id(UUID id) {
* Get id
* @return id
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getId() {
return id;
}
@@ -127,7 +127,7 @@ public ProjectDTO name(String name) {
* Get name
* @return name
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getName() {
return name;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectRequestDTO.java
index 75a312fee..4416e38f1 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectRequestDTO.java
@@ -32,7 +32,7 @@
/**
* ProjectRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ProjectRequestDTO {
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@@ -58,7 +58,7 @@ public ProjectRequestDTO description(String description) {
* Get description
* @return description
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getDescription() {
return description;
}
@@ -77,7 +77,7 @@ public ProjectRequestDTO name(String name) {
* Get name
* @return name
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getName() {
return name;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectResponseDTO.java
index ca51018fc..8c81733e3 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectResponseDTO.java
@@ -34,7 +34,7 @@
/**
* ProjectResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ProjectResponseDTO {
public static final String SERIALIZED_NAME_ACCESS_ROLE = "accessRole";
@@ -90,7 +90,7 @@ public ProjectResponseDTO accessRole(String accessRole) {
* Get accessRole
* @return accessRole
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getAccessRole() {
return accessRole;
}
@@ -109,7 +109,7 @@ public ProjectResponseDTO createdBy(String createdBy) {
* Get createdBy
* @return createdBy
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getCreatedBy() {
return createdBy;
}
@@ -128,7 +128,7 @@ public ProjectResponseDTO createdDate(Date createdDate) {
* Get createdDate
* @return createdDate
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getCreatedDate() {
return createdDate;
}
@@ -147,7 +147,7 @@ public ProjectResponseDTO description(String description) {
* Get description
* @return description
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getDescription() {
return description;
}
@@ -166,7 +166,7 @@ public ProjectResponseDTO id(UUID id) {
* Get id
* @return id
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getId() {
return id;
}
@@ -185,7 +185,7 @@ public ProjectResponseDTO modifiedBy(String modifiedBy) {
* Get modifiedBy
* @return modifiedBy
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getModifiedBy() {
return modifiedBy;
}
@@ -204,7 +204,7 @@ public ProjectResponseDTO modifiedDate(Date modifiedDate) {
* Get modifiedDate
* @return modifiedDate
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getModifiedDate() {
return modifiedDate;
}
@@ -223,7 +223,7 @@ public ProjectResponseDTO name(String name) {
* Get name
* @return name
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getName() {
return name;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectUserRoleResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectUserRoleResponseDTO.java
index a29e71adf..7d6372e16 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectUserRoleResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/ProjectUserRoleResponseDTO.java
@@ -36,7 +36,7 @@
/**
* ProjectUserRoleResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ProjectUserRoleResponseDTO {
public static final String SERIALIZED_NAME_ID = "id";
@@ -67,7 +67,7 @@ public ProjectUserRoleResponseDTO id(UUID id) {
* Get id
* @return id
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getId() {
return id;
}
@@ -86,7 +86,7 @@ public ProjectUserRoleResponseDTO projectName(String projectName) {
* Get projectName
* @return projectName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getProjectName() {
return projectName;
}
@@ -113,7 +113,7 @@ public ProjectUserRoleResponseDTO addUserResponseDTOListItem(UserRoleResponseDTO
* Get userResponseDTOList
* @return userResponseDTOList
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getUserResponseDTOList() {
return userResponseDTOList;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleRequestDTO.java
index 2d635343f..f615b33aa 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleRequestDTO.java
@@ -35,7 +35,7 @@
/**
* UserRoleRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class UserRoleRequestDTO {
/**
@@ -122,7 +122,7 @@ public UserRoleRequestDTO addRolesItem(RolesEnum rolesItem) {
* Get roles
* @return roles
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getRoles() {
return roles;
}
@@ -141,7 +141,7 @@ public UserRoleRequestDTO username(String username) {
* Get username
* @return username
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getUsername() {
return username;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleResponseDTO.java
index fa17cc658..27bfa4624 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/UserRoleResponseDTO.java
@@ -34,7 +34,7 @@
/**
* UserRoleResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class UserRoleResponseDTO {
/**
@@ -121,7 +121,7 @@ public UserRoleResponseDTO addRolesItem(RolesEnum rolesItem) {
* Get roles
* @return roles
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Set getRoles() {
return roles;
}
@@ -140,7 +140,7 @@ public UserRoleResponseDTO username(String username) {
* Get username
* @return username
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getUsername() {
return username;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkDefinitionResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkDefinitionResponseDTO.java
index 49506d146..b09fc68be 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkDefinitionResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkDefinitionResponseDTO.java
@@ -40,7 +40,7 @@
/**
* WorkDefinitionResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkDefinitionResponseDTO {
public static final String SERIALIZED_NAME_AUTHOR = "author";
@@ -267,7 +267,7 @@ public WorkDefinitionResponseDTO author(String author) {
* Get author
* @return author
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getAuthor() {
return author;
}
@@ -286,7 +286,7 @@ public WorkDefinitionResponseDTO cronExpression(String cronExpression) {
* Get cronExpression
* @return cronExpression
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getCronExpression() {
return cronExpression;
}
@@ -305,7 +305,7 @@ public WorkDefinitionResponseDTO id(UUID id) {
* Get id
* @return id
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getId() {
return id;
}
@@ -324,7 +324,7 @@ public WorkDefinitionResponseDTO name(String name) {
* Get name
* @return name
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getName() {
return name;
}
@@ -351,7 +351,7 @@ public WorkDefinitionResponseDTO addOutputsItem(OutputsEnum outputsItem) {
* Get outputs
* @return outputs
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getOutputs() {
return outputs;
}
@@ -378,7 +378,7 @@ public WorkDefinitionResponseDTO putParametersItem(String key, Map> getParameters() {
return parameters;
}
@@ -397,7 +397,7 @@ public WorkDefinitionResponseDTO processingType(ProcessingTypeEnum processingTyp
* Get processingType
* @return processingType
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public ProcessingTypeEnum getProcessingType() {
return processingType;
}
@@ -416,7 +416,7 @@ public WorkDefinitionResponseDTO workFlowCheckerMappingDefinitionId(UUID workFlo
* Get workFlowCheckerMappingDefinitionId
* @return workFlowCheckerMappingDefinitionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getWorkFlowCheckerMappingDefinitionId() {
return workFlowCheckerMappingDefinitionId;
}
@@ -435,7 +435,7 @@ public WorkDefinitionResponseDTO workType(WorkTypeEnum workType) {
* Get workType
* @return workType
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public WorkTypeEnum getWorkType() {
return workType;
}
@@ -462,7 +462,7 @@ public WorkDefinitionResponseDTO addWorksItem(WorkDefinitionResponseDTO worksIte
* Get works
* @return works
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Set getWorks() {
return works;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowCheckerTaskRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowCheckerTaskRequestDTO.java
index de72fc469..001d3b0aa 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowCheckerTaskRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowCheckerTaskRequestDTO.java
@@ -33,7 +33,7 @@
/**
* WorkFlowCheckerTaskRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowCheckerTaskRequestDTO {
/**
@@ -111,7 +111,7 @@ public WorkFlowCheckerTaskRequestDTO status(StatusEnum status) {
* Get status
* @return status
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public StatusEnum getStatus() {
return status;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowContextResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowContextResponseDTO.java
index 81489ebe7..d87413e96 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowContextResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowContextResponseDTO.java
@@ -33,7 +33,7 @@
/**
* WorkFlowContextResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowContextResponseDTO {
public static final String SERIALIZED_NAME_WORK_FLOW_EXECUTION_ID = "workFlowExecutionId";
@@ -59,7 +59,7 @@ public WorkFlowContextResponseDTO workFlowExecutionId(UUID workFlowExecutionId)
* Get workFlowExecutionId
* @return workFlowExecutionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getWorkFlowExecutionId() {
return workFlowExecutionId;
}
@@ -78,7 +78,7 @@ public WorkFlowContextResponseDTO workFlowOptions(WorkFlowOptionsResponseDTO wor
* Get workFlowOptions
* @return workFlowOptions
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public WorkFlowOptionsResponseDTO getWorkFlowOptions() {
return workFlowOptions;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowDefinitionResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowDefinitionResponseDTO.java
index 6464fac1b..16938db53 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowDefinitionResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowDefinitionResponseDTO.java
@@ -39,7 +39,7 @@
/**
* WorkFlowDefinitionResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowDefinitionResponseDTO {
public static final String SERIALIZED_NAME_AUTHOR = "author";
@@ -223,7 +223,7 @@ public WorkFlowDefinitionResponseDTO author(String author) {
* Get author
* @return author
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getAuthor() {
return author;
}
@@ -242,7 +242,7 @@ public WorkFlowDefinitionResponseDTO createDate(Date createDate) {
* Get createDate
* @return createDate
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getCreateDate() {
return createDate;
}
@@ -261,7 +261,7 @@ public WorkFlowDefinitionResponseDTO cronExpression(String cronExpression) {
* Get cronExpression
* @return cronExpression
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getCronExpression() {
return cronExpression;
}
@@ -280,7 +280,7 @@ public WorkFlowDefinitionResponseDTO fallbackWorkflow(String fallbackWorkflow) {
* Get fallbackWorkflow
* @return fallbackWorkflow
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getFallbackWorkflow() {
return fallbackWorkflow;
}
@@ -299,7 +299,7 @@ public WorkFlowDefinitionResponseDTO id(UUID id) {
* Get id
* @return id
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getId() {
return id;
}
@@ -318,7 +318,7 @@ public WorkFlowDefinitionResponseDTO modifyDate(Date modifyDate) {
* Get modifyDate
* @return modifyDate
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Date getModifyDate() {
return modifyDate;
}
@@ -337,7 +337,7 @@ public WorkFlowDefinitionResponseDTO name(String name) {
* Get name
* @return name
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getName() {
return name;
}
@@ -364,7 +364,7 @@ public WorkFlowDefinitionResponseDTO putParametersItem(String key, Map> getParameters() {
return parameters;
}
@@ -383,7 +383,7 @@ public WorkFlowDefinitionResponseDTO processingType(ProcessingTypeEnum processin
* Get processingType
* @return processingType
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public ProcessingTypeEnum getProcessingType() {
return processingType;
}
@@ -402,7 +402,7 @@ public WorkFlowDefinitionResponseDTO properties(WorkFlowPropertiesDefinitionDTO
* Get properties
* @return properties
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public WorkFlowPropertiesDefinitionDTO getProperties() {
return properties;
}
@@ -421,7 +421,7 @@ public WorkFlowDefinitionResponseDTO type(TypeEnum type) {
* Get type
* @return type
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public TypeEnum getType() {
return type;
}
@@ -448,7 +448,7 @@ public WorkFlowDefinitionResponseDTO addWorksItem(WorkDefinitionResponseDTO work
* Get works
* @return works
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Set getWorks() {
return works;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowExecutionResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowExecutionResponseDTO.java
index 3e8430cd1..8b5b08f77 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowExecutionResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowExecutionResponseDTO.java
@@ -34,7 +34,7 @@
/**
* WorkFlowExecutionResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowExecutionResponseDTO {
public static final String SERIALIZED_NAME_WORK_FLOW_EXECUTION_ID = "workFlowExecutionId";
@@ -117,7 +117,7 @@ public WorkFlowExecutionResponseDTO workFlowExecutionId(UUID workFlowExecutionId
* Get workFlowExecutionId
* @return workFlowExecutionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getWorkFlowExecutionId() {
return workFlowExecutionId;
}
@@ -136,7 +136,7 @@ public WorkFlowExecutionResponseDTO workStatus(WorkStatusEnum workStatus) {
* Get workStatus
* @return workStatus
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public WorkStatusEnum getWorkStatus() {
return workStatus;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOption.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOption.java
index 42ac3f72d..acef43ead 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOption.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOption.java
@@ -34,7 +34,7 @@
/**
* WorkFlowOption
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowOption {
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@@ -80,7 +80,7 @@ public WorkFlowOption description(String description) {
* Get description
* @return description
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getDescription() {
return description;
}
@@ -107,7 +107,7 @@ public WorkFlowOption addDetailsItem(String detailsItem) {
* Get details
* @return details
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getDetails() {
return details;
}
@@ -126,7 +126,7 @@ public WorkFlowOption displayName(String displayName) {
* Get displayName
* @return displayName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getDisplayName() {
return displayName;
}
@@ -145,7 +145,7 @@ public WorkFlowOption identifier(String identifier) {
* Get identifier
* @return identifier
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getIdentifier() {
return identifier;
}
@@ -164,7 +164,7 @@ public WorkFlowOption recommended(Boolean recommended) {
* Get recommended
* @return recommended
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Boolean getRecommended() {
return recommended;
}
@@ -183,7 +183,7 @@ public WorkFlowOption workFlowName(String workFlowName) {
* Get workFlowName
* @return workFlowName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getWorkFlowName() {
return workFlowName;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOptionsResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOptionsResponseDTO.java
index 0c0566600..b7d6bc6b2 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOptionsResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowOptionsResponseDTO.java
@@ -35,7 +35,7 @@
/**
* WorkFlowOptionsResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowOptionsResponseDTO {
public static final String SERIALIZED_NAME_CONTINUATION_OPTIONS = "continuationOptions";
@@ -89,7 +89,7 @@ public WorkFlowOptionsResponseDTO addContinuationOptionsItem(WorkFlowOption cont
* Get continuationOptions
* @return continuationOptions
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getContinuationOptions() {
return continuationOptions;
}
@@ -108,7 +108,7 @@ public WorkFlowOptionsResponseDTO currentVersion(WorkFlowOption currentVersion)
* Get currentVersion
* @return currentVersion
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public WorkFlowOption getCurrentVersion() {
return currentVersion;
}
@@ -135,7 +135,7 @@ public WorkFlowOptionsResponseDTO addMigrationOptionsItem(WorkFlowOption migrati
* Get migrationOptions
* @return migrationOptions
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getMigrationOptions() {
return migrationOptions;
}
@@ -162,7 +162,7 @@ public WorkFlowOptionsResponseDTO addNewOptionsItem(WorkFlowOption newOptionsIte
* Get newOptions
* @return newOptions
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getNewOptions() {
return newOptions;
}
@@ -189,7 +189,7 @@ public WorkFlowOptionsResponseDTO addOtherOptionsItem(WorkFlowOption otherOption
* Get otherOptions
* @return otherOptions
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getOtherOptions() {
return otherOptions;
}
@@ -216,7 +216,7 @@ public WorkFlowOptionsResponseDTO addUpgradeOptionsItem(WorkFlowOption upgradeOp
* Get upgradeOptions
* @return upgradeOptions
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getUpgradeOptions() {
return upgradeOptions;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowPropertiesDefinitionDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowPropertiesDefinitionDTO.java
index 2c083c477..9c5b94846 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowPropertiesDefinitionDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowPropertiesDefinitionDTO.java
@@ -32,7 +32,7 @@
/**
* WorkFlowPropertiesDefinitionDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowPropertiesDefinitionDTO {
public static final String SERIALIZED_NAME_VERSION = "version";
@@ -53,7 +53,7 @@ public WorkFlowPropertiesDefinitionDTO version(String version) {
* Get version
* @return version
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getVersion() {
return version;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowRequestDTO.java
index cd04fa2dc..f913c5d17 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowRequestDTO.java
@@ -36,7 +36,7 @@
/**
* WorkFlowRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowRequestDTO {
public static final String SERIALIZED_NAME_ARGUMENTS = "arguments";
@@ -85,7 +85,7 @@ public WorkFlowRequestDTO addArgumentsItem(ArgumentRequestDTO argumentsItem) {
* Get arguments
* @return arguments
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getArguments() {
return arguments;
}
@@ -104,7 +104,7 @@ public WorkFlowRequestDTO invokingExecutionId(UUID invokingExecutionId) {
* Get invokingExecutionId
* @return invokingExecutionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getInvokingExecutionId() {
return invokingExecutionId;
}
@@ -123,7 +123,7 @@ public WorkFlowRequestDTO projectId(UUID projectId) {
* Get projectId
* @return projectId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getProjectId() {
return projectId;
}
@@ -142,7 +142,7 @@ public WorkFlowRequestDTO workFlowName(String workFlowName) {
* Get workFlowName
* @return workFlowName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getWorkFlowName() {
return workFlowName;
}
@@ -169,7 +169,7 @@ public WorkFlowRequestDTO addWorksItem(WorkRequestDTO worksItem) {
* Get works
* @return works
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getWorks() {
return works;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowResponseDTO.java
index dc04c63ab..75890879f 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowResponseDTO.java
@@ -37,7 +37,7 @@
/**
* WorkFlowResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowResponseDTO {
public static final String SERIALIZED_NAME_ADDITIONAL_INFOS = "additionalInfos";
@@ -55,6 +55,11 @@ public class WorkFlowResponseDTO {
@SerializedName(SERIALIZED_NAME_EXECUTE_BY)
private String executeBy;
+ public static final String SERIALIZED_NAME_ORIGINAL_EXECUTION_ID = "originalExecutionId";
+
+ @SerializedName(SERIALIZED_NAME_ORIGINAL_EXECUTION_ID)
+ private UUID originalExecutionId;
+
public static final String SERIALIZED_NAME_PROJECT_ID = "projectId";
@SerializedName(SERIALIZED_NAME_PROJECT_ID)
@@ -218,7 +223,7 @@ public WorkFlowResponseDTO addAdditionalInfosItem(AdditionalInfo additionalInfos
* Get additionalInfos
* @return additionalInfos
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getAdditionalInfos() {
return additionalInfos;
}
@@ -237,7 +242,7 @@ public WorkFlowResponseDTO endDate(String endDate) {
* Get endDate
* @return endDate
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getEndDate() {
return endDate;
}
@@ -256,7 +261,7 @@ public WorkFlowResponseDTO executeBy(String executeBy) {
* Get executeBy
* @return executeBy
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getExecuteBy() {
return executeBy;
}
@@ -265,6 +270,25 @@ public void setExecuteBy(String executeBy) {
this.executeBy = executeBy;
}
+ public WorkFlowResponseDTO originalExecutionId(UUID originalExecutionId) {
+
+ this.originalExecutionId = originalExecutionId;
+ return this;
+ }
+
+ /**
+ * Get originalExecutionId
+ * @return originalExecutionId
+ **/
+ @jakarta.annotation.Nullable
+ public UUID getOriginalExecutionId() {
+ return originalExecutionId;
+ }
+
+ public void setOriginalExecutionId(UUID originalExecutionId) {
+ this.originalExecutionId = originalExecutionId;
+ }
+
public WorkFlowResponseDTO projectId(UUID projectId) {
this.projectId = projectId;
@@ -275,7 +299,7 @@ public WorkFlowResponseDTO projectId(UUID projectId) {
* Get projectId
* @return projectId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getProjectId() {
return projectId;
}
@@ -294,7 +318,7 @@ public WorkFlowResponseDTO startDate(String startDate) {
* Get startDate
* @return startDate
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getStartDate() {
return startDate;
}
@@ -313,7 +337,7 @@ public WorkFlowResponseDTO workFlowExecutionId(UUID workFlowExecutionId) {
* Get workFlowExecutionId
* @return workFlowExecutionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getWorkFlowExecutionId() {
return workFlowExecutionId;
}
@@ -332,7 +356,7 @@ public WorkFlowResponseDTO workFlowName(String workFlowName) {
* Get workFlowName
* @return workFlowName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getWorkFlowName() {
return workFlowName;
}
@@ -351,7 +375,7 @@ public WorkFlowResponseDTO workFlowType(WorkFlowTypeEnum workFlowType) {
* Get workFlowType
* @return workFlowType
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public WorkFlowTypeEnum getWorkFlowType() {
return workFlowType;
}
@@ -370,7 +394,7 @@ public WorkFlowResponseDTO workStatus(WorkStatusEnum workStatus) {
* Get workStatus
* @return workStatus
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public WorkStatusEnum getWorkStatus() {
return workStatus;
}
@@ -391,6 +415,7 @@ public boolean equals(Object o) {
return Objects.equals(this.additionalInfos, workFlowResponseDTO.additionalInfos)
&& Objects.equals(this.endDate, workFlowResponseDTO.endDate)
&& Objects.equals(this.executeBy, workFlowResponseDTO.executeBy)
+ && Objects.equals(this.originalExecutionId, workFlowResponseDTO.originalExecutionId)
&& Objects.equals(this.projectId, workFlowResponseDTO.projectId)
&& Objects.equals(this.startDate, workFlowResponseDTO.startDate)
&& Objects.equals(this.workFlowExecutionId, workFlowResponseDTO.workFlowExecutionId)
@@ -401,8 +426,8 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(additionalInfos, endDate, executeBy, projectId, startDate, workFlowExecutionId,
- workFlowName, workFlowType, workStatus);
+ return Objects.hash(additionalInfos, endDate, executeBy, originalExecutionId, projectId, startDate,
+ workFlowExecutionId, workFlowName, workFlowType, workStatus);
}
@Override
@@ -412,6 +437,7 @@ public String toString() {
sb.append(" additionalInfos: ").append(toIndentedString(additionalInfos)).append("\n");
sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
sb.append(" executeBy: ").append(toIndentedString(executeBy)).append("\n");
+ sb.append(" originalExecutionId: ").append(toIndentedString(originalExecutionId)).append("\n");
sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
sb.append(" workFlowExecutionId: ").append(toIndentedString(workFlowExecutionId)).append("\n");
@@ -443,6 +469,7 @@ private String toIndentedString(Object o) {
openapiFields.add("additionalInfos");
openapiFields.add("endDate");
openapiFields.add("executeBy");
+ openapiFields.add("originalExecutionId");
openapiFields.add("projectId");
openapiFields.add("startDate");
openapiFields.add("workFlowExecutionId");
@@ -509,6 +536,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
"Expected the field `executeBy` to be a primitive type in the JSON string but got `%s`",
jsonObj.get("executeBy").toString()));
}
+ if ((jsonObj.get("originalExecutionId") != null && !jsonObj.get("originalExecutionId").isJsonNull())
+ && !jsonObj.get("originalExecutionId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(
+ "Expected the field `originalExecutionId` to be a primitive type in the JSON string but got `%s`",
+ jsonObj.get("originalExecutionId").toString()));
+ }
if ((jsonObj.get("projectId") != null && !jsonObj.get("projectId").isJsonNull())
&& !jsonObj.get("projectId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowStatusResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowStatusResponseDTO.java
index 910bb2d95..700f1a6d8 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowStatusResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkFlowStatusResponseDTO.java
@@ -37,7 +37,7 @@
/**
* WorkFlowStatusResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkFlowStatusResponseDTO {
public static final String SERIALIZED_NAME_FALLBACK_EXECUTION_ID = "fallbackExecutionId";
@@ -150,7 +150,7 @@ public WorkFlowStatusResponseDTO fallbackExecutionId(UUID fallbackExecutionId) {
* Get fallbackExecutionId
* @return fallbackExecutionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getFallbackExecutionId() {
return fallbackExecutionId;
}
@@ -169,7 +169,7 @@ public WorkFlowStatusResponseDTO message(String message) {
* Get message
* @return message
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getMessage() {
return message;
}
@@ -188,7 +188,7 @@ public WorkFlowStatusResponseDTO originalExecutionId(UUID originalExecutionId) {
* Get originalExecutionId
* @return originalExecutionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getOriginalExecutionId() {
return originalExecutionId;
}
@@ -207,7 +207,7 @@ public WorkFlowStatusResponseDTO restartedCount(Integer restartedCount) {
* Get restartedCount
* @return restartedCount
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public Integer getRestartedCount() {
return restartedCount;
}
@@ -226,7 +226,7 @@ public WorkFlowStatusResponseDTO status(StatusEnum status) {
* Get status
* @return status
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public StatusEnum getStatus() {
return status;
}
@@ -245,7 +245,7 @@ public WorkFlowStatusResponseDTO workFlowExecutionId(UUID workFlowExecutionId) {
* Get workFlowExecutionId
* @return workFlowExecutionId
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public UUID getWorkFlowExecutionId() {
return workFlowExecutionId;
}
@@ -264,7 +264,7 @@ public WorkFlowStatusResponseDTO workFlowName(String workFlowName) {
* Get workFlowName
* @return workFlowName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getWorkFlowName() {
return workFlowName;
}
@@ -291,7 +291,7 @@ public WorkFlowStatusResponseDTO addWorksItem(WorkStatusResponseDTO worksItem) {
* Get works
* @return works
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getWorks() {
return works;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueRequestDTO.java
index 1431fddc2..fb19c9fe6 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueRequestDTO.java
@@ -32,7 +32,7 @@
/**
* WorkParameterValueRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkParameterValueRequestDTO {
public static final String SERIALIZED_NAME_KEY = "key";
@@ -63,7 +63,7 @@ public WorkParameterValueRequestDTO key(String key) {
* Get key
* @return key
**/
- @javax.annotation.Nonnull
+ @jakarta.annotation.Nonnull
public String getKey() {
return key;
}
@@ -82,7 +82,7 @@ public WorkParameterValueRequestDTO value(String value) {
* Get value
* @return value
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getValue() {
return value;
}
@@ -101,7 +101,7 @@ public WorkParameterValueRequestDTO workName(String workName) {
* Get workName
* @return workName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getWorkName() {
return workName;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueResponseDTO.java
index 73b0e6a9b..bbe22506e 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkParameterValueResponseDTO.java
@@ -34,7 +34,7 @@
/**
* WorkParameterValueResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkParameterValueResponseDTO {
public static final String SERIALIZED_NAME_KEY = "key";
@@ -70,7 +70,7 @@ public WorkParameterValueResponseDTO key(String key) {
* Get key
* @return key
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getKey() {
return key;
}
@@ -97,7 +97,7 @@ public WorkParameterValueResponseDTO addOptionsItem(String optionsItem) {
* Get options
* @return options
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getOptions() {
return options;
}
@@ -116,7 +116,7 @@ public WorkParameterValueResponseDTO propertyPath(String propertyPath) {
* Get propertyPath
* @return propertyPath
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getPropertyPath() {
return propertyPath;
}
@@ -135,7 +135,7 @@ public WorkParameterValueResponseDTO value(String value) {
* Get value
* @return value
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getValue() {
return value;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkRequestDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkRequestDTO.java
index 1d61e8607..e56103fe2 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkRequestDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkRequestDTO.java
@@ -36,7 +36,7 @@
/**
* WorkRequestDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkRequestDTO {
public static final String SERIALIZED_NAME_ARGUMENTS = "arguments";
@@ -133,7 +133,7 @@ public WorkRequestDTO addArgumentsItem(ArgumentRequestDTO argumentsItem) {
* Get arguments
* @return arguments
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getArguments() {
return arguments;
}
@@ -152,7 +152,7 @@ public WorkRequestDTO type(TypeEnum type) {
* Get type
* @return type
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public TypeEnum getType() {
return type;
}
@@ -171,7 +171,7 @@ public WorkRequestDTO workName(String workName) {
* Get workName
* @return workName
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getWorkName() {
return workName;
}
@@ -198,7 +198,7 @@ public WorkRequestDTO addWorksItem(WorkRequestDTO worksItem) {
* Get works
* @return works
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getWorks() {
return works;
}
diff --git a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkStatusResponseDTO.java b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkStatusResponseDTO.java
index 060937baf..266b83b78 100644
--- a/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkStatusResponseDTO.java
+++ b/workflow-service-sdk/src/main/java/com/redhat/parodos/sdk/model/WorkStatusResponseDTO.java
@@ -36,7 +36,7 @@
/**
* WorkStatusResponseDTO
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WorkStatusResponseDTO {
public static final String SERIALIZED_NAME_ALERT_MESSAGE = "alertMessage";
@@ -192,7 +192,7 @@ public WorkStatusResponseDTO alertMessage(String alertMessage) {
* Get alertMessage
* @return alertMessage
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getAlertMessage() {
return alertMessage;
}
@@ -211,7 +211,7 @@ public WorkStatusResponseDTO message(String message) {
* Get message
* @return message
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getMessage() {
return message;
}
@@ -230,7 +230,7 @@ public WorkStatusResponseDTO name(String name) {
* Get name
* @return name
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public String getName() {
return name;
}
@@ -249,7 +249,7 @@ public WorkStatusResponseDTO status(StatusEnum status) {
* Get status
* @return status
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public StatusEnum getStatus() {
return status;
}
@@ -268,7 +268,7 @@ public WorkStatusResponseDTO type(TypeEnum type) {
* Get type
* @return type
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public TypeEnum getType() {
return type;
}
@@ -295,7 +295,7 @@ public WorkStatusResponseDTO addWorksItem(WorkStatusResponseDTO worksItem) {
* Get works
* @return works
**/
- @javax.annotation.Nullable
+ @jakarta.annotation.Nullable
public List getWorks() {
return works;
}
diff --git a/workflow-service/generated/openapi/openapi.json b/workflow-service/generated/openapi/openapi.json
index 82af2aac8..3002277a9 100644
--- a/workflow-service/generated/openapi/openapi.json
+++ b/workflow-service/generated/openapi/openapi.json
@@ -1,8 +1,8 @@
{
"openapi" : "3.0.1",
"info" : {
- "title" : "Parodos Workflow Service API",
"description" : "This is the API documentation for the Parodos Workflow Service. It provides operations to execute assessments to determine infrastructure options (tooling + environments). Also executes infrastructure task workflows to call downstream systems to stand-up an infrastructure option.",
+ "title" : "Parodos Workflow Service API",
"version" : "v1.0.0"
},
"servers" : [ {
diff --git a/workflow-service/pom.xml b/workflow-service/pom.xml
index be0ed76f1..f90f0f37f 100644
--- a/workflow-service/pom.xml
+++ b/workflow-service/pom.xml
@@ -31,9 +31,7 @@
6.5.0.202303070854-r
2.11.0
3.1.1
- 2021.0.7
- 1.6.4
- 3.1.0
+ 3.5.0
@@ -110,7 +108,7 @@
io.hypersistence
- hypersistence-utils-hibernate-52
+ hypersistence-utils-hibernate-62
${hypersistence-utils.version}
@@ -138,7 +136,7 @@
org.springdoc
- springdoc-openapi-ui
+ springdoc-openapi-starter-webmvc-ui
${springdoc-openapi-ui.version}
diff --git a/workflow-service/src/main/java/com/redhat/parodos/client/NotificationSenderClient.java b/workflow-service/src/main/java/com/redhat/parodos/client/NotificationSenderClient.java
index 3bfcf1f45..72f527e27 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/client/NotificationSenderClient.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/client/NotificationSenderClient.java
@@ -3,7 +3,7 @@
import java.util.Base64;
import java.util.List;
-import javax.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.HttpHeaders;
import com.redhat.parodos.infrastructure.Notifier;
import com.redhat.parodos.notification.sdk.api.ApiClient;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/common/audit/AuditEnabledEntity.java b/workflow-service/src/main/java/com/redhat/parodos/common/audit/AuditEnabledEntity.java
index 970f2b05a..808fa7f4c 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/common/audit/AuditEnabledEntity.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/common/audit/AuditEnabledEntity.java
@@ -18,9 +18,9 @@
import java.util.Date;
import java.util.UUID;
-import javax.persistence.Column;
-import javax.persistence.EntityListeners;
-import javax.persistence.MappedSuperclass;
+import jakarta.persistence.Column;
+import jakarta.persistence.EntityListeners;
+import jakarta.persistence.MappedSuperclass;
import lombok.Getter;
import lombok.Setter;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/common/controller/ControllerExceptionHandler.java b/workflow-service/src/main/java/com/redhat/parodos/common/controller/ControllerExceptionHandler.java
index bca343318..49794ff26 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/common/controller/ControllerExceptionHandler.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/common/controller/ControllerExceptionHandler.java
@@ -4,8 +4,8 @@
import java.util.Set;
import java.util.stream.Collectors;
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
+import jakarta.validation.ConstraintViolation;
+import jakarta.validation.ConstraintViolationException;
import com.redhat.parodos.common.exceptions.IllegalWorkFlowStateException;
import com.redhat.parodos.common.exceptions.OperationDeniedException;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/common/entity/AbstractEntity.java b/workflow-service/src/main/java/com/redhat/parodos/common/entity/AbstractEntity.java
index 20965fded..64679d2ac 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/common/entity/AbstractEntity.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/common/entity/AbstractEntity.java
@@ -17,10 +17,10 @@
import java.util.UUID;
-import javax.persistence.Column;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.MappedSuperclass;
+import jakarta.persistence.Column;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
+import jakarta.persistence.MappedSuperclass;
import com.fasterxml.jackson.annotation.JsonIgnore;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/config/properties/SecurityProperties.java b/workflow-service/src/main/java/com/redhat/parodos/config/properties/SecurityProperties.java
index ae3e6dce6..8b83642b4 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/config/properties/SecurityProperties.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/config/properties/SecurityProperties.java
@@ -10,6 +10,6 @@
@Data
public class SecurityProperties {
- Boolean authentication;
+ private boolean authentication;
-}
\ No newline at end of file
+}
diff --git a/workflow-service/src/main/java/com/redhat/parodos/project/controller/ProjectController.java b/workflow-service/src/main/java/com/redhat/parodos/project/controller/ProjectController.java
index 9cd42eb4c..1f90386ec 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/project/controller/ProjectController.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/project/controller/ProjectController.java
@@ -19,8 +19,8 @@
import java.util.List;
import java.util.UUID;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import com.redhat.parodos.project.dto.request.AccessRequestDTO;
import com.redhat.parodos.project.dto.request.ProjectRequestDTO;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/project/entity/Project.java b/workflow-service/src/main/java/com/redhat/parodos/project/entity/Project.java
index 6a6bff419..2e8bcc3f2 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/project/entity/Project.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/project/entity/Project.java
@@ -19,12 +19,12 @@
import java.util.Set;
import java.util.UUID;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
+import jakarta.persistence.OneToMany;
import com.redhat.parodos.common.audit.AuditEnabledEntity;
import lombok.AllArgsConstructor;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectAccessRequest.java b/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectAccessRequest.java
index 7274f2374..bc327dd45 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectAccessRequest.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectAccessRequest.java
@@ -2,13 +2,13 @@
import java.util.UUID;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.ManyToOne;
import com.redhat.parodos.common.audit.AuditEnabledEntity;
import com.redhat.parodos.project.enums.ProjectAccessStatus;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectUserRole.java b/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectUserRole.java
index bed44001b..421a95d01 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectUserRole.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/project/entity/ProjectUserRole.java
@@ -3,14 +3,14 @@
import java.io.Serializable;
import java.util.UUID;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
-import javax.persistence.EmbeddedId;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Embeddable;
+import jakarta.persistence.EmbeddedId;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.ManyToOne;
import com.redhat.parodos.user.entity.User;
import lombok.AllArgsConstructor;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/project/entity/Role.java b/workflow-service/src/main/java/com/redhat/parodos/project/entity/Role.java
index 07ddfe1ef..647af1d57 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/project/entity/Role.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/project/entity/Role.java
@@ -2,8 +2,8 @@
import java.util.Date;
-import javax.persistence.Column;
-import javax.persistence.Entity;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
import com.redhat.parodos.common.entity.AbstractEntity;
import lombok.AllArgsConstructor;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/project/entity/converter/ProjectAccessStatusConverter.java b/workflow-service/src/main/java/com/redhat/parodos/project/entity/converter/ProjectAccessStatusConverter.java
index 4e99b3571..b5d48a01a 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/project/entity/converter/ProjectAccessStatusConverter.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/project/entity/converter/ProjectAccessStatusConverter.java
@@ -15,8 +15,8 @@
*/
package com.redhat.parodos.project.entity.converter;
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
+import jakarta.persistence.AttributeConverter;
+import jakarta.persistence.Converter;
import com.redhat.parodos.project.enums.ProjectAccessStatus;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java b/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java
index 228a76dec..116a90df8 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/security/LocalSecurityConfiguration.java
@@ -15,9 +15,15 @@
*/
package com.redhat.parodos.security;
+import com.redhat.parodos.config.properties.LdapConnectionProperties;
+import com.redhat.parodos.config.properties.SecurityProperties;
+
+import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.web.SecurityFilterChain;
/**
* Turn off security for Local testing only. Do not enable this profile in production
@@ -29,10 +35,16 @@
@Configuration
public class LocalSecurityConfiguration extends SecurityConfiguration {
+ public LocalSecurityConfiguration(LdapConnectionProperties ldapConnectionProperties,
+ SecurityProperties securityProperties) {
+ super(ldapConnectionProperties, securityProperties);
+ }
+
@Override
- protected void configure(HttpSecurity http) throws Exception {
- http.cors().disable().csrf().disable();
- super.configure(http);
+ @Bean
+ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+ http.csrf(AbstractHttpConfigurer::disable).cors(AbstractHttpConfigurer::disable);
+ return super.filterChain(http);
}
-}
\ No newline at end of file
+}
diff --git a/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java b/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java
index 1ad23a803..8e9aadabf 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/security/SecurityConfiguration.java
@@ -27,9 +27,11 @@
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper;
+import org.springframework.security.web.SecurityFilterChain;
import org.springframework.stereotype.Component;
/**
@@ -44,47 +46,52 @@
@Configuration
@Profile("!local")
@DependsOn("org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor")
-public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
+public class SecurityConfiguration {
- @Autowired
- private LdapConnectionProperties ldapConnectionProperties;
+ private final LdapConnectionProperties ldapConnectionProperties;
- @Autowired
- private SecurityProperties securityProperties;
+ private final SecurityProperties securityProperties;
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- http.csrf().disable().cors().disable();
+ public SecurityConfiguration(LdapConnectionProperties ldapConnectionProperties,
+ SecurityProperties securityProperties) {
+ this.ldapConnectionProperties = ldapConnectionProperties;
+ this.securityProperties = securityProperties;
+ }
- if (!this.securityProperties.getAuthentication()) {
- return;
+ @Bean
+ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+ http.csrf(AbstractHttpConfigurer::disable).cors(AbstractHttpConfigurer::disable);
+
+ if (!this.securityProperties.isAuthentication()) {
+ return http.build();
}
// @formatter:off
http
- .authorizeRequests()
- .mvcMatchers(HttpMethod.OPTIONS, "/**")
- .permitAll()
- .mvcMatchers("/api/**", "/actuator/shutdown")
- .fullyAuthenticated()
- .and()
+ .authorizeHttpRequests(auth ->
+ auth
+ .requestMatchers(HttpMethod.OPTIONS, "/**")
+ .permitAll()
+ .requestMatchers("/api/**", "/actuator/shutdown")
+ .fullyAuthenticated()
+ .anyRequest().permitAll())
.httpBasic(Customizer.withDefaults())
- .headers().frameOptions().disable()
- .and()
+ .headers(httpSecurityHeadersConfigurer -> httpSecurityHeadersConfigurer.frameOptions(HeadersConfigurer.FrameOptionsConfig::disable))
.formLogin(form -> form.loginProcessingUrl("/login"))
- .logout()
- .logoutSuccessUrl("/login").permitAll();
+ .logout(httpSecurityLogoutConfigurer -> httpSecurityLogoutConfigurer
+ .logoutSuccessUrl("/login").permitAll());
// @formatter:on
+ return http.build();
}
- @Bean
+ // @Bean
public InetOrgPersonContextMapper userContextMapper() {
return new InetOrgPersonContextMapper();
}
- @Override
+ @Autowired
public void configure(AuthenticationManagerBuilder auth) throws Exception {
- if (!this.securityProperties.getAuthentication()) {
+ if (!this.securityProperties.isAuthentication()) {
return;
}
// @formatter:off
diff --git a/workflow-service/src/main/java/com/redhat/parodos/user/dto/UserResponseDTO.java b/workflow-service/src/main/java/com/redhat/parodos/user/dto/UserResponseDTO.java
index cc2215e11..fe8a12bfd 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/user/dto/UserResponseDTO.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/user/dto/UserResponseDTO.java
@@ -18,7 +18,7 @@
import java.util.Date;
import java.util.UUID;
-import javax.validation.constraints.Email;
+import jakarta.validation.constraints.Email;
import lombok.AllArgsConstructor;
import lombok.Data;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/user/entity/User.java b/workflow-service/src/main/java/com/redhat/parodos/user/entity/User.java
index 37a6b3c4c..ed1b4be7e 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/user/entity/User.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/user/entity/User.java
@@ -19,12 +19,12 @@
import java.util.HashSet;
import java.util.Set;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.OneToMany;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.OneToMany;
-import com.nimbusds.jose.shaded.json.annotate.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import com.redhat.parodos.common.entity.AbstractEntity;
import com.redhat.parodos.project.entity.ProjectUserRole;
import com.redhat.parodos.workflow.execution.entity.WorkFlowExecution;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/controller/WorkFlowDefinitionController.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/controller/WorkFlowDefinitionController.java
index b52689272..8818a42dd 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/controller/WorkFlowDefinitionController.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/controller/WorkFlowDefinitionController.java
@@ -19,7 +19,7 @@
import java.util.Objects;
import java.util.UUID;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.redhat.parodos.workflow.definition.dto.WorkFlowDefinitionResponseDTO;
import com.redhat.parodos.workflow.definition.dto.WorkParameterValueRequestDTO;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/WorkParameterValueRequestDTO.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/WorkParameterValueRequestDTO.java
index d02c460cb..247a60943 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/WorkParameterValueRequestDTO.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/WorkParameterValueRequestDTO.java
@@ -1,6 +1,6 @@
package com.redhat.parodos.workflow.definition.dto;
-import javax.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotEmpty;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/converter/WorkParametersConverter.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/converter/WorkParametersConverter.java
index 684103ee5..e2f692a9a 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/converter/WorkParametersConverter.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/dto/converter/WorkParametersConverter.java
@@ -17,8 +17,8 @@
import java.util.List;
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
+import jakarta.persistence.AttributeConverter;
+import jakarta.persistence.Converter;
import com.fasterxml.jackson.core.type.TypeReference;
import com.redhat.parodos.workflow.parameter.WorkParameter;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowCheckerMappingDefinition.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowCheckerMappingDefinition.java
index f5a8e497d..bd3436819 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowCheckerMappingDefinition.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowCheckerMappingDefinition.java
@@ -18,13 +18,13 @@
import java.util.ArrayList;
import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.OneToMany;
+import jakarta.persistence.OneToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import lombok.AllArgsConstructor;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowDefinition.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowDefinition.java
index 78f3edcee..53bc2c410 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowDefinition.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowDefinition.java
@@ -19,29 +19,28 @@
import java.util.Date;
import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.EnumType;
+import jakarta.persistence.Enumerated;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.JoinTable;
+import jakarta.persistence.OneToMany;
+import jakarta.persistence.OneToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import com.redhat.parodos.workflow.enums.WorkFlowProcessingType;
import com.redhat.parodos.workflow.enums.WorkFlowType;
import com.redhat.parodos.workflow.execution.entity.WorkFlowExecution;
-import io.hypersistence.utils.hibernate.type.json.JsonType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import org.hibernate.annotations.Type;
-import org.hibernate.annotations.TypeDef;
+import org.hibernate.annotations.JdbcTypeCode;
+import org.hibernate.type.SqlTypes;
/**
* Workflow definition entity
@@ -57,7 +56,6 @@
@AllArgsConstructor
@Getter
@Setter
-@TypeDef(name = "json", typeClass = JsonType.class)
public class WorkFlowDefinition extends AbstractEntity {
@Column(nullable = false, unique = true)
@@ -83,7 +81,7 @@ public class WorkFlowDefinition extends AbstractEntity {
private Integer numberOfWorks;
@Column(columnDefinition = "jsonb")
- @Type(type = "json")
+ @JdbcTypeCode(SqlTypes.JSON)
private WorkFlowPropertiesDefinition properties;
@OneToMany(mappedBy = "workFlowDefinition", fetch = FetchType.EAGER,
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowPropertiesDefinition.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowPropertiesDefinition.java
index b1204c979..c551c4a51 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowPropertiesDefinition.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowPropertiesDefinition.java
@@ -1,5 +1,7 @@
package com.redhat.parodos.workflow.definition.entity;
+import java.io.Serializable;
+
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -11,10 +13,10 @@
@NoArgsConstructor
@AllArgsConstructor
@Data
-public class WorkFlowPropertiesDefinition {
+public class WorkFlowPropertiesDefinition implements Serializable {
@Getter
@Setter
private String version;
-}
\ No newline at end of file
+}
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowTaskDefinition.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowTaskDefinition.java
index 62c51260f..7b5485ab8 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowTaskDefinition.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowTaskDefinition.java
@@ -17,13 +17,13 @@
import java.util.Date;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToOne;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.JoinTable;
+import jakarta.persistence.ManyToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import lombok.AllArgsConstructor;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowWorkDefinition.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowWorkDefinition.java
index 97a283d5c..3f54b3b4c 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowWorkDefinition.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/definition/entity/WorkFlowWorkDefinition.java
@@ -18,13 +18,13 @@
import java.util.Date;
import java.util.UUID;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.EnumType;
+import jakarta.persistence.Enumerated;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.ManyToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import com.redhat.parodos.workflow.enums.WorkType;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/controller/WorkFlowController.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/controller/WorkFlowController.java
index 4e819a308..d045cb852 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/controller/WorkFlowController.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/controller/WorkFlowController.java
@@ -18,8 +18,8 @@
import java.util.List;
import java.util.UUID;
-import javax.validation.Valid;
-import javax.validation.constraints.NotEmpty;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
import com.redhat.parodos.workflow.context.WorkContextDelegate;
import com.redhat.parodos.workflow.execution.dto.WorkFlowCheckerTaskRequestDTO;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecution.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecution.java
index 8b618ce79..4067fe938 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecution.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecution.java
@@ -20,14 +20,14 @@
import java.util.List;
import java.util.UUID;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.ManyToOne;
+import jakarta.persistence.OneToMany;
+import jakarta.persistence.OneToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import com.redhat.parodos.user.entity.User;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecutionContext.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecutionContext.java
index 3bd55353d..bd8362e7a 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecutionContext.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowExecutionContext.java
@@ -15,11 +15,11 @@
*/
package com.redhat.parodos.workflow.execution.entity;
-import javax.persistence.Convert;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
+import jakarta.persistence.Convert;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.OneToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import com.redhat.parodos.workflow.execution.entity.converter.WorkContextConverter;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecution.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecution.java
index 810f81e95..a38234ac7 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecution.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecution.java
@@ -18,10 +18,10 @@
import java.util.Date;
import java.util.UUID;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.OneToOne;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.OneToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import com.redhat.parodos.workflows.work.WorkStatus;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecutionLog.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecutionLog.java
index af5a80e6b..de2a6300f 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecutionLog.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/WorkFlowTaskExecutionLog.java
@@ -15,10 +15,10 @@
*/
package com.redhat.parodos.workflow.execution.entity;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
+import jakarta.persistence.Entity;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.OneToOne;
import com.redhat.parodos.common.entity.AbstractEntity;
import lombok.AllArgsConstructor;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkContextConverter.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkContextConverter.java
index c11409bf4..28975d786 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkContextConverter.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkContextConverter.java
@@ -18,8 +18,8 @@
import java.util.Map;
import java.util.Set;
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
+import jakarta.persistence.AttributeConverter;
+import jakarta.persistence.Converter;
import com.fasterxml.jackson.core.type.TypeReference;
import com.redhat.parodos.workflow.util.WorkFlowDTOUtil;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkStatusConverter.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkStatusConverter.java
index 25b787829..e2909f374 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkStatusConverter.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/entity/converter/WorkStatusConverter.java
@@ -15,8 +15,8 @@
*/
package com.redhat.parodos.workflow.execution.entity.converter;
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
+import jakarta.persistence.AttributeConverter;
+import jakarta.persistence.Converter;
import com.redhat.parodos.workflows.work.WorkStatus;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepository.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepository.java
index 0812686fa..7539064c5 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepository.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepository.java
@@ -59,7 +59,7 @@ WorkFlowExecution findFirstByMainWorkFlowExecutionIdAndWorkFlowDefinitionId(UUID
@Query("SELECT COUNT(*) FROM prds_workflow_execution o JOIN prds_workflow_execution restarted ON o.id = restarted.originalWorkFlowExecution.id WHERE o.id = :originalWorkflowId AND restarted.workFlowDefinition.id = o.workFlowDefinition.id")
Integer countRestartedWorkflow(@Param("originalWorkflowId") UUID originalWorkflowId);
- @Query("SELECT fallback FROM prds_workflow_execution o JOIN prds_workflow_execution fallback ON o.id = fallback.originalWorkFlowExecution.id WHERE o.id = :originalWorkflowId AND fallback.workFlowDefinition.id != o.workFlowDefinition.id")
+ @Query("SELECT fallback FROM prds_workflow_execution o JOIN prds_workflow_execution fallback ON o.id = fallback.originalWorkFlowExecution.id WHERE o.id = :originalWorkflowId AND fallback.workFlowDefinition.id <> o.workFlowDefinition.id")
Optional findFallbackWorkFlowExecution(@Param("originalWorkflowId") UUID originalWorkflowId);
WorkFlowExecution findFirstByProjectIdAndMainWorkFlowExecutionIsNullOrderByStartDateDesc(UUID projectId);
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/service/WorkFlowServiceImpl.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/service/WorkFlowServiceImpl.java
index 8a9d89c80..59355a61e 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/service/WorkFlowServiceImpl.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/service/WorkFlowServiceImpl.java
@@ -24,7 +24,7 @@
import java.util.Optional;
import java.util.UUID;
-import javax.annotation.PreDestroy;
+import jakarta.annotation.PreDestroy;
import com.redhat.parodos.common.entity.AbstractEntity;
import com.redhat.parodos.common.exceptions.IllegalWorkFlowStateException;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PublicVisibilityValidator.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PublicVisibilityValidator.java
index e2cf1e0cc..26a1b7f56 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PublicVisibilityValidator.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PublicVisibilityValidator.java
@@ -1,7 +1,7 @@
package com.redhat.parodos.workflow.execution.validation;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
+import jakarta.validation.ConstraintValidator;
+import jakarta.validation.ConstraintValidatorContext;
import com.redhat.parodos.workflow.context.WorkContextDelegate;
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisible.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisible.java
index e039667e1..474c8e154 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisible.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisible.java
@@ -5,8 +5,8 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
+import jakarta.validation.Constraint;
+import jakarta.validation.Payload;
@Target({ ElementType.TYPE_USE, ElementType.PARAMETER, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
diff --git a/workflow-service/src/main/java/com/redhat/parodos/workflow/registry/BeanWorkFlowRegistryImpl.java b/workflow-service/src/main/java/com/redhat/parodos/workflow/registry/BeanWorkFlowRegistryImpl.java
index 3a1c0c913..47178bf47 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/workflow/registry/BeanWorkFlowRegistryImpl.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/workflow/registry/BeanWorkFlowRegistryImpl.java
@@ -23,8 +23,8 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
+import jakarta.annotation.PostConstruct;
+import jakarta.annotation.PreDestroy;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.redhat.parodos.workflow.annotation.Assessment;
diff --git a/workflow-service/src/test/java/com/redhat/parodos/project/controller/ProjectControllerTest.java b/workflow-service/src/test/java/com/redhat/parodos/project/controller/ProjectControllerTest.java
index 5e3e07f02..80bb3da47 100644
--- a/workflow-service/src/test/java/com/redhat/parodos/project/controller/ProjectControllerTest.java
+++ b/workflow-service/src/test/java/com/redhat/parodos/project/controller/ProjectControllerTest.java
@@ -71,7 +71,7 @@ public void testCreateValidProject() throws Exception {
when(projectService.createProject(eq(project1DTO))).thenReturn(response);
// When
- mockMvc.perform(this.postRequestWithValidCredentials("/api/v1/projects/").content(jsonPayload)
+ mockMvc.perform(this.postRequestWithValidCredentials("/api/v1/projects").content(jsonPayload)
.contentType(MediaType.APPLICATION_JSON)).andExpect(MockMvcResultMatchers.status().isCreated())
.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))
.andExpect(MockMvcResultMatchers.jsonPath("$.id", Matchers.is(response.getId().toString())))
@@ -102,7 +102,7 @@ public void testListProjects() throws Exception {
when(projectService.getProjects()).thenReturn(List.of(project1DTO, project2DTO));
// When
- mockMvc.perform(this.getRequestWithValidCredentials("/api/v1/projects/"))
+ mockMvc.perform(this.getRequestWithValidCredentials("/api/v1/projects"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))
.andExpect(MockMvcResultMatchers.jsonPath("$", Matchers.hasSize(2)))
@@ -122,7 +122,7 @@ public void testListProjects_when_etagEquals_then_return_notModified() throws Ex
when(projectService.getProjects()).thenReturn(List.of(project1DTO, project2DTO));
String etagValue = String.valueOf(List.of(project1DTO, project2DTO).hashCode());
// When
- mockMvc.perform(this.getRequestWithValidCredentials("/api/v1/projects/").header("If-None-Match",
+ mockMvc.perform(this.getRequestWithValidCredentials("/api/v1/projects").header("If-None-Match",
"\"" + etagValue + "\"")).andExpect(MockMvcResultMatchers.status().isNotModified());
// Then
diff --git a/workflow-service/src/test/java/com/redhat/parodos/project/repository/ProjectRepositoryTest.java b/workflow-service/src/test/java/com/redhat/parodos/project/repository/ProjectRepositoryTest.java
index b4a5a5364..bcb47944a 100644
--- a/workflow-service/src/test/java/com/redhat/parodos/project/repository/ProjectRepositoryTest.java
+++ b/workflow-service/src/test/java/com/redhat/parodos/project/repository/ProjectRepositoryTest.java
@@ -4,7 +4,7 @@
import java.util.List;
import java.util.UUID;
-import javax.persistence.PersistenceException;
+import jakarta.persistence.PersistenceException;
import com.redhat.parodos.project.entity.Project;
import com.redhat.parodos.repository.RepositoryTestBase;
diff --git a/workflow-service/src/test/java/com/redhat/parodos/user/repository/UserRepositoryTest.java b/workflow-service/src/test/java/com/redhat/parodos/user/repository/UserRepositoryTest.java
index 30a48563c..800fb54a9 100644
--- a/workflow-service/src/test/java/com/redhat/parodos/user/repository/UserRepositoryTest.java
+++ b/workflow-service/src/test/java/com/redhat/parodos/user/repository/UserRepositoryTest.java
@@ -2,7 +2,7 @@
import java.util.UUID;
-import javax.persistence.PersistenceException;
+import jakarta.persistence.PersistenceException;
import com.redhat.parodos.repository.RepositoryTestBase;
import com.redhat.parodos.user.entity.User;
diff --git a/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepositoryTest.java b/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepositoryTest.java
index 470c88f91..7329add8d 100644
--- a/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepositoryTest.java
+++ b/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/repository/WorkFlowRepositoryTest.java
@@ -80,8 +80,7 @@ public void testSaveWithExecutionContext() {
assertNotNull(flowExecution.getWorkFlowExecutionContext().getWorkContext());
assertEquals("test_value", flowExecution.getWorkFlowExecutionContext().getWorkContext().get("test_key"));
assertEquals(testList, flowExecution.getWorkFlowExecutionContext().getWorkContext().get("test_list"));
- assertEquals(testUUID.toString(),
- flowExecution.getWorkFlowExecutionContext().getWorkContext().get("test_uuid"));
+ assertEquals(testUUID, flowExecution.getWorkFlowExecutionContext().getWorkContext().get("test_uuid"));
}
@Test
diff --git a/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisibleValidatorTest.java b/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisibleValidatorTest.java
index 729aa19dc..8c0b9f7fa 100644
--- a/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisibleValidatorTest.java
+++ b/workflow-service/src/test/java/com/redhat/parodos/workflow/execution/validation/PubliclyVisibleValidatorTest.java
@@ -1,6 +1,6 @@
package com.redhat.parodos.workflow.execution.validation;
-import javax.validation.ConstraintValidatorContext;
+import jakarta.validation.ConstraintValidatorContext;
import com.redhat.parodos.workflow.context.WorkContextDelegate;
import org.junit.Before;
From e1fc49956c9f1406a7a99a9d9eee36c21980e78b Mon Sep 17 00:00:00 2001
From: Annel Ketcha
Date: Fri, 28 Jul 2023 16:59:08 -0400
Subject: [PATCH 4/4] refactor tasks and tests
---
...jectAccessRequestApprovalWorkFlowTask.java | 4 +-
...ctAccessRequestEscalationWorkFlowTask.java | 4 +-
...AccessRequestApprovalWorkFlowTaskTest.java | 70 ------------
.../ProjectAccessRequestWorkFlowTaskTest.java | 11 --
...equestApprovalWorkFlowCheckerTaskTest.java | 107 ------------------
...cessRequestEscalationWorkFlowTaskTest.java | 70 ------------
.../client/ProjectRequesterClient.java | 6 +-
7 files changed, 7 insertions(+), 265 deletions(-)
diff --git a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTask.java b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTask.java
index 01e382fed..1642e9cd9 100644
--- a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTask.java
+++ b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTask.java
@@ -69,13 +69,13 @@ public WorkReport execute(WorkContext workContext) {
NotificationMessageCreateRequestDTO notificationMessageCreateRequestDTO = new NotificationMessageCreateRequestDTO();
notificationMessageCreateRequestDTO.setSubject(NOTIFICATION_SUBJECT_ACCESS_REQUEST_APPROVAL);
notificationMessageCreateRequestDTO.setUsernames(Arrays.stream(approvalUsernames.split(",")).toList());
- notificationMessageCreateRequestDTO.setBody(buildMessage(
+ notificationMessageCreateRequestDTO.setBody(getMessage(
String.format("%s/api/v1/projects/access/%s", projectRequester.getBasePath(), accessRequestId)));
notifier.send(notificationMessageCreateRequestDTO);
return new DefaultWorkReport(WorkStatus.COMPLETED, workContext);
}
- private String buildMessage(String url) {
+ private String getMessage(String url) {
return "Hi there," + "\n"
+ "A project request awaits your approval. Use the url below to approve or reject the request." + "\n"
+ "Url: " + url + "\n" + "Thank you," + "\n" + "The Parodos Team";
diff --git a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTask.java b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTask.java
index 2b1973c63..7b698fddc 100644
--- a/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTask.java
+++ b/prebuilt-tasks/src/main/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTask.java
@@ -67,13 +67,13 @@ public WorkReport execute(WorkContext workContext) {
NotificationMessageCreateRequestDTO notificationMessageCreateRequestDTO = new NotificationMessageCreateRequestDTO();
notificationMessageCreateRequestDTO.setSubject(NOTIFICATION_SUBJECT_ACCESS_REQUEST_ESCALATION);
notificationMessageCreateRequestDTO.addUsernamesItem(escalationUsername);
- notificationMessageCreateRequestDTO.setBody(buildMessage(
+ notificationMessageCreateRequestDTO.setBody(getMessage(
String.format("%s/api/v1/projects/access/%s/status", projectRequester.getBasePath(), accessRequestId)));
notifier.send(notificationMessageCreateRequestDTO);
return new DefaultWorkReport(WorkStatus.COMPLETED, workContext);
}
- private String buildMessage(String url) {
+ private String getMessage(String url) {
return "Hi there," + "\n" + "A project request below has been escalated as being pending for a while." + "\n"
+ "Url: " + url + "\n" + "Thank you," + "\n" + "The Parodos Team";
}
diff --git a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTaskTest.java b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTaskTest.java
index b57bff72a..1b6f5f922 100644
--- a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTaskTest.java
+++ b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestApprovalWorkFlowTaskTest.java
@@ -1,75 +1,5 @@
package com.redhat.parodos.tasks.project;
-import java.util.UUID;
-
-import com.redhat.parodos.infrastructure.Notifier;
-import com.redhat.parodos.infrastructure.ProjectRequester;
-import com.redhat.parodos.workflow.exception.MissingParameterException;
-import com.redhat.parodos.workflows.work.WorkContext;
-import com.redhat.parodos.workflows.work.WorkReport;
-import com.redhat.parodos.workflows.work.WorkStatus;
-import lombok.SneakyThrows;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.spy;
-
-@RunWith(MockitoJUnitRunner.class)
public class ProjectAccessRequestApprovalWorkFlowTaskTest {
- private static final String ACCESS_REQUEST_ID_PARAMETER_NAME = "ACCESS_REQUEST_ID";
-
- private static final String ACCESS_REQUEST_APPROVAL_USERNAMES_PARAMETER_NAME = "ACCESS_REQUEST_APPROVAL_USERNAMES";
-
- private static final String ACCESS_REQUEST_APPROVAL_USERNAMES_VALUE_TEST = "approval-username-test";
-
- @Mock
- private ProjectRequester projectRequester;
-
- @Mock
- private Notifier notifier;
-
- private WorkContext workContext;
-
- private ProjectAccessRequestApprovalWorkFlowTask projectAccessRequestApprovalWorkFlowTask;
-
- @Before
- public void setUp() {
- this.projectAccessRequestApprovalWorkFlowTask = spy(
- new ProjectAccessRequestApprovalWorkFlowTask(projectRequester, notifier));
- this.projectAccessRequestApprovalWorkFlowTask.setBeanName("projectAccessRequestApprovalWorkFlowTask");
- workContext = new WorkContext();
- }
-
- @Test
- @SneakyThrows
- public void executeSuccess() {
- doReturn(String.valueOf(UUID.randomUUID())).when(this.projectAccessRequestApprovalWorkFlowTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
- doReturn(ACCESS_REQUEST_APPROVAL_USERNAMES_VALUE_TEST).when(this.projectAccessRequestApprovalWorkFlowTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_APPROVAL_USERNAMES_PARAMETER_NAME));
- doNothing().when(notifier).send(any());
-
- WorkReport workReport = projectAccessRequestApprovalWorkFlowTask.execute(workContext);
- assertEquals(WorkStatus.COMPLETED, workReport.getStatus());
- }
-
- @Test
- @SneakyThrows
- public void executeFail() {
- doThrow(MissingParameterException.class).when(this.projectAccessRequestApprovalWorkFlowTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
- WorkReport workReport = projectAccessRequestApprovalWorkFlowTask.execute(workContext);
- assertEquals(WorkStatus.FAILED, workReport.getStatus());
- }
-
}
diff --git a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestWorkFlowTaskTest.java b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestWorkFlowTaskTest.java
index 6792b9b32..c6684ec4f 100644
--- a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestWorkFlowTaskTest.java
+++ b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/ProjectAccessRequestWorkFlowTaskTest.java
@@ -4,7 +4,6 @@
import com.redhat.parodos.infrastructure.ProjectRequester;
import com.redhat.parodos.sdk.model.AccessResponseDTO;
-import com.redhat.parodos.workflow.exception.MissingParameterException;
import com.redhat.parodos.workflow.utils.WorkContextUtils;
import com.redhat.parodos.workflows.work.WorkContext;
import com.redhat.parodos.workflows.work.WorkReport;
@@ -21,7 +20,6 @@
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
@@ -91,13 +89,4 @@ public void executeFailForInvalidRole() {
assertEquals(WorkStatus.FAILED, workReport.getStatus());
}
- @Test
- @SneakyThrows
- public void executeFailForMissingRequiredParameter() {
- doThrow(MissingParameterException.class).when(this.projectAccessRequestWorkFlowTask)
- .getRequiredParameterValue(eq(USERNAME_PARAMETER_NAME));
- WorkReport workReport = projectAccessRequestWorkFlowTask.execute(workContext);
- assertEquals(WorkStatus.FAILED, workReport.getStatus());
- }
-
}
diff --git a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/checker/ProjectAccessRequestApprovalWorkFlowCheckerTaskTest.java b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/checker/ProjectAccessRequestApprovalWorkFlowCheckerTaskTest.java
index b9457afda..73f0d29b7 100644
--- a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/checker/ProjectAccessRequestApprovalWorkFlowCheckerTaskTest.java
+++ b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/checker/ProjectAccessRequestApprovalWorkFlowCheckerTaskTest.java
@@ -1,112 +1,5 @@
package com.redhat.parodos.tasks.project.checker;
-import java.util.UUID;
-
-import com.redhat.parodos.infrastructure.ProjectRequester;
-import com.redhat.parodos.sdk.model.AccessStatusResponseDTO;
-import com.redhat.parodos.workflow.exception.MissingParameterException;
-import com.redhat.parodos.workflow.utils.WorkContextUtils;
-import com.redhat.parodos.workflows.work.WorkContext;
-import com.redhat.parodos.workflows.work.WorkReport;
-import com.redhat.parodos.workflows.work.WorkStatus;
-import com.redhat.parodos.workflows.workflow.WorkFlow;
-import lombok.SneakyThrows;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.when;
-
-@RunWith(MockitoJUnitRunner.class)
public class ProjectAccessRequestApprovalWorkFlowCheckerTaskTest {
- private static final String ACCESS_REQUEST_ID_PARAMETER_NAME = "ACCESS_REQUEST_ID";
-
- private static final long SLA_TEST = 100L;
-
- @Mock
- private ProjectRequester projectRequester;
-
- @Mock
- private WorkFlow workFlow;
-
- private WorkContext workContext;
-
- private ProjectAccessRequestApprovalWorkFlowCheckerTask projectAccessRequestApprovalWorkFlowCheckerTask;
-
- @Before
- public void setUp() {
- this.projectAccessRequestApprovalWorkFlowCheckerTask = spy(
- new ProjectAccessRequestApprovalWorkFlowCheckerTask(workFlow, SLA_TEST, projectRequester));
- this.projectAccessRequestApprovalWorkFlowCheckerTask
- .setBeanName("projectAccessRequestApprovalWorkFlowCheckerTask");
- workContext = new WorkContext();
- WorkContextUtils.setProjectId(workContext, UUID.randomUUID());
- }
-
- @Test
- @SneakyThrows
- public void checkWorkFlowStatusCompleted() {
- UUID accessRequestId = UUID.randomUUID();
- doReturn(String.valueOf(accessRequestId)).when(this.projectAccessRequestApprovalWorkFlowCheckerTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
-
- AccessStatusResponseDTO accessStatusResponseDTO = new AccessStatusResponseDTO();
- accessStatusResponseDTO.setAccessRequestId(accessRequestId);
- accessStatusResponseDTO.setStatus(AccessStatusResponseDTO.StatusEnum.APPROVED);
- when(projectRequester.getAccessStatus(any())).thenReturn(accessStatusResponseDTO);
-
- WorkReport workReport = projectAccessRequestApprovalWorkFlowCheckerTask.execute(workContext);
- assertEquals(WorkStatus.COMPLETED, workReport.getStatus());
- }
-
- @Test
- @SneakyThrows
- public void checkWorkFlowStatusRejected() {
- UUID accessRequestId = UUID.randomUUID();
- doReturn(String.valueOf(accessRequestId)).when(this.projectAccessRequestApprovalWorkFlowCheckerTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
-
- AccessStatusResponseDTO accessStatusResponseDTO = new AccessStatusResponseDTO();
- accessStatusResponseDTO.setAccessRequestId(accessRequestId);
- accessStatusResponseDTO.setStatus(AccessStatusResponseDTO.StatusEnum.REJECTED);
- when(projectRequester.getAccessStatus(any())).thenReturn(accessStatusResponseDTO);
-
- WorkReport workReport = projectAccessRequestApprovalWorkFlowCheckerTask.execute(workContext);
- assertEquals(WorkStatus.REJECTED, workReport.getStatus());
- }
-
- @Test
- @SneakyThrows
- public void checkWorkFlowStatusPending() {
- UUID accessRequestId = UUID.randomUUID();
- doReturn(String.valueOf(accessRequestId)).when(this.projectAccessRequestApprovalWorkFlowCheckerTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
-
- AccessStatusResponseDTO accessStatusResponseDTO = new AccessStatusResponseDTO();
- accessStatusResponseDTO.setAccessRequestId(accessRequestId);
- accessStatusResponseDTO.setStatus(AccessStatusResponseDTO.StatusEnum.PENDING);
- when(projectRequester.getAccessStatus(any())).thenReturn(accessStatusResponseDTO);
-
- WorkReport workReport = projectAccessRequestApprovalWorkFlowCheckerTask.execute(workContext);
- assertEquals(WorkStatus.FAILED, workReport.getStatus());
- }
-
- @Test
- @SneakyThrows
- public void executeFailForMissingRequiredParameter() {
- doThrow(MissingParameterException.class).when(this.projectAccessRequestApprovalWorkFlowCheckerTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
- WorkReport workReport = projectAccessRequestApprovalWorkFlowCheckerTask.execute(workContext);
- assertEquals(WorkStatus.FAILED, workReport.getStatus());
- }
-
}
diff --git a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTaskTest.java b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTaskTest.java
index 97f98b345..b3609bc28 100644
--- a/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTaskTest.java
+++ b/prebuilt-tasks/src/test/java/com/redhat/parodos/tasks/project/escalation/ProjectAccessRequestEscalationWorkFlowTaskTest.java
@@ -1,75 +1,5 @@
package com.redhat.parodos.tasks.project.escalation;
-import java.util.UUID;
-
-import com.redhat.parodos.infrastructure.Notifier;
-import com.redhat.parodos.infrastructure.ProjectRequester;
-import com.redhat.parodos.workflow.exception.MissingParameterException;
-import com.redhat.parodos.workflows.work.WorkContext;
-import com.redhat.parodos.workflows.work.WorkReport;
-import com.redhat.parodos.workflows.work.WorkStatus;
-import lombok.SneakyThrows;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.spy;
-
-@RunWith(MockitoJUnitRunner.class)
public class ProjectAccessRequestEscalationWorkFlowTaskTest {
- private static final String ACCESS_REQUEST_ID_PARAMETER_NAME = "ACCESS_REQUEST_ID";
-
- private static final String ACCESS_REQUEST_ESCALATION_USERNAME_PARAMETER_NAME = "ACCESS_REQUEST_ESCALATION_USERNAME";
-
- private static final String ACCESS_REQUEST_ESCALATION_USERNAME_VALUE_TEST = "escalation-username-test";
-
- @Mock
- private ProjectRequester projectRequester;
-
- @Mock
- private Notifier notifier;
-
- private WorkContext workContext;
-
- private ProjectAccessRequestEscalationWorkFlowTask projectAccessRequestEscalationWorkFlowTask;
-
- @Before
- public void setUp() {
- this.projectAccessRequestEscalationWorkFlowTask = spy(
- new ProjectAccessRequestEscalationWorkFlowTask(projectRequester, notifier));
- this.projectAccessRequestEscalationWorkFlowTask.setBeanName("projectAccessRequestEscalationWorkFlowTask");
- workContext = new WorkContext();
- }
-
- @Test
- @SneakyThrows
- public void executeSuccess() {
- doReturn(String.valueOf(UUID.randomUUID())).when(this.projectAccessRequestEscalationWorkFlowTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
- doReturn(ACCESS_REQUEST_ESCALATION_USERNAME_VALUE_TEST).when(this.projectAccessRequestEscalationWorkFlowTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ESCALATION_USERNAME_PARAMETER_NAME));
- doNothing().when(notifier).send(any());
-
- WorkReport workReport = projectAccessRequestEscalationWorkFlowTask.execute(workContext);
- assertEquals(WorkStatus.COMPLETED, workReport.getStatus());
- }
-
- @Test
- @SneakyThrows
- public void executeFail() {
- doThrow(MissingParameterException.class).when(this.projectAccessRequestEscalationWorkFlowTask)
- .getRequiredParameterValue(eq(ACCESS_REQUEST_ID_PARAMETER_NAME));
- WorkReport workReport = projectAccessRequestEscalationWorkFlowTask.execute(workContext);
- assertEquals(WorkStatus.FAILED, workReport.getStatus());
- }
-
}
diff --git a/workflow-service/src/main/java/com/redhat/parodos/client/ProjectRequesterClient.java b/workflow-service/src/main/java/com/redhat/parodos/client/ProjectRequesterClient.java
index 24dc32614..1e28ae311 100644
--- a/workflow-service/src/main/java/com/redhat/parodos/client/ProjectRequesterClient.java
+++ b/workflow-service/src/main/java/com/redhat/parodos/client/ProjectRequesterClient.java
@@ -25,9 +25,9 @@ public class ProjectRequesterClient implements ProjectRequester {
private final ProjectAccessApi projectAccessApi;
- public ProjectRequesterClient(@Value("${workflow.url}") String url,
- @Value("${workflow.auth.basic.user}") String user,
- @Value("${workflow.auth.basic.password}") String password) {
+ public ProjectRequesterClient(@Value("${workflow.url:test}") String url,
+ @Value("${workflow.auth.basic.user:test}") String user,
+ @Value("${workflow.auth.basic.password:test}") String password) {
ApiClient apiClient = new ApiClient().setBasePath(url).addDefaultHeader(HttpHeaders.AUTHORIZATION,
"Basic " + Base64.getEncoder().encodeToString((user + ":" + password).getBytes()));
projectApi = new ProjectApi(apiClient);