From b20577026efe00c49daf11b9461c66a4b0f0c396 Mon Sep 17 00:00:00 2001 From: bgamard Date: Sun, 9 Apr 2023 21:31:53 +0200 Subject: [PATCH] Closes #668: upgrade jetty/servlet-api/jersey --- Dockerfile | 5 +- docs-core/pom.xml | 27 +------ .../com/sismics/docs/core/dao/AclDao.java | 4 +- .../sismics/docs/core/dao/AuditLogDao.java | 2 +- .../docs/core/dao/AuthenticationTokenDao.java | 4 +- .../com/sismics/docs/core/dao/CommentDao.java | 6 +- .../com/sismics/docs/core/dao/ConfigDao.java | 4 +- .../sismics/docs/core/dao/ContributorDao.java | 4 +- .../sismics/docs/core/dao/DocumentDao.java | 8 +- .../docs/core/dao/DocumentMetadataDao.java | 4 +- .../com/sismics/docs/core/dao/FileDao.java | 6 +- .../com/sismics/docs/core/dao/GroupDao.java | 6 +- .../sismics/docs/core/dao/MetadataDao.java | 6 +- .../docs/core/dao/PasswordRecoveryDao.java | 6 +- .../sismics/docs/core/dao/RelationDao.java | 4 +- .../docs/core/dao/RoleBaseFunctionDao.java | 4 +- .../com/sismics/docs/core/dao/RouteDao.java | 2 +- .../sismics/docs/core/dao/RouteModelDao.java | 6 +- .../sismics/docs/core/dao/RouteStepDao.java | 4 +- .../com/sismics/docs/core/dao/ShareDao.java | 4 +- .../com/sismics/docs/core/dao/TagDao.java | 6 +- .../com/sismics/docs/core/dao/UserDao.java | 6 +- .../sismics/docs/core/dao/VocabularyDao.java | 6 +- .../com/sismics/docs/core/dao/WebhookDao.java | 6 +- .../docs/core/dao/dto/RouteStepDto.java | 4 +- .../com/sismics/docs/core/model/jpa/Acl.java | 2 +- .../sismics/docs/core/model/jpa/AuditLog.java | 12 +-- .../core/model/jpa/AuthenticationToken.java | 8 +- .../docs/core/model/jpa/BaseFunction.java | 8 +- .../sismics/docs/core/model/jpa/Comment.java | 8 +- .../sismics/docs/core/model/jpa/Config.java | 12 +-- .../docs/core/model/jpa/Contributor.java | 8 +- .../sismics/docs/core/model/jpa/Document.java | 8 +- .../docs/core/model/jpa/DocumentMetadata.java | 8 +- .../docs/core/model/jpa/DocumentTag.java | 8 +- .../com/sismics/docs/core/model/jpa/File.java | 2 +- .../sismics/docs/core/model/jpa/Group.java | 8 +- .../sismics/docs/core/model/jpa/Metadata.java | 2 +- .../docs/core/model/jpa/PasswordRecovery.java | 8 +- .../sismics/docs/core/model/jpa/Relation.java | 8 +- .../com/sismics/docs/core/model/jpa/Role.java | 8 +- .../docs/core/model/jpa/RoleBaseFunction.java | 8 +- .../sismics/docs/core/model/jpa/Route.java | 8 +- .../docs/core/model/jpa/RouteModel.java | 8 +- .../docs/core/model/jpa/RouteStep.java | 2 +- .../sismics/docs/core/model/jpa/Share.java | 8 +- .../com/sismics/docs/core/model/jpa/Tag.java | 8 +- .../com/sismics/docs/core/model/jpa/User.java | 8 +- .../docs/core/model/jpa/UserGroup.java | 8 +- .../docs/core/model/jpa/Vocabulary.java | 8 +- .../sismics/docs/core/model/jpa/Webhook.java | 2 +- .../sismics/docs/core/util/ActionUtil.java | 2 +- .../sismics/docs/core/util/AuditLogUtil.java | 2 +- .../sismics/docs/core/util/MetadataUtil.java | 6 +- .../sismics/docs/core/util/RoutingUtil.java | 8 +- .../docs/core/util/TransactionUtil.java | 4 +- .../sismics/docs/core/util/action/Action.java | 2 +- .../docs/core/util/action/AddTagAction.java | 2 +- .../core/util/action/ProcessFilesAction.java | 2 +- .../core/util/action/RemoveTagAction.java | 2 +- .../docs/core/util/action/TagAction.java | 2 +- .../util/indexing/LuceneIndexingHandler.java | 6 +- .../docs/core/util/jpa/PaginatedLists.java | 2 +- .../sismics/docs/core/util/jpa/QueryUtil.java | 4 +- .../main/java/com/sismics/util/EmailUtil.java | 6 +- .../main/java/com/sismics/util/JsonUtil.java | 4 +- .../util/context/ThreadLocalContext.java | 2 +- .../main/java/com/sismics/util/jpa/EMF.java | 4 +- .../sismics/docs/BaseTransactionalTest.java | 4 +- docs-web-common/pom.xml | 6 +- .../rest/exception/ClientException.java | 9 +-- .../exception/ForbiddenClientException.java | 8 +- .../rest/exception/ServerException.java | 8 +- .../java/com/sismics/rest/util/AclUtil.java | 6 +- .../java/com/sismics/rest/util/RestUtil.java | 4 +- .../com/sismics/util/filter/CorsFilter.java | 6 +- .../filter/HeaderBasedSecurityFilter.java | 4 +- .../util/filter/RequestContextFilter.java | 10 +-- .../sismics/util/filter/SecurityFilter.java | 4 +- .../util/filter/TokenBasedSecurityFilter.java | 4 +- .../listener/IIOProviderContextListener.java | 78 +++++++++++++++++++ .../com/sismics/docs/rest/BaseJerseyTest.java | 6 +- .../sismics/docs/rest/util/ClientUtil.java | 14 ++-- docs-web/pom.xml | 7 +- docs-web/src/dev/main/webapp/web-override.xml | 11 ++- .../docs/rest/resource/AclResource.java | 10 +-- .../docs/rest/resource/AppResource.java | 14 ++-- .../docs/rest/resource/AuditLogResource.java | 16 ++-- .../docs/rest/resource/BaseResource.java | 13 ++-- .../docs/rest/resource/CommentResource.java | 10 +-- .../rest/resource/DocsMessageBodyWriter.java | 14 ++-- .../docs/rest/resource/DocumentResource.java | 12 +-- .../docs/rest/resource/FileResource.java | 18 ++--- .../docs/rest/resource/GroupResource.java | 10 +-- .../docs/rest/resource/MetadataResource.java | 10 +-- .../rest/resource/RouteModelResource.java | 6 +- .../docs/rest/resource/RouteResource.java | 6 +- .../docs/rest/resource/ShareResource.java | 8 +- .../docs/rest/resource/TagResource.java | 10 +-- .../docs/rest/resource/ThemeResource.java | 10 +-- .../docs/rest/resource/UserResource.java | 16 ++-- .../rest/resource/VocabularyResource.java | 10 +-- .../docs/rest/resource/WebhookResource.java | 10 +-- docs-web/src/main/webapp/WEB-INF/web.xml | 14 ++-- .../sismics/docs/rest/TestAclResource.java | 12 +-- .../sismics/docs/rest/TestAppResource.java | 12 +-- .../docs/rest/TestAuditLogResource.java | 8 +- .../docs/rest/TestCommentResource.java | 10 +-- .../docs/rest/TestDocumentResource.java | 14 ++-- .../sismics/docs/rest/TestFileResource.java | 16 ++-- .../sismics/docs/rest/TestGroupResource.java | 10 +-- .../docs/rest/TestMetadataResource.java | 8 +- .../docs/rest/TestRouteModelResource.java | 8 +- .../sismics/docs/rest/TestRouteResource.java | 10 +-- .../com/sismics/docs/rest/TestSecurity.java | 10 +-- .../sismics/docs/rest/TestShareResource.java | 14 ++-- .../sismics/docs/rest/TestTagResource.java | 12 +-- .../sismics/docs/rest/TestThemeResource.java | 10 +-- .../sismics/docs/rest/TestUserResource.java | 12 +-- .../docs/rest/TestVocabularyResource.java | 10 +-- .../docs/rest/TestWebhookResource.java | 8 +- .../resource/ThirdPartyWebhookResource.java | 12 +-- pom.xml | 35 ++++----- 123 files changed, 537 insertions(+), 490 deletions(-) create mode 100644 docs-web-common/src/main/java/com/sismics/util/listener/IIOProviderContextListener.java diff --git a/Dockerfile b/Dockerfile index 8cc716b0..9e300afe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM sismics/ubuntu-jetty:9.4.51 +FROM sismics/ubuntu-jetty:11.0.14 LABEL maintainer="b.gamard@sismics.com" RUN apt-get update && \ @@ -34,9 +34,6 @@ RUN apt-get update && \ tesseract-ocr-vie && \ apt-get clean && rm -rf /var/lib/apt/lists/* -# Remove the embedded javax.mail jar from Jetty -RUN rm -f /opt/jetty/lib/mail/javax.mail.glassfish-*.jar - ADD docs.xml /opt/jetty/webapps/docs.xml ADD docs-web/target/docs-web-*.war /opt/jetty/webapps/docs.war diff --git a/docs-core/pom.xml b/docs-core/pom.xml index eac646db..ec6deaad 100644 --- a/docs-core/pom.xml +++ b/docs-core/pom.xml @@ -6,7 +6,7 @@ com.sismics.docs docs-parent 1.12-SNAPSHOT - .. + ../pom.xml 4.0.0 @@ -18,7 +18,7 @@ org.hibernate - hibernate-core + hibernate-core-jakarta @@ -63,8 +63,8 @@ - org.glassfish - javax.json + jakarta.json + jakarta.json-api @@ -190,25 +190,6 @@ postgresql - - - javax.xml.bind - jaxb-api - 2.3.0 - - - - com.sun.xml.bind - jaxb-core - 2.3.0 - - - - com.sun.xml.bind - jaxb-impl - 2.3.0 - - junit diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/AclDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/AclDao.java index 1338c7e3..ae44bc1f 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/AclDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/AclDao.java @@ -10,8 +10,8 @@ import com.sismics.docs.core.util.AuditLogUtil; import com.sismics.docs.core.util.SecurityUtil; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.Date; import java.util.List; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/AuditLogDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/AuditLogDao.java index cb3d54e9..955883bd 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/AuditLogDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/AuditLogDao.java @@ -12,7 +12,7 @@ import com.sismics.docs.core.util.jpa.QueryParam; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.sql.Timestamp; import java.util.*; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/AuthenticationTokenDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/AuthenticationTokenDao.java index 8455e6a8..27bc5533 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/AuthenticationTokenDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/AuthenticationTokenDao.java @@ -4,8 +4,8 @@ import com.sismics.docs.core.model.jpa.AuthenticationToken; import com.sismics.util.context.ThreadLocalContext; import org.joda.time.DateTime; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.Date; import java.util.List; import java.util.UUID; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/CommentDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/CommentDao.java index 7ff189e9..9bb5fc3c 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/CommentDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/CommentDao.java @@ -6,9 +6,9 @@ import com.sismics.docs.core.model.jpa.Comment; import com.sismics.docs.core.util.AuditLogUtil; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/ConfigDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/ConfigDao.java index 3db3b7d7..1e744679 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/ConfigDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/ConfigDao.java @@ -4,8 +4,8 @@ import com.sismics.docs.core.constant.ConfigType; import com.sismics.docs.core.model.jpa.Config; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; /** * Configuration parameter DAO. diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/ContributorDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/ContributorDao.java index a0ae23b4..a6cd6d83 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/ContributorDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/ContributorDao.java @@ -4,8 +4,8 @@ import com.sismics.docs.core.dao.dto.ContributorDto; import com.sismics.docs.core.model.jpa.Contributor; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.List; import java.util.UUID; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java index 9ce799e7..dd28032a 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java @@ -7,10 +7,10 @@ import com.sismics.docs.core.model.jpa.Document; import com.sismics.docs.core.util.AuditLogUtil; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; import java.sql.Timestamp; import java.util.Date; import java.util.List; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentMetadataDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentMetadataDao.java index 8e53b92e..9736efaa 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentMetadataDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentMetadataDao.java @@ -5,8 +5,8 @@ import com.sismics.docs.core.dao.dto.DocumentMetadataDto; import com.sismics.docs.core.model.jpa.DocumentMetadata; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.ArrayList; import java.util.List; import java.util.UUID; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java index 11803fb8..396c7773 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java @@ -5,9 +5,9 @@ import com.sismics.docs.core.model.jpa.File; import com.sismics.docs.core.util.AuditLogUtil; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; import java.util.Collections; import java.util.Date; import java.util.List; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/GroupDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/GroupDao.java index 64272beb..5f67d78b 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/GroupDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/GroupDao.java @@ -12,9 +12,9 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.util.*; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/MetadataDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/MetadataDao.java index afde9ea6..2867e2ad 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/MetadataDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/MetadataDao.java @@ -12,9 +12,9 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.util.*; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/PasswordRecoveryDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/PasswordRecoveryDao.java index ba94bf6e..71213343 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/PasswordRecoveryDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/PasswordRecoveryDao.java @@ -6,9 +6,9 @@ import com.sismics.util.context.ThreadLocalContext; import org.joda.time.DateTime; import org.joda.time.DurationFieldType; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.util.Date; import java.util.UUID; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/RelationDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/RelationDao.java index a384ecfe..11194630 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/RelationDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/RelationDao.java @@ -4,8 +4,8 @@ import com.sismics.docs.core.dao.dto.RelationDto; import com.sismics.docs.core.model.jpa.Relation; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.*; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/RoleBaseFunctionDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/RoleBaseFunctionDao.java index 718779e5..32536900 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/RoleBaseFunctionDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/RoleBaseFunctionDao.java @@ -3,8 +3,8 @@ package com.sismics.docs.core.dao; import com.google.common.collect.Sets; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.Set; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/RouteDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/RouteDao.java index 4b5b3afe..3cadd1c6 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/RouteDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/RouteDao.java @@ -11,7 +11,7 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.sql.Timestamp; import java.util.*; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/RouteModelDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/RouteModelDao.java index 2ae15bbe..dac826f0 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/RouteModelDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/RouteModelDao.java @@ -12,9 +12,9 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.sql.Timestamp; import java.util.*; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/RouteStepDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/RouteStepDao.java index 7244438c..acca0d37 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/RouteStepDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/RouteStepDao.java @@ -12,8 +12,8 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.sql.Timestamp; import java.util.*; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/ShareDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/ShareDao.java index c9eef07c..de5dbee7 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/ShareDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/ShareDao.java @@ -3,8 +3,8 @@ package com.sismics.docs.core.dao; import com.sismics.docs.core.model.jpa.Share; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import java.util.Date; import java.util.UUID; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/TagDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/TagDao.java index 8c1fa3a8..62869a85 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/TagDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/TagDao.java @@ -13,9 +13,9 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.util.*; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/UserDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/UserDao.java index 4a2a18d8..1107a8b9 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/UserDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/UserDao.java @@ -19,9 +19,9 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.sql.Timestamp; import java.util.*; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/VocabularyDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/VocabularyDao.java index 2dd5d373..1cb54e3c 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/VocabularyDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/VocabularyDao.java @@ -3,9 +3,9 @@ package com.sismics.docs.core.dao; import com.sismics.docs.core.model.jpa.Vocabulary; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.util.List; import java.util.UUID; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/WebhookDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/WebhookDao.java index 192c4c28..9f28266c 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/WebhookDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/WebhookDao.java @@ -9,9 +9,9 @@ import com.sismics.docs.core.util.jpa.QueryUtil; import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; import java.sql.Timestamp; import java.util.*; diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/dto/RouteStepDto.java b/docs-core/src/main/java/com/sismics/docs/core/dao/dto/RouteStepDto.java index 09de1be9..0f4763f9 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/dto/RouteStepDto.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/dto/RouteStepDto.java @@ -3,8 +3,8 @@ package com.sismics.docs.core.dao.dto; import com.sismics.docs.core.constant.RouteStepType; import com.sismics.util.JsonUtil; -import javax.json.Json; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObjectBuilder; /** * Route step DTO. diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Acl.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Acl.java index ba5baeec..7c0055d7 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Acl.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Acl.java @@ -4,7 +4,7 @@ import com.google.common.base.MoreObjects; import com.sismics.docs.core.constant.AclType; import com.sismics.docs.core.constant.PermType; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuditLog.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuditLog.java index 3b831891..95a4f181 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuditLog.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuditLog.java @@ -2,12 +2,12 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; import com.sismics.docs.core.constant.AuditLogType; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuthenticationToken.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuthenticationToken.java index 3b592bf2..8052bc92 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuthenticationToken.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/AuthenticationToken.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/BaseFunction.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/BaseFunction.java index 530d9fe8..7ca303a8 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/BaseFunction.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/BaseFunction.java @@ -1,9 +1,9 @@ package com.sismics.docs.core.model.jpa; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Comment.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Comment.java index 574eedc7..a34c97da 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Comment.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Comment.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Config.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Config.java index 65c196d6..a4ef6a56 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Config.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Config.java @@ -1,11 +1,11 @@ package com.sismics.docs.core.model.jpa; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; import com.sismics.docs.core.constant.ConfigType; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Contributor.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Contributor.java index b583a7b2..20ca1525 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Contributor.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Contributor.java @@ -1,9 +1,9 @@ package com.sismics.docs.core.model.jpa; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Document.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Document.java index 9fc76692..2bed3e14 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Document.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Document.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentMetadata.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentMetadata.java index 511834cb..120935e9 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentMetadata.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentMetadata.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.io.Serializable; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentTag.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentTag.java index bacc47df..7eeff3cb 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentTag.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/DocumentTag.java @@ -3,10 +3,10 @@ package com.sismics.docs.core.model.jpa; import java.io.Serializable; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java index 9daf0427..54d9abc4 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/File.java @@ -4,7 +4,7 @@ import com.google.common.base.MoreObjects; import com.google.common.base.Strings; import com.sismics.util.mime.MimeTypeUtil; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Group.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Group.java index 56c7fdea..4c516f5e 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Group.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Group.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Metadata.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Metadata.java index 8c64ec2d..b06fd331 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Metadata.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Metadata.java @@ -3,7 +3,7 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; import com.sismics.docs.core.constant.MetadataType; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/PasswordRecovery.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/PasswordRecovery.java index 6306c807..ec337f45 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/PasswordRecovery.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/PasswordRecovery.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Relation.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Relation.java index 9eeba90f..0ff25dbc 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Relation.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Relation.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Role.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Role.java index 287401d6..bff4bbd9 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Role.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Role.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RoleBaseFunction.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RoleBaseFunction.java index d4600244..5c793212 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RoleBaseFunction.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RoleBaseFunction.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Route.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Route.java index e597a077..e7173126 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Route.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Route.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteModel.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteModel.java index 89295739..e714ffe2 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteModel.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteModel.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteStep.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteStep.java index f591fe34..fd31643e 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteStep.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/RouteStep.java @@ -4,7 +4,7 @@ import com.google.common.base.MoreObjects; import com.sismics.docs.core.constant.RouteStepTransition; import com.sismics.docs.core.constant.RouteStepType; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Share.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Share.java index f27b6a65..e5813b22 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Share.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Share.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Tag.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Tag.java index 82a2f2cd..dcfb7be2 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Tag.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Tag.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/User.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/User.java index a7a7c382..0c48c91c 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/User.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/User.java @@ -2,10 +2,10 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/UserGroup.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/UserGroup.java index 3ae2592a..d0af30de 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/UserGroup.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/UserGroup.java @@ -3,10 +3,10 @@ package com.sismics.docs.core.model.jpa; import java.io.Serializable; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Vocabulary.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Vocabulary.java index 8e484a28..1639c57b 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Vocabulary.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Vocabulary.java @@ -1,9 +1,9 @@ package com.sismics.docs.core.model.jpa; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import com.google.common.base.MoreObjects; diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Webhook.java b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Webhook.java index a1db95d2..00ae9610 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Webhook.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Webhook.java @@ -3,7 +3,7 @@ package com.sismics.docs.core.model.jpa; import com.google.common.base.MoreObjects; import com.sismics.docs.core.constant.WebhookEvent; -import javax.persistence.*; +import jakarta.persistence.*; import java.util.Date; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/ActionUtil.java b/docs-core/src/main/java/com/sismics/docs/core/util/ActionUtil.java index 9d00b4b7..3425e403 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/ActionUtil.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/ActionUtil.java @@ -9,7 +9,7 @@ import com.sismics.docs.core.util.action.RemoveTagAction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.json.JsonObject; +import jakarta.json.JsonObject; /** * Action utilities. diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/AuditLogUtil.java b/docs-core/src/main/java/com/sismics/docs/core/util/AuditLogUtil.java index 5197a844..7168503e 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/AuditLogUtil.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/AuditLogUtil.java @@ -6,7 +6,7 @@ import com.sismics.docs.core.model.jpa.AuditLog; import com.sismics.docs.core.model.jpa.Loggable; import com.sismics.util.context.ThreadLocalContext; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; /** * Audit log utilities. diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/MetadataUtil.java b/docs-core/src/main/java/com/sismics/docs/core/util/MetadataUtil.java index 9a4ee5b9..99c61537 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/MetadataUtil.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/MetadataUtil.java @@ -10,9 +10,9 @@ import com.sismics.docs.core.dao.dto.MetadataDto; import com.sismics.docs.core.model.jpa.DocumentMetadata; import com.sismics.docs.core.util.jpa.SortCriteria; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; import java.text.MessageFormat; import java.util.List; import java.util.Map; diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/RoutingUtil.java b/docs-core/src/main/java/com/sismics/docs/core/util/RoutingUtil.java index 990cfc14..dc59e58b 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/RoutingUtil.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/RoutingUtil.java @@ -19,10 +19,10 @@ import com.sismics.docs.core.model.jpa.Document; import com.sismics.docs.core.model.jpa.RouteModel; import com.sismics.util.context.ThreadLocalContext; -import javax.json.Json; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.StringReader; import java.util.List; diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/TransactionUtil.java b/docs-core/src/main/java/com/sismics/docs/core/util/TransactionUtil.java index 20a12f0d..312903be 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/TransactionUtil.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/TransactionUtil.java @@ -5,8 +5,8 @@ import com.sismics.util.jpa.EMF; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.persistence.EntityManager; -import javax.persistence.EntityTransaction; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityTransaction; /** * Database transaction utils. diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/action/Action.java b/docs-core/src/main/java/com/sismics/docs/core/util/action/Action.java index 9e6090e2..597533e9 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/action/Action.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/action/Action.java @@ -2,7 +2,7 @@ package com.sismics.docs.core.util.action; import com.sismics.docs.core.dao.dto.DocumentDto; -import javax.json.JsonObject; +import jakarta.json.JsonObject; /** * Base action interface. diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/action/AddTagAction.java b/docs-core/src/main/java/com/sismics/docs/core/util/action/AddTagAction.java index 174d6d2d..2892beba 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/action/AddTagAction.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/action/AddTagAction.java @@ -6,7 +6,7 @@ import com.sismics.docs.core.dao.criteria.TagCriteria; import com.sismics.docs.core.dao.dto.DocumentDto; import com.sismics.docs.core.dao.dto.TagDto; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.util.List; import java.util.Set; diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/action/ProcessFilesAction.java b/docs-core/src/main/java/com/sismics/docs/core/util/action/ProcessFilesAction.java index 9f98f5ad..4ff3c6e5 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/action/ProcessFilesAction.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/action/ProcessFilesAction.java @@ -13,7 +13,7 @@ import com.sismics.util.context.ThreadLocalContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.nio.file.Path; import java.util.List; diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/action/RemoveTagAction.java b/docs-core/src/main/java/com/sismics/docs/core/util/action/RemoveTagAction.java index cc2a9630..ff2dc131 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/action/RemoveTagAction.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/action/RemoveTagAction.java @@ -6,7 +6,7 @@ import com.sismics.docs.core.dao.criteria.TagCriteria; import com.sismics.docs.core.dao.dto.DocumentDto; import com.sismics.docs.core.dao.dto.TagDto; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.util.List; import java.util.Set; diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/action/TagAction.java b/docs-core/src/main/java/com/sismics/docs/core/util/action/TagAction.java index e6fc8cf0..1deab2a3 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/action/TagAction.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/action/TagAction.java @@ -4,7 +4,7 @@ import com.sismics.docs.core.dao.TagDao; import com.sismics.docs.core.dao.criteria.TagCriteria; import com.sismics.docs.core.dao.dto.TagDto; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.util.List; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/indexing/LuceneIndexingHandler.java b/docs-core/src/main/java/com/sismics/docs/core/util/indexing/LuceneIndexingHandler.java index 7ec2e143..e9e8e734 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/indexing/LuceneIndexingHandler.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/indexing/LuceneIndexingHandler.java @@ -347,10 +347,8 @@ public class LuceneIndexingHandler implements IndexingHandler { criteriaList.add("d.DOC_DELETEDATE_D is null"); - if (!criteriaList.isEmpty()) { - sb.append(" where "); - sb.append(Joiner.on(" and ").join(criteriaList)); - } + sb.append(" where "); + sb.append(Joiner.on(" and ").join(criteriaList)); // Perform the search QueryParam queryParam = new QueryParam(sb.toString(), parameterMap); diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/jpa/PaginatedLists.java b/docs-core/src/main/java/com/sismics/docs/core/util/jpa/PaginatedLists.java index 15b51ad7..08748609 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/jpa/PaginatedLists.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/jpa/PaginatedLists.java @@ -1,6 +1,6 @@ package com.sismics.docs.core.util.jpa; -import javax.persistence.Query; +import jakarta.persistence.Query; import java.util.List; /** diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/jpa/QueryUtil.java b/docs-core/src/main/java/com/sismics/docs/core/util/jpa/QueryUtil.java index 3575636e..365cec4a 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/jpa/QueryUtil.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/jpa/QueryUtil.java @@ -2,8 +2,8 @@ package com.sismics.docs.core.util.jpa; import java.util.Map.Entry; -import javax.persistence.EntityManager; -import javax.persistence.Query; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; import com.sismics.util.context.ThreadLocalContext; diff --git a/docs-core/src/main/java/com/sismics/util/EmailUtil.java b/docs-core/src/main/java/com/sismics/util/EmailUtil.java index b60cd851..8767ee04 100644 --- a/docs-core/src/main/java/com/sismics/util/EmailUtil.java +++ b/docs-core/src/main/java/com/sismics/util/EmailUtil.java @@ -17,9 +17,9 @@ import org.jsoup.Jsoup; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Multipart; diff --git a/docs-core/src/main/java/com/sismics/util/JsonUtil.java b/docs-core/src/main/java/com/sismics/util/JsonUtil.java index 945c1b74..36548c06 100644 --- a/docs-core/src/main/java/com/sismics/util/JsonUtil.java +++ b/docs-core/src/main/java/com/sismics/util/JsonUtil.java @@ -1,7 +1,7 @@ package com.sismics.util; -import javax.json.Json; -import javax.json.JsonValue; +import jakarta.json.Json; +import jakarta.json.JsonValue; /** * JSON utilities. diff --git a/docs-core/src/main/java/com/sismics/util/context/ThreadLocalContext.java b/docs-core/src/main/java/com/sismics/util/context/ThreadLocalContext.java index 266ff944..db1e3770 100644 --- a/docs-core/src/main/java/com/sismics/util/context/ThreadLocalContext.java +++ b/docs-core/src/main/java/com/sismics/util/context/ThreadLocalContext.java @@ -3,7 +3,7 @@ package com.sismics.util.context; import com.google.common.collect.Lists; import com.sismics.docs.core.model.context.AppContext; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import java.util.Iterator; import java.util.List; diff --git a/docs-core/src/main/java/com/sismics/util/jpa/EMF.java b/docs-core/src/main/java/com/sismics/util/jpa/EMF.java index 91e788d0..5912e2ad 100644 --- a/docs-core/src/main/java/com/sismics/util/jpa/EMF.java +++ b/docs-core/src/main/java/com/sismics/util/jpa/EMF.java @@ -8,8 +8,8 @@ import org.hibernate.service.ServiceRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.persistence.EntityManagerFactory; -import javax.persistence.Persistence; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.Persistence; import java.io.IOException; import java.io.InputStream; import java.net.URL; diff --git a/docs-core/src/test/java/com/sismics/docs/BaseTransactionalTest.java b/docs-core/src/test/java/com/sismics/docs/BaseTransactionalTest.java index 8de90b68..9fff5fe7 100644 --- a/docs-core/src/test/java/com/sismics/docs/BaseTransactionalTest.java +++ b/docs-core/src/test/java/com/sismics/docs/BaseTransactionalTest.java @@ -5,8 +5,8 @@ import com.sismics.util.jpa.EMF; import org.junit.After; import org.junit.Before; -import javax.persistence.EntityManager; -import javax.persistence.EntityTransaction; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityTransaction; /** * Base class of tests with a transactional context. diff --git a/docs-web-common/pom.xml b/docs-web-common/pom.xml index be1aadcf..c1ff6b9e 100644 --- a/docs-web-common/pom.xml +++ b/docs-web-common/pom.xml @@ -6,7 +6,7 @@ com.sismics.docs docs-parent 1.12-SNAPSHOT - .. + ../pom.xml 4.0.0 @@ -54,8 +54,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/docs-web-common/src/main/java/com/sismics/rest/exception/ClientException.java b/docs-web-common/src/main/java/com/sismics/rest/exception/ClientException.java index 9a1a233d..e8c7b69d 100644 --- a/docs-web-common/src/main/java/com/sismics/rest/exception/ClientException.java +++ b/docs-web-common/src/main/java/com/sismics/rest/exception/ClientException.java @@ -1,12 +1,11 @@ package com.sismics.rest.exception; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.json.Json; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.Json; /** * Jersey exception encapsulating an error from the client (BAD_REQUEST). @@ -43,7 +42,7 @@ public class ClientException extends WebApplicationException { * @param message Human readable error message */ public ClientException(String type, String message) { - super(Response.status(Status.BAD_REQUEST).entity(Json.createObjectBuilder() + super(Response.status(Response.Status.BAD_REQUEST).entity(Json.createObjectBuilder() .add("type", type) .add("message", message).build()).build()); } diff --git a/docs-web-common/src/main/java/com/sismics/rest/exception/ForbiddenClientException.java b/docs-web-common/src/main/java/com/sismics/rest/exception/ForbiddenClientException.java index 7f92b32b..74596037 100644 --- a/docs-web-common/src/main/java/com/sismics/rest/exception/ForbiddenClientException.java +++ b/docs-web-common/src/main/java/com/sismics/rest/exception/ForbiddenClientException.java @@ -1,9 +1,9 @@ package com.sismics.rest.exception; -import javax.json.Json; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.Json; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; /** * Unauthorized access to the resource exception. diff --git a/docs-web-common/src/main/java/com/sismics/rest/exception/ServerException.java b/docs-web-common/src/main/java/com/sismics/rest/exception/ServerException.java index 76b80d47..c4a16e76 100644 --- a/docs-web-common/src/main/java/com/sismics/rest/exception/ServerException.java +++ b/docs-web-common/src/main/java/com/sismics/rest/exception/ServerException.java @@ -1,9 +1,9 @@ package com.sismics.rest.exception; -import javax.json.Json; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.Json; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/docs-web-common/src/main/java/com/sismics/rest/util/AclUtil.java b/docs-web-common/src/main/java/com/sismics/rest/util/AclUtil.java index c6bda473..61edae91 100644 --- a/docs-web-common/src/main/java/com/sismics/rest/util/AclUtil.java +++ b/docs-web-common/src/main/java/com/sismics/rest/util/AclUtil.java @@ -6,9 +6,9 @@ import com.sismics.docs.core.dao.AclDao; import com.sismics.docs.core.dao.dto.AclDto; import com.sismics.util.JsonUtil; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; import java.util.List; /** diff --git a/docs-web-common/src/main/java/com/sismics/rest/util/RestUtil.java b/docs-web-common/src/main/java/com/sismics/rest/util/RestUtil.java index 93c0e48c..cd749e53 100644 --- a/docs-web-common/src/main/java/com/sismics/rest/util/RestUtil.java +++ b/docs-web-common/src/main/java/com/sismics/rest/util/RestUtil.java @@ -6,8 +6,8 @@ import com.sismics.docs.core.util.FileUtil; import com.sismics.rest.exception.ServerException; import com.sismics.util.JsonUtil; -import javax.json.Json; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObjectBuilder; import java.io.IOException; import java.nio.file.Files; diff --git a/docs-web-common/src/main/java/com/sismics/util/filter/CorsFilter.java b/docs-web-common/src/main/java/com/sismics/util/filter/CorsFilter.java index 83c0c8d6..efa5a306 100644 --- a/docs-web-common/src/main/java/com/sismics/util/filter/CorsFilter.java +++ b/docs-web-common/src/main/java/com/sismics/util/filter/CorsFilter.java @@ -2,9 +2,9 @@ package com.sismics.util.filter; import com.sismics.util.EnvironmentUtil; -import javax.servlet.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.*; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; /** diff --git a/docs-web-common/src/main/java/com/sismics/util/filter/HeaderBasedSecurityFilter.java b/docs-web-common/src/main/java/com/sismics/util/filter/HeaderBasedSecurityFilter.java index d0a99e27..538381ec 100644 --- a/docs-web-common/src/main/java/com/sismics/util/filter/HeaderBasedSecurityFilter.java +++ b/docs-web-common/src/main/java/com/sismics/util/filter/HeaderBasedSecurityFilter.java @@ -4,8 +4,8 @@ import com.google.common.base.Strings; import com.sismics.docs.core.dao.UserDao; import com.sismics.docs.core.model.jpa.User; -import javax.servlet.FilterConfig; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.http.HttpServletRequest; /** * A header-based security filter that authenticates an user using the "X-Authenticated-User" request header as the user ID. diff --git a/docs-web-common/src/main/java/com/sismics/util/filter/RequestContextFilter.java b/docs-web-common/src/main/java/com/sismics/util/filter/RequestContextFilter.java index 8fecd0fb..6775338e 100644 --- a/docs-web-common/src/main/java/com/sismics/util/filter/RequestContextFilter.java +++ b/docs-web-common/src/main/java/com/sismics/util/filter/RequestContextFilter.java @@ -6,6 +6,9 @@ import com.sismics.docs.core.util.TransactionUtil; import com.sismics.util.EnvironmentUtil; import com.sismics.util.context.ThreadLocalContext; import com.sismics.util.jpa.EMF; +import jakarta.servlet.*; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.ws.rs.core.HttpHeaders; import org.apache.log4j.Level; import org.apache.log4j.PatternLayout; import org.apache.log4j.RollingFileAppender; @@ -13,11 +16,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.bridge.SLF4JBridgeHandler; -import javax.persistence.EntityManager; -import javax.persistence.EntityTransaction; -import javax.servlet.*; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.core.HttpHeaders; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityTransaction; import java.io.IOException; import java.text.MessageFormat; diff --git a/docs-web-common/src/main/java/com/sismics/util/filter/SecurityFilter.java b/docs-web-common/src/main/java/com/sismics/util/filter/SecurityFilter.java index 1aacbb9b..5e5f7b41 100644 --- a/docs-web-common/src/main/java/com/sismics/util/filter/SecurityFilter.java +++ b/docs-web-common/src/main/java/com/sismics/util/filter/SecurityFilter.java @@ -13,8 +13,8 @@ import org.joda.time.DateTimeZone; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.servlet.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.*; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.HashSet; import java.util.List; diff --git a/docs-web-common/src/main/java/com/sismics/util/filter/TokenBasedSecurityFilter.java b/docs-web-common/src/main/java/com/sismics/util/filter/TokenBasedSecurityFilter.java index bea91929..ae8a84ba 100644 --- a/docs-web-common/src/main/java/com/sismics/util/filter/TokenBasedSecurityFilter.java +++ b/docs-web-common/src/main/java/com/sismics/util/filter/TokenBasedSecurityFilter.java @@ -5,8 +5,8 @@ import com.sismics.docs.core.dao.UserDao; import com.sismics.docs.core.model.jpa.AuthenticationToken; import com.sismics.docs.core.model.jpa.User; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; import java.util.Date; diff --git a/docs-web-common/src/main/java/com/sismics/util/listener/IIOProviderContextListener.java b/docs-web-common/src/main/java/com/sismics/util/listener/IIOProviderContextListener.java new file mode 100644 index 00000000..2b96f7c4 --- /dev/null +++ b/docs-web-common/src/main/java/com/sismics/util/listener/IIOProviderContextListener.java @@ -0,0 +1,78 @@ +package com.sismics.util.listener; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import javax.imageio.ImageIO; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ServiceRegistry; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; + +/** + * Takes care of registering and de-registering local ImageIO plugins (service providers) for the servlet context. + *

+ * Registers all available plugins on {@code contextInitialized} event, using {@code ImageIO.scanForPlugins()}, to make + * sure they are available to the current servlet context. + * De-registers all plugins which have the {@link Thread#getContextClassLoader() current thread's context class loader} + * as its class loader on {@code contextDestroyed} event, to avoid class/resource leak. + *

+ * Copied from: https://github.com/haraldk/TwelveMonkeys + * + * @author Harald Kuhr + * @author last modified by $Author: haraldk$ + * @version $Id: IIOProviderContextListener.java,v 1.0 14.02.12 21:53 haraldk Exp$ + * @see ImageIO#scanForPlugins() + */ +public final class IIOProviderContextListener implements ServletContextListener { + + public void contextInitialized(final ServletContextEvent event) { + event.getServletContext().log("Scanning for locally installed ImageIO plugin providers"); + + // Registers all locally available IIO plugins. + ImageIO.scanForPlugins(); + } + + public void contextDestroyed(final ServletContextEvent event) { + ServletContext servletContext = event.getServletContext(); + + // De-register any locally registered IIO plugins. Relies on each web app having its own context class loader. + LocalFilter localFilter = new LocalFilter(Thread.currentThread().getContextClassLoader()); // scanForPlugins uses context class loader + + IIORegistry registry = IIORegistry.getDefaultInstance(); + Iterator> categories = registry.getCategories(); + + while (categories.hasNext()) { + deregisterLocalProvidersForCategory(registry, localFilter, categories.next(), servletContext); + } + } + + private static void deregisterLocalProvidersForCategory(IIORegistry registry, LocalFilter localFilter, Class category, ServletContext context) { + Iterator providers = registry.getServiceProviders(category, localFilter, false); + + // Copy the providers, as de-registering while iterating over providers will lead to ConcurrentModificationExceptions. + List providersCopy = new ArrayList<>(); + while (providers.hasNext()) { + providersCopy.add(providers.next()); + } + + for (T provider : providersCopy) { + registry.deregisterServiceProvider(provider, category); + context.log(String.format("Unregistered locally installed provider class: %s", provider.getClass())); + } + } + + static class LocalFilter implements ServiceRegistry.Filter { + private final ClassLoader loader; + + public LocalFilter(ClassLoader loader) { + this.loader = loader; + } + + public boolean filter(Object provider) { + return provider.getClass().getClassLoader() == loader; + } + } +} \ No newline at end of file diff --git a/docs-web-common/src/test/java/com/sismics/docs/rest/BaseJerseyTest.java b/docs-web-common/src/test/java/com/sismics/docs/rest/BaseJerseyTest.java index 0d8bcc57..4b95f731 100644 --- a/docs-web-common/src/test/java/com/sismics/docs/rest/BaseJerseyTest.java +++ b/docs-web-common/src/test/java/com/sismics/docs/rest/BaseJerseyTest.java @@ -20,8 +20,8 @@ import org.subethamail.wiser.WiserMessage; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; -import javax.ws.rs.core.Application; -import javax.ws.rs.core.UriBuilder; +import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.UriBuilder; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.URI; @@ -90,7 +90,7 @@ public abstract class BaseJerseyTest extends JerseyTest { httpServer = HttpServer.createSimpleServer(getClass().getResource("/").getFile(), "localhost", getPort()); WebappContext context = new WebappContext("GrizzlyContext", "/docs"); - context.addListener("com.twelvemonkeys.servlet.image.IIOProviderContextListener"); + context.addListener("com.sismics.util.listener.IIOProviderContextListener"); context.addFilter("requestContextFilter", RequestContextFilter.class) .addMappingForUrlPatterns(null, "/*"); context.addFilter("tokenBasedSecurityFilter", TokenBasedSecurityFilter.class) diff --git a/docs-web-common/src/test/java/com/sismics/docs/rest/util/ClientUtil.java b/docs-web-common/src/test/java/com/sismics/docs/rest/util/ClientUtil.java index 333fca60..6b7bb414 100644 --- a/docs-web-common/src/test/java/com/sismics/docs/rest/util/ClientUtil.java +++ b/docs-web-common/src/test/java/com/sismics/docs/rest/util/ClientUtil.java @@ -8,13 +8,13 @@ import org.glassfish.jersey.media.multipart.MultiPartFeature; import org.glassfish.jersey.media.multipart.file.StreamDataBodyPart; import org.junit.Assert; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.NewCookie; -import javax.ws.rs.core.Response; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.NewCookie; +import jakarta.ws.rs.core.Response; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; diff --git a/docs-web/pom.xml b/docs-web/pom.xml index 41c77194..20b06e16 100644 --- a/docs-web/pom.xml +++ b/docs-web/pom.xml @@ -6,7 +6,7 @@ com.sismics.docs docs-parent 1.12-SNAPSHOT - .. + ../pom.xml 4.0.0 @@ -79,8 +79,9 @@ - com.twelvemonkeys.servlet - servlet + jakarta.servlet + jakarta.servlet-api + provided diff --git a/docs-web/src/dev/main/webapp/web-override.xml b/docs-web/src/dev/main/webapp/web-override.xml index 1dea0dae..4e250a10 100644 --- a/docs-web/src/dev/main/webapp/web-override.xml +++ b/docs-web/src/dev/main/webapp/web-override.xml @@ -1,11 +1,10 @@ - + xmlns="https://jakarta.ee/xml/ns/jakartaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd" + version="5.0" + metadata-complete="true"> default diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/AclResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/AclResource.java index 60ebebe9..bdb48f97 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/AclResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/AclResource.java @@ -21,11 +21,11 @@ import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.ValidationUtil; import com.sismics.util.context.ThreadLocalContext; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.text.MessageFormat; import java.util.List; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java index 684d380b..45fc66bd 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java @@ -33,13 +33,13 @@ import org.apache.log4j.Level; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.persistence.EntityManager; -import javax.persistence.Query; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.io.IOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/AuditLogResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/AuditLogResource.java index 1c12c314..573cd8a3 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/AuditLogResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/AuditLogResource.java @@ -13,14 +13,14 @@ import com.sismics.docs.core.util.jpa.SortCriteria; import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.util.JsonUtil; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.GET; -import javax.ws.rs.NotFoundException; -import javax.ws.rs.Path; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.NotFoundException; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Response; /** * Audit log REST resources. diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java index 369467e9..6e3ca8d5 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java @@ -7,12 +7,13 @@ import com.sismics.security.IPrincipal; import com.sismics.security.UserPrincipal; import com.sismics.util.filter.SecurityFilter; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; + import java.security.Principal; import java.util.List; import java.util.Set; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/CommentResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/CommentResource.java index 42b19cac..4cfa164e 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/CommentResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/CommentResource.java @@ -9,11 +9,11 @@ import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.ValidationUtil; import com.sismics.util.ImageUtil; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.util.List; /** diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocsMessageBodyWriter.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocsMessageBodyWriter.java index acb4ba99..8307e599 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocsMessageBodyWriter.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocsMessageBodyWriter.java @@ -2,13 +2,13 @@ package com.sismics.docs.rest.resource; import org.glassfish.jersey.message.internal.ReaderWriter; -import javax.json.JsonObject; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; +import jakarta.json.JsonObject; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; import java.io.IOException; import java.io.OutputStream; import java.lang.annotation.Annotation; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java index 43742756..5fcb7c39 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java @@ -43,16 +43,16 @@ import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.DateTimeFormatterBuilder; import org.joda.time.format.DateTimeParser; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.internet.MimeMessage; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/FileResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/FileResource.java index 28636ac7..8f6a4bc6 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/FileResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/FileResource.java @@ -30,15 +30,15 @@ import com.sismics.util.mime.MimeType; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataParam; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.StreamingOutput; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.StreamingOutput; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/GroupResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/GroupResource.java index 7f71ede2..982d90a8 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/GroupResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/GroupResource.java @@ -21,11 +21,11 @@ import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.ValidationUtil; import com.sismics.util.JsonUtil; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.text.MessageFormat; import java.util.List; import java.util.Set; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/MetadataResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/MetadataResource.java index be271747..73e9d50f 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/MetadataResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/MetadataResource.java @@ -10,11 +10,11 @@ import com.sismics.docs.rest.constant.BaseFunction; import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.ValidationUtil; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.util.List; /** diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteModelResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteModelResource.java index 35a7cf69..f9de81af 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteModelResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteModelResource.java @@ -20,9 +20,9 @@ import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.AclUtil; import com.sismics.rest.util.ValidationUtil; -import javax.json.*; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.*; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.io.StringReader; import java.util.List; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteResource.java index f3320eab..cc65c660 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/RouteResource.java @@ -18,9 +18,9 @@ import com.sismics.rest.exception.ClientException; import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.ValidationUtil; -import javax.json.*; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.*; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.io.StringReader; import java.util.List; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/ShareResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/ShareResource.java index 417a26a9..ac347fb5 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/ShareResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/ShareResource.java @@ -15,10 +15,10 @@ import com.sismics.rest.util.ValidationUtil; import com.sismics.util.JsonUtil; import com.sismics.util.context.ThreadLocalContext; -import javax.json.Json; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.text.MessageFormat; import java.util.List; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/TagResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/TagResource.java index f44283e1..88aabcf8 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/TagResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/TagResource.java @@ -16,11 +16,11 @@ import com.sismics.rest.util.AclUtil; import com.sismics.rest.util.ValidationUtil; import org.apache.commons.lang3.StringUtils; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.text.MessageFormat; import java.util.List; import java.util.Set; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/ThemeResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/ThemeResource.java index 5762a3e8..fab2ddaa 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/ThemeResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/ThemeResource.java @@ -17,11 +17,11 @@ import com.sismics.util.css.Selector; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataParam; -import javax.json.*; -import javax.ws.rs.*; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; +import jakarta.json.*; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java index 87dfe962..6e8a2a1e 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java @@ -32,14 +32,14 @@ import com.sismics.util.totp.GoogleAuthenticator; import com.sismics.util.totp.GoogleAuthenticatorKey; import org.apache.commons.lang3.StringUtils; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.servlet.http.Cookie; -import javax.ws.rs.*; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.NewCookie; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.servlet.http.Cookie; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.NewCookie; +import jakarta.ws.rs.core.Response; import java.util.Date; import java.util.List; import java.util.Set; diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/VocabularyResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/VocabularyResource.java index 2f02909d..c82efff7 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/VocabularyResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/VocabularyResource.java @@ -6,11 +6,11 @@ import com.sismics.docs.rest.constant.BaseFunction; import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.ValidationUtil; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.util.List; /** diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/WebhookResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/WebhookResource.java index 46c96909..9b36f3da 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/WebhookResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/WebhookResource.java @@ -10,11 +10,11 @@ import com.sismics.docs.rest.constant.BaseFunction; import com.sismics.rest.exception.ForbiddenClientException; import com.sismics.rest.util.ValidationUtil; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Response; import java.util.List; /** diff --git a/docs-web/src/main/webapp/WEB-INF/web.xml b/docs-web/src/main/webapp/WEB-INF/web.xml index 5c62173a..720b328e 100644 --- a/docs-web/src/main/webapp/WEB-INF/web.xml +++ b/docs-web/src/main/webapp/WEB-INF/web.xml @@ -1,16 +1,16 @@ + xmlns="https://jakarta.ee/xml/ns/jakartaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd" + version="5.0" + metadata-complete="true"> Teedy ImageIO service provider loader/unloader - com.twelvemonkeys.servlet.image.IIOProviderContextListener + com.sismics.util.listener.IIOProviderContextListener @@ -25,7 +25,7 @@ /api/* - + requestContextFilter com.sismics.util.filter.RequestContextFilter diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestAclResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestAclResource.java index 8365780d..1bcd96ef 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestAclResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestAclResource.java @@ -4,12 +4,12 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.util.Date; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestAppResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestAppResource.java index d6109ab1..a60b87ea 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestAppResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestAppResource.java @@ -8,12 +8,12 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; /** diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestAuditLogResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestAuditLogResource.java index 5dcb6435..7dfecc3e 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestAuditLogResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestAuditLogResource.java @@ -4,10 +4,10 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; import java.util.Date; /** diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestCommentResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestCommentResource.java index d3a7c1f4..e5b27440 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestCommentResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestCommentResource.java @@ -2,11 +2,11 @@ package com.sismics.docs.rest; import java.util.Date; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import org.junit.Assert; import org.junit.Test; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestDocumentResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestDocumentResource.java index baffe0c4..7304e4d9 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestDocumentResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestDocumentResource.java @@ -11,13 +11,13 @@ import org.joda.time.format.DateTimeFormat; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.io.InputStream; import java.util.Date; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestFileResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestFileResource.java index ca2f8c24..93d6488c 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestFileResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestFileResource.java @@ -12,13 +12,13 @@ import org.glassfish.jersey.media.multipart.file.StreamDataBodyPart; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; @@ -442,7 +442,7 @@ public class TestFileResource extends BaseJerseyTest { try { clientUtil.addFileToDocument(FILE_EINSTEIN_ROOSEVELT_LETTER_PNG, fileQuotaToken, null); Assert.fail(); - } catch (javax.ws.rs.BadRequestException ignored) { + } catch (jakarta.ws.rs.BadRequestException ignored) { } // Deletes a file diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestGroupResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestGroupResource.java index 785ea611..d68a5b3d 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestGroupResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestGroupResource.java @@ -4,11 +4,11 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; import java.util.ArrayList; import java.util.List; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestMetadataResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestMetadataResource.java index 630c684a..656a144c 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestMetadataResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestMetadataResource.java @@ -4,10 +4,10 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; /** diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java index c6fd94eb..2adf0ca1 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java @@ -4,10 +4,10 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; /** diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java index e2e7478b..fc09d63b 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java @@ -4,11 +4,11 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; /** diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestSecurity.java b/docs-web/src/test/java/com/sismics/docs/rest/TestSecurity.java index 07001614..d5984d45 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestSecurity.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestSecurity.java @@ -1,10 +1,10 @@ package com.sismics.docs.rest; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import com.sismics.util.filter.HeaderBasedSecurityFilter; import org.junit.Assert; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestShareResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestShareResource.java index 5dc86364..0d465423 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestShareResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestShareResource.java @@ -2,13 +2,13 @@ package com.sismics.docs.rest; import java.io.InputStream; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import org.glassfish.jersey.media.multipart.FormDataMultiPart; import org.glassfish.jersey.media.multipart.MultiPartFeature; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestTagResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestTagResource.java index bf98a570..0b0e5dcd 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestTagResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestTagResource.java @@ -4,12 +4,12 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; /** * Test the tag resource. diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestThemeResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestThemeResource.java index 5f314476..6d085bce 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestThemeResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestThemeResource.java @@ -8,11 +8,11 @@ import org.glassfish.jersey.media.multipart.file.StreamDataBodyPart; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import java.io.InputStream; /** diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestUserResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestUserResource.java index 14986a7e..e967f46b 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestUserResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestUserResource.java @@ -5,12 +5,12 @@ import com.sismics.util.totp.GoogleAuthenticator; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.util.Date; import java.util.Locale; import java.util.regex.Matcher; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestVocabularyResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestVocabularyResource.java index 869c39b0..d45f8966 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestVocabularyResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestVocabularyResource.java @@ -4,11 +4,11 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; /** * Exhaustive test of the vocabulary resource. diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestWebhookResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestWebhookResource.java index 08a34a34..6a10281c 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestWebhookResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestWebhookResource.java @@ -5,10 +5,10 @@ import com.sismics.util.filter.TokenBasedSecurityFilter; import org.junit.Assert; import org.junit.Test; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Form; import java.util.Date; diff --git a/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java b/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java index 512a6e64..c81d9a47 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java @@ -1,11 +1,11 @@ package com.sismics.docs.rest.resource; -import javax.json.JsonObject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.json.JsonObject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; /** * Webhook REST resources. diff --git a/pom.xml b/pom.xml index b4dc8b80..7cb9be5d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,7 @@ 1.7.30 4.13.2 1.4.199 - 2.39 - 1.1.4 + 2.1.1 0.10.2 8.7.0 4.2 @@ -37,7 +36,6 @@ 1.70 2.12.2 5.6.15.Final - 3.1.0 2.0.4 5.13.0 3.9.4 @@ -50,16 +48,18 @@ 4.10.0 2.1.2 - 9.4.51.v20230217 - 9.4.51.v20230217 - 9.4.51.v20230217 + 3.0.10 + 5.0.0 + 11.0.14 + 11.0.14 + 11.0.14 3.1.0 3.3.0 3.3.2 3.0.0 - 9.4.51.v20230217 + 11.0.14 @@ -170,9 +170,9 @@ - javax.servlet - javax.servlet-api - ${javax.servlet.javax.servlet-api.version} + jakarta.servlet + jakarta.servlet-api + ${jakarta.servlet.jakarta.servlet-api.version} @@ -315,9 +315,9 @@ - org.glassfish - javax.json - ${org.glassfish.javax.json.version} + jakarta.json + jakarta.json-api + ${jakarta.json.jakarta.json-api.version} @@ -328,7 +328,7 @@ org.hibernate - hibernate-core + hibernate-core-jakarta ${org.hibernate.hibernate.version} @@ -452,13 +452,6 @@ ${org.apache.directory.api.api-all.version} - - - com.twelvemonkeys.servlet - servlet - ${com.twelvemonkeys.imageio.version} - -