From 6aed863892121e28c295738506337442e21c62ff Mon Sep 17 00:00:00 2001 From: Olivier Barais Date: Wed, 10 Jan 2024 19:08:42 +0100 Subject: [PATCH 1/5] update to quarkus 3 --- pom.xml | 67 ++++++--- .../java/fr/istic/config/FooDeserializer.java | 6 +- .../java/fr/istic/config/FooSerializer.java | 6 +- .../fr/istic/config/JsonbConfiguration.java | 4 +- .../fr/istic/config/LocalDateProvider.java | 6 +- src/main/java/fr/istic/config/SPARouting.java | 4 +- .../domain/Answer2HybridGradedComment.java | 4 +- src/main/java/fr/istic/domain/Authority.java | 14 +- src/main/java/fr/istic/domain/Comments.java | 4 +- src/main/java/fr/istic/domain/Course.java | 6 +- .../java/fr/istic/domain/CourseGroup.java | 6 +- src/main/java/fr/istic/domain/Exam.java | 8 +- src/main/java/fr/istic/domain/ExamSheet.java | 6 +- .../java/fr/istic/domain/FinalResult.java | 4 +- .../java/fr/istic/domain/GradedComment.java | 4 +- .../fr/istic/domain/HybridGradedComment.java | 4 +- src/main/java/fr/istic/domain/Question.java | 6 +- .../java/fr/istic/domain/QuestionType.java | 4 +- src/main/java/fr/istic/domain/Scan.java | 4 +- src/main/java/fr/istic/domain/Student.java | 6 +- .../java/fr/istic/domain/StudentResponse.java | 6 +- src/main/java/fr/istic/domain/Template.java | 6 +- .../java/fr/istic/domain/TextComment.java | 4 +- src/main/java/fr/istic/domain/User.java | 12 +- src/main/java/fr/istic/domain/Zone.java | 2 +- .../istic/security/BCryptPasswordHasher.java | 2 +- .../security/UserNotActivatedException.java | 2 +- .../security/UsernameNotFoundException.java | 2 +- .../fr/istic/security/jwt/TokenProvider.java | 6 +- .../Answer2HybridGradedCommentService.java | 6 +- .../istic/service/AuthenticationService.java | 4 +- .../service/CacheStudentPdfFService.java | 6 +- .../fr/istic/service/CacheUploadService.java | 6 +- .../fr/istic/service/CommentsService.java | 6 +- .../fr/istic/service/CourseGroupService.java | 6 +- .../java/fr/istic/service/CourseService.java | 6 +- .../java/fr/istic/service/ExamService.java | 6 +- .../fr/istic/service/ExamSheetService.java | 6 +- .../fr/istic/service/FichierS3Service.java | 4 +- .../fr/istic/service/FinalResultService.java | 6 +- .../istic/service/GradedCommentService.java | 6 +- .../service/HybridGradedCommentService.java | 6 +- .../fr/istic/service/ImportExportService.java | 8 +- .../service/InvalidPasswordException.java | 6 +- .../java/fr/istic/service/MailService.java | 4 +- .../istic/service/ManagementInfoService.java | 4 +- .../fr/istic/service/QuestionService.java | 6 +- .../fr/istic/service/QuestionTypeService.java | 6 +- .../java/fr/istic/service/ScanService.java | 8 +- .../fr/istic/service/SecurityService.java | 4 +- .../istic/service/StudentResponseService.java | 6 +- .../java/fr/istic/service/StudentService.java | 6 +- .../fr/istic/service/TemplateService.java | 6 +- .../fr/istic/service/TextCommentService.java | 6 +- .../java/fr/istic/service/UserService.java | 6 +- .../java/fr/istic/service/ZoneService.java | 6 +- .../java/fr/istic/service/dto/CourseDTO.java | 4 +- .../fr/istic/service/dto/CourseGroupDTO.java | 4 +- .../java/fr/istic/service/dto/ExamDTO.java | 4 +- .../fr/istic/service/dto/ExamSheetDTO.java | 4 +- .../istic/service/dto/GradedCommentDTO.java | 2 +- .../service/dto/HybridGradedCommentDTO.java | 2 +- .../istic/service/dto/ManagementInfoDTO.java | 2 +- .../fr/istic/service/dto/QuestionDTO.java | 2 +- .../fr/istic/service/dto/QuestionTypeDTO.java | 4 +- .../java/fr/istic/service/dto/ScanDTO.java | 4 +- .../fr/istic/service/dto/ScanDTOContent.java | 4 +- .../java/fr/istic/service/dto/StudentDTO.java | 2 +- .../fr/istic/service/dto/TemplateDTO.java | 2 +- .../istic/service/dto/TemplateDTOContent.java | 4 +- .../fr/istic/service/dto/TextCommentDTO.java | 4 +- .../java/fr/istic/service/dto/UserDTO.java | 8 +- .../Answer2HybridGradedCommentMapper.java | 2 +- .../istic/service/mapper/CommentsMapper.java | 2 +- .../service/mapper/CourseGroupMapper.java | 2 +- .../fr/istic/service/mapper/CourseMapper.java | 2 +- .../fr/istic/service/mapper/ExamMapper.java | 2 +- .../istic/service/mapper/ExamSheetMapper.java | 2 +- .../service/mapper/FinalResultMapper.java | 2 +- .../service/mapper/GradedCommentMapper.java | 2 +- .../mapper/HybridGradedCommentMapper.java | 2 +- .../istic/service/mapper/QuestionMapper.java | 2 +- .../service/mapper/QuestionTypeMapper.java | 2 +- .../service/mapper/ScanContentMapper.java | 2 +- .../fr/istic/service/mapper/ScanMapper.java | 2 +- .../istic/service/mapper/StudentMapper.java | 2 +- .../service/mapper/StudentResponseMapper.java | 2 +- .../service/mapper/TemplateContentMapper.java | 2 +- .../istic/service/mapper/TemplateMapper.java | 2 +- .../service/mapper/TextCommentMapper.java | 2 +- .../fr/istic/service/mapper/UserMapper.java | 2 +- .../fr/istic/service/mapper/ZoneMapper.java | 2 +- .../fr/istic/web/rest/AccountResource.java | 18 +-- .../Answer2HybridGradedCommentResource.java | 12 +- .../fr/istic/web/rest/AuthorityResource.java | 16 +-- src/main/java/fr/istic/web/rest/CasAuth.java | 12 +- .../fr/istic/web/rest/CommentsResource.java | 12 +- .../istic/web/rest/CourseGroupResource.java | 14 +- .../fr/istic/web/rest/CourseResource.java | 14 +- .../java/fr/istic/web/rest/ExamResource.java | 16 +-- .../fr/istic/web/rest/ExamSheetResource.java | 16 +-- .../java/fr/istic/web/rest/ExtendedAPI.java | 16 +-- .../istic/web/rest/FinalResultResource.java | 12 +- .../istic/web/rest/GradedCommentResource.java | 12 +- .../web/rest/HybridGradedCommentResource.java | 12 +- .../rest/JHipsterConfigurationEndpoint.java | 12 +- .../web/rest/JHipsterLoggersEndpoint.java | 10 +- .../web/rest/JHipsterMetricsEndpoint.java | 10 +- .../web/rest/ManagementInfoResource.java | 16 +-- .../fr/istic/web/rest/QuestionResource.java | 14 +- .../istic/web/rest/QuestionTypeResource.java | 14 +- .../java/fr/istic/web/rest/ScanResource.java | 14 +- src/main/java/fr/istic/web/rest/ShibAuth.java | 14 +- .../fr/istic/web/rest/StudentResource.java | 14 +- .../web/rest/StudentResponseResource.java | 12 +- .../fr/istic/web/rest/TemplateResource.java | 14 +- .../istic/web/rest/TextCommentResource.java | 12 +- .../fr/istic/web/rest/UserJWTController.java | 22 +-- .../java/fr/istic/web/rest/UserResource.java | 22 +-- .../java/fr/istic/web/rest/ZoneResource.java | 12 +- .../rest/errors/BadRequestAlertException.java | 6 +- .../rest/errors/EmailNotFoundException.java | 6 +- .../errors/UserNotAuthenticatedException.java | 6 +- .../java/fr/istic/web/rest/vm/LoginVM.java | 4 +- .../fr/istic/web/rest/vm/ManagedUserVM.java | 2 +- .../fr/istic/web/rest/vm/PageRequestVM.java | 6 +- .../fr/istic/web/rest/vm/SortRequestVM.java | 2 +- .../java/fr/istic/web/util/HeaderUtil.java | 8 +- .../fr/istic/web/util/PaginationUtil.java | 6 +- .../java/fr/istic/web/util/ResponseUtil.java | 2 +- src/main/resources/application.properties | 11 +- src/main/resources/resources-config.json | 15 ++ src/test/java/fr/istic/TestUtil.java | 12 +- .../istic/config/LocalDateProviderTest.java | 2 +- .../istic/config/mock/JHipsterInfoMock.java | 2 +- .../java/fr/istic/service/MailServiceIT.java | 2 +- .../service/mapper/CommentsMapperTest.java | 22 --- .../service/mapper/CourseGroupMapperTest.java | 22 --- .../service/mapper/CourseMapperTest.java | 22 --- .../istic/service/mapper/ExamMapperTest.java | 22 --- .../service/mapper/ExamSheetMapperTest.java | 22 --- .../service/mapper/FinalResultMapperTest.java | 22 --- .../mapper/GradedCommentMapperTest.java | 22 --- .../service/mapper/QuestionMapperTest.java | 22 --- .../mapper/QuestionTypeMapperTest.java | 22 --- .../istic/service/mapper/ScanMapperTest.java | 22 --- .../service/mapper/StudentMapperTest.java | 22 --- .../mapper/StudentResponseMapperTest.java | 22 --- .../service/mapper/TemplateMapperTest.java | 22 --- .../service/mapper/TextCommentMapperTest.java | 22 --- .../istic/service/mapper/UserMapperTest.java | 136 ------------------ .../istic/service/mapper/ZoneMapperTest.java | 22 --- .../istic/web/rest/AccountResourceTest.java | 12 +- .../istic/web/rest/CommentsResourceTest.java | 6 +- .../web/rest/CourseGroupResourceTest.java | 8 +- .../fr/istic/web/rest/CourseResourceTest.java | 8 +- .../fr/istic/web/rest/ExamResourceTest.java | 10 +- .../istic/web/rest/ExamSheetResourceTest.java | 10 +- .../web/rest/FinalResultResourceTest.java | 10 +- .../web/rest/GradedCommentResourceTest.java | 6 +- .../web/rest/ManagementInfoResourceTest.java | 4 +- .../istic/web/rest/QuestionResourceTest.java | 6 +- .../web/rest/QuestionTypeResourceTest.java | 10 +- .../istic/web/rest/StudentResourceTest.java | 8 +- .../web/rest/StudentResponseResourceTest.java | 6 +- .../web/rest/TextCommentResourceTest.java | 10 +- .../istic/web/rest/UserJWTControllerTest.java | 8 +- .../fr/istic/web/rest/UserResourceTest.java | 12 +- .../fr/istic/web/rest/ZoneResourceTest.java | 10 +- 169 files changed, 568 insertions(+), 995 deletions(-) delete mode 100644 src/test/java/fr/istic/service/mapper/CommentsMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/CourseGroupMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/CourseMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/ExamMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/ExamSheetMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/FinalResultMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/GradedCommentMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/QuestionMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/QuestionTypeMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/ScanMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/StudentMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/StudentResponseMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/TemplateMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/TextCommentMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/UserMapperTest.java delete mode 100644 src/test/java/fr/istic/service/mapper/ZoneMapperTest.java diff --git a/pom.xml b/pom.xml index ccc94a8..2534818 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ 3.6.4 8.27 4.0.0 - 0.8.5 + 0.8.10 ${jacoco.utReportFolder}/test.exec ${project.build.directory}/jacoco/test 11 @@ -33,16 +33,16 @@ yyyyMMddHHmmss ${java.version} ${java.version} - 3.6.3 + 3.8.1 v18.12.0 8.19.2 UTF-8 UTF-8 ${project.build.directory}/test-results 1.0.0 - 2.16.8.Final + 3.6.4 org.jboss.logmanager.LogManager - 2.16.8.Final + 3.6.4 3.7.0.1746 @@ -57,17 +57,32 @@ - + + + org.apache.pdfbox pdfbox - 3.0.0 - + 3.0.1 + + + + io.quarkus + quarkus-awt + 3.6.4 + + + - - io.quarkiverse.minio - quarkus-minio - 2.9.2 - + + + io.quarkiverse.minio + quarkus-minio + 3.3.1 + io.quarkus quarkus-undertow @@ -186,6 +201,7 @@ org.assertj assertj-core + 3.25.1 test @@ -210,13 +226,20 @@ io.quarkiverse.jdbc quarkus-jdbc-sqlite - 1.0.3 + 3.0.7 - + + + + org.apereo.cas.client + cas-client-core + 4.0.3 + + compile quarkus:dev @@ -274,7 +297,7 @@ - + maven-javadoc-plugin ${maven-javadoc-plugin.version} @@ -351,9 +374,9 @@ You are running an incompatible version of Java. JHipster Quarkus supports JDK - 8 to - 17. - [1.8,19) + 17 to + 21. + [17,22) @@ -369,7 +392,7 @@ maven-resources-plugin ${maven-resources-plugin.version} - + maven-failsafe-plugin ${maven-failsafe-plugin.version} diff --git a/src/main/java/fr/istic/config/FooDeserializer.java b/src/main/java/fr/istic/config/FooDeserializer.java index 05eeb56..99eaae1 100644 --- a/src/main/java/fr/istic/config/FooDeserializer.java +++ b/src/main/java/fr/istic/config/FooDeserializer.java @@ -3,9 +3,9 @@ import java.lang.reflect.Type; import java.util.Base64; -import javax.json.bind.serializer.DeserializationContext; -import javax.json.bind.serializer.JsonbDeserializer; -import javax.json.stream.JsonParser; +import jakarta.json.bind.serializer.DeserializationContext; +import jakarta.json.bind.serializer.JsonbDeserializer; +import jakarta.json.stream.JsonParser; public class FooDeserializer implements JsonbDeserializer { diff --git a/src/main/java/fr/istic/config/FooSerializer.java b/src/main/java/fr/istic/config/FooSerializer.java index ce68505..2afb3c7 100644 --- a/src/main/java/fr/istic/config/FooSerializer.java +++ b/src/main/java/fr/istic/config/FooSerializer.java @@ -2,14 +2,14 @@ import java.util.Base64; -import javax.json.bind.serializer.JsonbSerializer; -import javax.json.bind.serializer.SerializationContext; +import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.serializer.SerializationContext; public class FooSerializer implements JsonbSerializer { @Override - public void serialize(byte[] obj, javax.json.stream.JsonGenerator generator, SerializationContext ctx) { + public void serialize(byte[] obj, jakarta.json.stream.JsonGenerator generator, SerializationContext ctx) { Base64.Encoder encoder = Base64.getEncoder(); byte[] encodedContent = encoder.encode(obj); generator.write( new String(encodedContent)); diff --git a/src/main/java/fr/istic/config/JsonbConfiguration.java b/src/main/java/fr/istic/config/JsonbConfiguration.java index e3ff2a7..94ab8f6 100644 --- a/src/main/java/fr/istic/config/JsonbConfiguration.java +++ b/src/main/java/fr/istic/config/JsonbConfiguration.java @@ -2,8 +2,8 @@ import io.quarkus.jsonb.JsonbConfigCustomizer; -import javax.inject.Singleton; -import javax.json.bind.JsonbConfig; +import jakarta.inject.Singleton; +import jakarta.json.bind.JsonbConfig; import java.util.Locale; /** diff --git a/src/main/java/fr/istic/config/LocalDateProvider.java b/src/main/java/fr/istic/config/LocalDateProvider.java index 6e9ab35..7f141aa 100644 --- a/src/main/java/fr/istic/config/LocalDateProvider.java +++ b/src/main/java/fr/istic/config/LocalDateProvider.java @@ -1,8 +1,8 @@ package fr.istic.config; -import javax.ws.rs.ext.ParamConverter; -import javax.ws.rs.ext.ParamConverterProvider; -import javax.ws.rs.ext.Provider; +import jakarta.ws.rs.ext.ParamConverter; +import jakarta.ws.rs.ext.ParamConverterProvider; +import jakarta.ws.rs.ext.Provider; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.time.LocalDate; diff --git a/src/main/java/fr/istic/config/SPARouting.java b/src/main/java/fr/istic/config/SPARouting.java index 0da36c2..6ce0408 100644 --- a/src/main/java/fr/istic/config/SPARouting.java +++ b/src/main/java/fr/istic/config/SPARouting.java @@ -4,8 +4,8 @@ import java.util.regex.Pattern; import java.util.stream.Stream; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; import io.vertx.ext.web.Router; diff --git a/src/main/java/fr/istic/domain/Answer2HybridGradedComment.java b/src/main/java/fr/istic/domain/Answer2HybridGradedComment.java index 31c8ca2..43f140e 100644 --- a/src/main/java/fr/istic/domain/Answer2HybridGradedComment.java +++ b/src/main/java/fr/istic/domain/Answer2HybridGradedComment.java @@ -4,8 +4,8 @@ import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import java.io.Serializable; -import javax.json.bind.annotation.JsonbTransient; -import javax.persistence.*; +import jakarta.json.bind.annotation.JsonbTransient; +import jakarta.persistence.*; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; diff --git a/src/main/java/fr/istic/domain/Authority.java b/src/main/java/fr/istic/domain/Authority.java index 4916896..ac427cb 100644 --- a/src/main/java/fr/istic/domain/Authority.java +++ b/src/main/java/fr/istic/domain/Authority.java @@ -4,13 +4,13 @@ import io.quarkus.runtime.annotations.RegisterForReflection; import java.io.Serializable; import java.util.Objects; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.persistence.*; /** * An authority (a security role). diff --git a/src/main/java/fr/istic/domain/Comments.java b/src/main/java/fr/istic/domain/Comments.java index 0893381..59e8ad7 100644 --- a/src/main/java/fr/istic/domain/Comments.java +++ b/src/main/java/fr/istic/domain/Comments.java @@ -1,12 +1,12 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.List; diff --git a/src/main/java/fr/istic/domain/Course.java b/src/main/java/fr/istic/domain/Course.java index d5e8462..f1af240 100644 --- a/src/main/java/fr/istic/domain/Course.java +++ b/src/main/java/fr/istic/domain/Course.java @@ -1,13 +1,13 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/CourseGroup.java b/src/main/java/fr/istic/domain/CourseGroup.java index acb0bf1..f82f6bf 100644 --- a/src/main/java/fr/istic/domain/CourseGroup.java +++ b/src/main/java/fr/istic/domain/CourseGroup.java @@ -1,13 +1,13 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/Exam.java b/src/main/java/fr/istic/domain/Exam.java index bf65e48..095b178 100644 --- a/src/main/java/fr/istic/domain/Exam.java +++ b/src/main/java/fr/istic/domain/Exam.java @@ -1,14 +1,14 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; -import javax.transaction.Transactional; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.transaction.Transactional; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/ExamSheet.java b/src/main/java/fr/istic/domain/ExamSheet.java index 21c7f02..534caa2 100644 --- a/src/main/java/fr/istic/domain/ExamSheet.java +++ b/src/main/java/fr/istic/domain/ExamSheet.java @@ -1,13 +1,13 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/FinalResult.java b/src/main/java/fr/istic/domain/FinalResult.java index be3b7ae..ec46255 100644 --- a/src/main/java/fr/istic/domain/FinalResult.java +++ b/src/main/java/fr/istic/domain/FinalResult.java @@ -1,12 +1,12 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; diff --git a/src/main/java/fr/istic/domain/GradedComment.java b/src/main/java/fr/istic/domain/GradedComment.java index fcc9809..aa37927 100644 --- a/src/main/java/fr/istic/domain/GradedComment.java +++ b/src/main/java/fr/istic/domain/GradedComment.java @@ -1,10 +1,10 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/HybridGradedComment.java b/src/main/java/fr/istic/domain/HybridGradedComment.java index 200fe87..1ddf6b2 100644 --- a/src/main/java/fr/istic/domain/HybridGradedComment.java +++ b/src/main/java/fr/istic/domain/HybridGradedComment.java @@ -6,8 +6,8 @@ import java.io.Serializable; import java.util.HashSet; import java.util.Set; -import javax.json.bind.annotation.JsonbTransient; -import javax.persistence.*; +import jakarta.json.bind.annotation.JsonbTransient; +import jakarta.persistence.*; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; diff --git a/src/main/java/fr/istic/domain/Question.java b/src/main/java/fr/istic/domain/Question.java index 13bd680..859794b 100644 --- a/src/main/java/fr/istic/domain/Question.java +++ b/src/main/java/fr/istic/domain/Question.java @@ -1,11 +1,11 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/QuestionType.java b/src/main/java/fr/istic/domain/QuestionType.java index b07cdee..22bfe1d 100644 --- a/src/main/java/fr/istic/domain/QuestionType.java +++ b/src/main/java/fr/istic/domain/QuestionType.java @@ -3,8 +3,8 @@ import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import java.io.Serializable; diff --git a/src/main/java/fr/istic/domain/Scan.java b/src/main/java/fr/istic/domain/Scan.java index db7fee5..3c20702 100644 --- a/src/main/java/fr/istic/domain/Scan.java +++ b/src/main/java/fr/istic/domain/Scan.java @@ -5,8 +5,8 @@ import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/Student.java b/src/main/java/fr/istic/domain/Student.java index 58b5cc2..8c6d2d3 100644 --- a/src/main/java/fr/istic/domain/Student.java +++ b/src/main/java/fr/istic/domain/Student.java @@ -1,13 +1,13 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/StudentResponse.java b/src/main/java/fr/istic/domain/StudentResponse.java index 21f3ea0..57ee433 100644 --- a/src/main/java/fr/istic/domain/StudentResponse.java +++ b/src/main/java/fr/istic/domain/StudentResponse.java @@ -1,11 +1,11 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.persistence.*; -import javax.transaction.Transactional; +import jakarta.persistence.*; +import jakarta.transaction.Transactional; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/Template.java b/src/main/java/fr/istic/domain/Template.java index 85b3639..e6c58b3 100644 --- a/src/main/java/fr/istic/domain/Template.java +++ b/src/main/java/fr/istic/domain/Template.java @@ -1,13 +1,13 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; -import javax.validation.constraints.*; +import jakarta.persistence.*; +import jakarta.validation.constraints.*; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/src/main/java/fr/istic/domain/TextComment.java b/src/main/java/fr/istic/domain/TextComment.java index 9a993b1..a29939b 100644 --- a/src/main/java/fr/istic/domain/TextComment.java +++ b/src/main/java/fr/istic/domain/TextComment.java @@ -1,12 +1,12 @@ package fr.istic.domain; import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import javax.json.bind.annotation.JsonbTransient; +import jakarta.json.bind.annotation.JsonbTransient; import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.HashSet; diff --git a/src/main/java/fr/istic/domain/User.java b/src/main/java/fr/istic/domain/User.java index 359b7ef..de1016b 100644 --- a/src/main/java/fr/istic/domain/User.java +++ b/src/main/java/fr/istic/domain/User.java @@ -11,13 +11,13 @@ import java.util.List; import java.util.Optional; import java.util.Set; -import javax.persistence.*; +import jakarta.persistence.*; import org.hibernate.annotations.BatchSize; -import javax.json.bind.annotation.JsonbTransient; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; +import jakarta.json.bind.annotation.JsonbTransient; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.Cache; diff --git a/src/main/java/fr/istic/domain/Zone.java b/src/main/java/fr/istic/domain/Zone.java index f3b74ed..c10f462 100644 --- a/src/main/java/fr/istic/domain/Zone.java +++ b/src/main/java/fr/istic/domain/Zone.java @@ -3,7 +3,7 @@ import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.persistence.*; +import jakarta.persistence.*; import java.io.Serializable; import java.util.Set; diff --git a/src/main/java/fr/istic/security/BCryptPasswordHasher.java b/src/main/java/fr/istic/security/BCryptPasswordHasher.java index a7946c5..240c196 100644 --- a/src/main/java/fr/istic/security/BCryptPasswordHasher.java +++ b/src/main/java/fr/istic/security/BCryptPasswordHasher.java @@ -4,7 +4,7 @@ import java.security.SecureRandom; import java.security.spec.InvalidKeySpecException; import java.util.Objects; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.wildfly.security.credential.PasswordCredential; import org.wildfly.security.evidence.PasswordGuessEvidence; import org.wildfly.security.password.Password; diff --git a/src/main/java/fr/istic/security/UserNotActivatedException.java b/src/main/java/fr/istic/security/UserNotActivatedException.java index 8f6f340..ab20863 100644 --- a/src/main/java/fr/istic/security/UserNotActivatedException.java +++ b/src/main/java/fr/istic/security/UserNotActivatedException.java @@ -1,6 +1,6 @@ package fr.istic.security; -import javax.ws.rs.NotAuthorizedException; +import jakarta.ws.rs.NotAuthorizedException; public class UserNotActivatedException extends NotAuthorizedException { diff --git a/src/main/java/fr/istic/security/UsernameNotFoundException.java b/src/main/java/fr/istic/security/UsernameNotFoundException.java index a15e160..24b580d 100644 --- a/src/main/java/fr/istic/security/UsernameNotFoundException.java +++ b/src/main/java/fr/istic/security/UsernameNotFoundException.java @@ -1,6 +1,6 @@ package fr.istic.security; -import javax.ws.rs.NotAuthorizedException; +import jakarta.ws.rs.NotAuthorizedException; public class UsernameNotFoundException extends NotAuthorizedException { diff --git a/src/main/java/fr/istic/security/jwt/TokenProvider.java b/src/main/java/fr/istic/security/jwt/TokenProvider.java index c1273bc..c813d27 100644 --- a/src/main/java/fr/istic/security/jwt/TokenProvider.java +++ b/src/main/java/fr/istic/security/jwt/TokenProvider.java @@ -10,9 +10,9 @@ import java.util.Base64; import java.util.Date; import java.util.UUID; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.jose4j.jws.AlgorithmIdentifiers; import org.jose4j.jws.JsonWebSignature; import org.jose4j.jwt.JwtClaims; diff --git a/src/main/java/fr/istic/service/Answer2HybridGradedCommentService.java b/src/main/java/fr/istic/service/Answer2HybridGradedCommentService.java index a8a08f4..7df4e99 100644 --- a/src/main/java/fr/istic/service/Answer2HybridGradedCommentService.java +++ b/src/main/java/fr/istic/service/Answer2HybridGradedCommentService.java @@ -10,9 +10,9 @@ import java.util.stream.Collector; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/service/AuthenticationService.java b/src/main/java/fr/istic/service/AuthenticationService.java index dc18f50..b545a17 100644 --- a/src/main/java/fr/istic/service/AuthenticationService.java +++ b/src/main/java/fr/istic/service/AuthenticationService.java @@ -9,8 +9,8 @@ import io.quarkus.security.runtime.QuarkusSecurityIdentity; import java.util.Locale; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/service/CacheStudentPdfFService.java b/src/main/java/fr/istic/service/CacheStudentPdfFService.java index bc81b38..2ec3a5b 100644 --- a/src/main/java/fr/istic/service/CacheStudentPdfFService.java +++ b/src/main/java/fr/istic/service/CacheStudentPdfFService.java @@ -7,9 +7,9 @@ import org.jboss.resteasy.plugins.providers.multipart.InputPart; import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.ws.rs.core.MultivaluedMap; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.ws.rs.core.MultivaluedMap; import java.io.File; import java.io.FileOutputStream; diff --git a/src/main/java/fr/istic/service/CacheUploadService.java b/src/main/java/fr/istic/service/CacheUploadService.java index a1cbd16..a9d6837 100644 --- a/src/main/java/fr/istic/service/CacheUploadService.java +++ b/src/main/java/fr/istic/service/CacheUploadService.java @@ -6,9 +6,9 @@ import org.jboss.resteasy.plugins.providers.multipart.InputPart; import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.ws.rs.core.MultivaluedMap; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.ws.rs.core.MultivaluedMap; import java.io.File; import java.io.FileOutputStream; diff --git a/src/main/java/fr/istic/service/CommentsService.java b/src/main/java/fr/istic/service/CommentsService.java index 3202139..836fa92 100644 --- a/src/main/java/fr/istic/service/CommentsService.java +++ b/src/main/java/fr/istic/service/CommentsService.java @@ -7,9 +7,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/CourseGroupService.java b/src/main/java/fr/istic/service/CourseGroupService.java index bc8851e..f94e518 100644 --- a/src/main/java/fr/istic/service/CourseGroupService.java +++ b/src/main/java/fr/istic/service/CourseGroupService.java @@ -7,9 +7,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/CourseService.java b/src/main/java/fr/istic/service/CourseService.java index 26ad0f4..a82c2b3 100644 --- a/src/main/java/fr/istic/service/CourseService.java +++ b/src/main/java/fr/istic/service/CourseService.java @@ -15,9 +15,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/service/ExamService.java b/src/main/java/fr/istic/service/ExamService.java index 15f6075..6f9574c 100644 --- a/src/main/java/fr/istic/service/ExamService.java +++ b/src/main/java/fr/istic/service/ExamService.java @@ -23,9 +23,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.io.IOException; import java.security.InvalidKeyException; diff --git a/src/main/java/fr/istic/service/ExamSheetService.java b/src/main/java/fr/istic/service/ExamSheetService.java index a4352f9..4f0db7f 100644 --- a/src/main/java/fr/istic/service/ExamSheetService.java +++ b/src/main/java/fr/istic/service/ExamSheetService.java @@ -8,9 +8,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.List; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/FichierS3Service.java b/src/main/java/fr/istic/service/FichierS3Service.java index 99d48dd..dd62f4c 100644 --- a/src/main/java/fr/istic/service/FichierS3Service.java +++ b/src/main/java/fr/istic/service/FichierS3Service.java @@ -13,8 +13,8 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.slf4j.Logger; diff --git a/src/main/java/fr/istic/service/FinalResultService.java b/src/main/java/fr/istic/service/FinalResultService.java index 07deece..6595cb4 100644 --- a/src/main/java/fr/istic/service/FinalResultService.java +++ b/src/main/java/fr/istic/service/FinalResultService.java @@ -7,9 +7,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/GradedCommentService.java b/src/main/java/fr/istic/service/GradedCommentService.java index 2dddb3a..93339ae 100644 --- a/src/main/java/fr/istic/service/GradedCommentService.java +++ b/src/main/java/fr/istic/service/GradedCommentService.java @@ -8,9 +8,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.List; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/HybridGradedCommentService.java b/src/main/java/fr/istic/service/HybridGradedCommentService.java index 140e1be..e323afb 100644 --- a/src/main/java/fr/istic/service/HybridGradedCommentService.java +++ b/src/main/java/fr/istic/service/HybridGradedCommentService.java @@ -12,9 +12,9 @@ import java.util.stream.Collector; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/service/ImportExportService.java b/src/main/java/fr/istic/service/ImportExportService.java index acb0ce1..ef84dae 100644 --- a/src/main/java/fr/istic/service/ImportExportService.java +++ b/src/main/java/fr/istic/service/ImportExportService.java @@ -16,10 +16,10 @@ import java.util.stream.Collector; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; -import javax.ws.rs.core.MultivaluedMap; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; +import jakarta.ws.rs.core.MultivaluedMap; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.jboss.resteasy.plugins.providers.multipart.InputPart; diff --git a/src/main/java/fr/istic/service/InvalidPasswordException.java b/src/main/java/fr/istic/service/InvalidPasswordException.java index 5f354bd..49e45ed 100644 --- a/src/main/java/fr/istic/service/InvalidPasswordException.java +++ b/src/main/java/fr/istic/service/InvalidPasswordException.java @@ -1,9 +1,9 @@ package fr.istic.service; -import static javax.ws.rs.core.Response.Status.BAD_REQUEST; +import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; public class InvalidPasswordException extends WebApplicationException { diff --git a/src/main/java/fr/istic/service/MailService.java b/src/main/java/fr/istic/service/MailService.java index 3b928bf..71e4cba 100644 --- a/src/main/java/fr/istic/service/MailService.java +++ b/src/main/java/fr/istic/service/MailService.java @@ -7,8 +7,8 @@ import io.quarkus.mailer.reactive.ReactiveMailer; import io.quarkus.qute.Location; import java.util.concurrent.CompletionStage; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/service/ManagementInfoService.java b/src/main/java/fr/istic/service/ManagementInfoService.java index 6b62047..75fa323 100644 --- a/src/main/java/fr/istic/service/ManagementInfoService.java +++ b/src/main/java/fr/istic/service/ManagementInfoService.java @@ -4,8 +4,8 @@ import fr.istic.config.JHipsterInfo; import fr.istic.service.dto.ManagementInfoDTO; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; /** * Provides information for management/info resource diff --git a/src/main/java/fr/istic/service/QuestionService.java b/src/main/java/fr/istic/service/QuestionService.java index 46e4917..fd5a63a 100644 --- a/src/main/java/fr/istic/service/QuestionService.java +++ b/src/main/java/fr/istic/service/QuestionService.java @@ -17,9 +17,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.ArrayList; import java.util.HashSet; diff --git a/src/main/java/fr/istic/service/QuestionTypeService.java b/src/main/java/fr/istic/service/QuestionTypeService.java index 36c8c98..856a728 100644 --- a/src/main/java/fr/istic/service/QuestionTypeService.java +++ b/src/main/java/fr/istic/service/QuestionTypeService.java @@ -7,9 +7,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/ScanService.java b/src/main/java/fr/istic/service/ScanService.java index 54654b8..c006388 100644 --- a/src/main/java/fr/istic/service/ScanService.java +++ b/src/main/java/fr/istic/service/ScanService.java @@ -24,9 +24,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -37,7 +37,7 @@ import org.jboss.resteasy.plugins.providers.multipart.InputPart; -import javax.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.MultivaluedMap; import java.io.InputStream; import java.nio.file.Files; diff --git a/src/main/java/fr/istic/service/SecurityService.java b/src/main/java/fr/istic/service/SecurityService.java index f5c249e..ec6acb9 100644 --- a/src/main/java/fr/istic/service/SecurityService.java +++ b/src/main/java/fr/istic/service/SecurityService.java @@ -4,8 +4,8 @@ import java.util.Optional; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.ws.rs.core.SecurityContext; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.ws.rs.core.SecurityContext; import fr.istic.domain.Answer2HybridGradedComment; import fr.istic.domain.Authority; diff --git a/src/main/java/fr/istic/service/StudentResponseService.java b/src/main/java/fr/istic/service/StudentResponseService.java index 7d0aba0..f6e32d3 100644 --- a/src/main/java/fr/istic/service/StudentResponseService.java +++ b/src/main/java/fr/istic/service/StudentResponseService.java @@ -8,9 +8,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.Collections; import java.util.List; diff --git a/src/main/java/fr/istic/service/StudentService.java b/src/main/java/fr/istic/service/StudentService.java index b3fe5f3..86ab07e 100644 --- a/src/main/java/fr/istic/service/StudentService.java +++ b/src/main/java/fr/istic/service/StudentService.java @@ -8,9 +8,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/TemplateService.java b/src/main/java/fr/istic/service/TemplateService.java index b00a28f..aef2438 100644 --- a/src/main/java/fr/istic/service/TemplateService.java +++ b/src/main/java/fr/istic/service/TemplateService.java @@ -18,9 +18,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.io.IOException; import java.security.InvalidKeyException; diff --git a/src/main/java/fr/istic/service/TextCommentService.java b/src/main/java/fr/istic/service/TextCommentService.java index 27b6727..a9c43f1 100644 --- a/src/main/java/fr/istic/service/TextCommentService.java +++ b/src/main/java/fr/istic/service/TextCommentService.java @@ -8,9 +8,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.List; import java.util.Optional; diff --git a/src/main/java/fr/istic/service/UserService.java b/src/main/java/fr/istic/service/UserService.java index 22e4a25..bb67203 100644 --- a/src/main/java/fr/istic/service/UserService.java +++ b/src/main/java/fr/istic/service/UserService.java @@ -12,9 +12,9 @@ import java.time.Instant; import java.util.*; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/service/ZoneService.java b/src/main/java/fr/istic/service/ZoneService.java index e5d13a2..83c4745 100644 --- a/src/main/java/fr/istic/service/ZoneService.java +++ b/src/main/java/fr/istic/service/ZoneService.java @@ -10,9 +10,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; import java.util.Optional; @ApplicationScoped diff --git a/src/main/java/fr/istic/service/dto/CourseDTO.java b/src/main/java/fr/istic/service/dto/CourseDTO.java index 375d921..f95a762 100644 --- a/src/main/java/fr/istic/service/dto/CourseDTO.java +++ b/src/main/java/fr/istic/service/dto/CourseDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -13,7 +13,7 @@ */ @RegisterForReflection public class CourseDTO implements Serializable { - + public Long id; @NotNull diff --git a/src/main/java/fr/istic/service/dto/CourseGroupDTO.java b/src/main/java/fr/istic/service/dto/CourseGroupDTO.java index 54321ac..e4aff3b 100644 --- a/src/main/java/fr/istic/service/dto/CourseGroupDTO.java +++ b/src/main/java/fr/istic/service/dto/CourseGroupDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -13,7 +13,7 @@ */ @RegisterForReflection public class CourseGroupDTO implements Serializable { - + public Long id; @NotNull diff --git a/src/main/java/fr/istic/service/dto/ExamDTO.java b/src/main/java/fr/istic/service/dto/ExamDTO.java index bf075fb..e2f59b0 100644 --- a/src/main/java/fr/istic/service/dto/ExamDTO.java +++ b/src/main/java/fr/istic/service/dto/ExamDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.Objects; @@ -11,7 +11,7 @@ */ @RegisterForReflection public class ExamDTO implements Serializable { - + public Long id; @NotNull diff --git a/src/main/java/fr/istic/service/dto/ExamSheetDTO.java b/src/main/java/fr/istic/service/dto/ExamSheetDTO.java index e0c7e4c..039b442 100644 --- a/src/main/java/fr/istic/service/dto/ExamSheetDTO.java +++ b/src/main/java/fr/istic/service/dto/ExamSheetDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.Objects; @@ -11,7 +11,7 @@ */ @RegisterForReflection public class ExamSheetDTO implements Serializable { - + public Long id; @NotNull diff --git a/src/main/java/fr/istic/service/dto/GradedCommentDTO.java b/src/main/java/fr/istic/service/dto/GradedCommentDTO.java index 3701439..3fef376 100644 --- a/src/main/java/fr/istic/service/dto/GradedCommentDTO.java +++ b/src/main/java/fr/istic/service/dto/GradedCommentDTO.java @@ -4,7 +4,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; import java.io.Serializable; import java.util.Objects; -import javax.persistence.Lob; +import jakarta.persistence.Lob; /** * A DTO for the {@link fr.istic.domain.GradedComment} entity. diff --git a/src/main/java/fr/istic/service/dto/HybridGradedCommentDTO.java b/src/main/java/fr/istic/service/dto/HybridGradedCommentDTO.java index 14e09c5..7af26cb 100644 --- a/src/main/java/fr/istic/service/dto/HybridGradedCommentDTO.java +++ b/src/main/java/fr/istic/service/dto/HybridGradedCommentDTO.java @@ -3,7 +3,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; import java.io.Serializable; import java.util.Objects; -import javax.persistence.Lob; +import jakarta.persistence.Lob; /** * A DTO for the {@link fr.istic.domain.HybridGradedComment} entity. diff --git a/src/main/java/fr/istic/service/dto/ManagementInfoDTO.java b/src/main/java/fr/istic/service/dto/ManagementInfoDTO.java index 40fc2c5..f94e4df 100644 --- a/src/main/java/fr/istic/service/dto/ManagementInfoDTO.java +++ b/src/main/java/fr/istic/service/dto/ManagementInfoDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.json.bind.annotation.JsonbProperty; +import jakarta.json.bind.annotation.JsonbProperty; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/service/dto/QuestionDTO.java b/src/main/java/fr/istic/service/dto/QuestionDTO.java index ddce5b0..1ff6d3e 100644 --- a/src/main/java/fr/istic/service/dto/QuestionDTO.java +++ b/src/main/java/fr/istic/service/dto/QuestionDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import fr.istic.domain.enumeration.GradeType; diff --git a/src/main/java/fr/istic/service/dto/QuestionTypeDTO.java b/src/main/java/fr/istic/service/dto/QuestionTypeDTO.java index 68c48d9..25a98e8 100644 --- a/src/main/java/fr/istic/service/dto/QuestionTypeDTO.java +++ b/src/main/java/fr/istic/service/dto/QuestionTypeDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.Objects; @@ -11,7 +11,7 @@ */ @RegisterForReflection public class QuestionTypeDTO implements Serializable { - + public Long id; @NotNull diff --git a/src/main/java/fr/istic/service/dto/ScanDTO.java b/src/main/java/fr/istic/service/dto/ScanDTO.java index 2b1f695..72d8f6a 100644 --- a/src/main/java/fr/istic/service/dto/ScanDTO.java +++ b/src/main/java/fr/istic/service/dto/ScanDTO.java @@ -2,10 +2,10 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.Objects; -import javax.persistence.Lob; +import jakarta.persistence.Lob; /** * A DTO for the {@link fr.istic.domain.Scan} entity. diff --git a/src/main/java/fr/istic/service/dto/ScanDTOContent.java b/src/main/java/fr/istic/service/dto/ScanDTOContent.java index 9201eb7..a01ff82 100644 --- a/src/main/java/fr/istic/service/dto/ScanDTOContent.java +++ b/src/main/java/fr/istic/service/dto/ScanDTOContent.java @@ -2,10 +2,10 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.Objects; -import javax.persistence.Lob; +import jakarta.persistence.Lob; /** * A DTO for the {@link fr.istic.domain.Scan} entity. diff --git a/src/main/java/fr/istic/service/dto/StudentDTO.java b/src/main/java/fr/istic/service/dto/StudentDTO.java index b9f8515..3864d66 100644 --- a/src/main/java/fr/istic/service/dto/StudentDTO.java +++ b/src/main/java/fr/istic/service/dto/StudentDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; diff --git a/src/main/java/fr/istic/service/dto/TemplateDTO.java b/src/main/java/fr/istic/service/dto/TemplateDTO.java index 14b25ca..aaa0221 100644 --- a/src/main/java/fr/istic/service/dto/TemplateDTO.java +++ b/src/main/java/fr/istic/service/dto/TemplateDTO.java @@ -2,7 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; /** diff --git a/src/main/java/fr/istic/service/dto/TemplateDTOContent.java b/src/main/java/fr/istic/service/dto/TemplateDTOContent.java index 2831f4f..8b03d6e 100644 --- a/src/main/java/fr/istic/service/dto/TemplateDTOContent.java +++ b/src/main/java/fr/istic/service/dto/TemplateDTOContent.java @@ -2,10 +2,10 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.*; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.Objects; -import javax.persistence.Lob; +import jakarta.persistence.Lob; /** * A DTO for the {@link fr.istic.domain.Template} entity. diff --git a/src/main/java/fr/istic/service/dto/TextCommentDTO.java b/src/main/java/fr/istic/service/dto/TextCommentDTO.java index dcbea44..26ba642 100644 --- a/src/main/java/fr/istic/service/dto/TextCommentDTO.java +++ b/src/main/java/fr/istic/service/dto/TextCommentDTO.java @@ -4,14 +4,14 @@ import io.quarkus.runtime.annotations.RegisterForReflection; import java.io.Serializable; import java.util.Objects; -import javax.persistence.Lob; +import jakarta.persistence.Lob; /** * A DTO for the {@link fr.istic.domain.TextComment} entity. */ @RegisterForReflection public class TextCommentDTO implements Serializable { - + public Long id; public String text; diff --git a/src/main/java/fr/istic/service/dto/UserDTO.java b/src/main/java/fr/istic/service/dto/UserDTO.java index 1dcd6e1..7160067 100644 --- a/src/main/java/fr/istic/service/dto/UserDTO.java +++ b/src/main/java/fr/istic/service/dto/UserDTO.java @@ -7,10 +7,10 @@ import java.time.Instant; import java.util.Set; import java.util.stream.Collectors; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; /** * A DTO representing a user, with his authorities. diff --git a/src/main/java/fr/istic/service/mapper/Answer2HybridGradedCommentMapper.java b/src/main/java/fr/istic/service/mapper/Answer2HybridGradedCommentMapper.java index 37e2e91..227e09c 100644 --- a/src/main/java/fr/istic/service/mapper/Answer2HybridGradedCommentMapper.java +++ b/src/main/java/fr/istic/service/mapper/Answer2HybridGradedCommentMapper.java @@ -7,7 +7,7 @@ /** * Mapper for the entity {@link Answer2HybridGradedComment} and its DTO {@link Answer2HybridGradedCommentDTO}. */ -@Mapper(componentModel = "cdi", uses = { HybridGradedCommentMapper.class, StudentResponseMapper.class }, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = { HybridGradedCommentMapper.class, StudentResponseMapper.class }, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface Answer2HybridGradedCommentMapper extends EntityMapper { @Mapping(source = "hybridcomments.id", target = "hybridcommentsId") @Mapping(source = "hybridcomments.text", target = "hybridcommentsText") diff --git a/src/main/java/fr/istic/service/mapper/CommentsMapper.java b/src/main/java/fr/istic/service/mapper/CommentsMapper.java index 6520c5f..f7f419a 100644 --- a/src/main/java/fr/istic/service/mapper/CommentsMapper.java +++ b/src/main/java/fr/istic/service/mapper/CommentsMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Comments} and its DTO {@link CommentsDTO}. */ -@Mapper(componentModel = "cdi", uses = {StudentResponseMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {StudentResponseMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface CommentsMapper extends EntityMapper { @Mapping(source = "studentResponse.id", target = "studentResponseId") diff --git a/src/main/java/fr/istic/service/mapper/CourseGroupMapper.java b/src/main/java/fr/istic/service/mapper/CourseGroupMapper.java index 943dd7f..c054a6a 100644 --- a/src/main/java/fr/istic/service/mapper/CourseGroupMapper.java +++ b/src/main/java/fr/istic/service/mapper/CourseGroupMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link CourseGroup} and its DTO {@link CourseGroupDTO}. */ -@Mapper(componentModel = "cdi", uses = {StudentMapper.class, CourseMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {StudentMapper.class, CourseMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface CourseGroupMapper extends EntityMapper { @Mapping(source = "course.id", target = "courseId") diff --git a/src/main/java/fr/istic/service/mapper/CourseMapper.java b/src/main/java/fr/istic/service/mapper/CourseMapper.java index 2b30495..629f655 100644 --- a/src/main/java/fr/istic/service/mapper/CourseMapper.java +++ b/src/main/java/fr/istic/service/mapper/CourseMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Course} and its DTO {@link CourseDTO}. */ -@Mapper(componentModel = "cdi", uses = {UserMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {UserMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface CourseMapper extends EntityMapper { // @Mapping(source = "prof.id", target = "profId") diff --git a/src/main/java/fr/istic/service/mapper/ExamMapper.java b/src/main/java/fr/istic/service/mapper/ExamMapper.java index 311dd50..5bdaba2 100644 --- a/src/main/java/fr/istic/service/mapper/ExamMapper.java +++ b/src/main/java/fr/istic/service/mapper/ExamMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Exam} and its DTO {@link ExamDTO}. */ -@Mapper(componentModel = "cdi", uses = {TemplateMapper.class, ZoneMapper.class, ScanMapper.class, CourseMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {TemplateMapper.class, ZoneMapper.class, ScanMapper.class, CourseMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface ExamMapper extends EntityMapper { @Mapping(source = "template.id", target = "templateId") diff --git a/src/main/java/fr/istic/service/mapper/ExamSheetMapper.java b/src/main/java/fr/istic/service/mapper/ExamSheetMapper.java index ca630b0..973995c 100644 --- a/src/main/java/fr/istic/service/mapper/ExamSheetMapper.java +++ b/src/main/java/fr/istic/service/mapper/ExamSheetMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link ExamSheet} and its DTO {@link ExamSheetDTO}. */ -@Mapper(componentModel = "cdi", uses = {ScanMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {ScanMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface ExamSheetMapper extends EntityMapper { @Mapping(source = "scan.id", target = "scanId") diff --git a/src/main/java/fr/istic/service/mapper/FinalResultMapper.java b/src/main/java/fr/istic/service/mapper/FinalResultMapper.java index d805b7e..7014833 100644 --- a/src/main/java/fr/istic/service/mapper/FinalResultMapper.java +++ b/src/main/java/fr/istic/service/mapper/FinalResultMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link FinalResult} and its DTO {@link FinalResultDTO}. */ -@Mapper(componentModel = "cdi", uses = {StudentMapper.class, ExamMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {StudentMapper.class, ExamMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface FinalResultMapper extends EntityMapper { @Mapping(source = "student.id", target = "studentId") diff --git a/src/main/java/fr/istic/service/mapper/GradedCommentMapper.java b/src/main/java/fr/istic/service/mapper/GradedCommentMapper.java index 72afe6d..3ed10c8 100644 --- a/src/main/java/fr/istic/service/mapper/GradedCommentMapper.java +++ b/src/main/java/fr/istic/service/mapper/GradedCommentMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link GradedComment} and its DTO {@link GradedCommentDTO}. */ -@Mapper(componentModel = "cdi", uses = {QuestionMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {QuestionMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface GradedCommentMapper extends EntityMapper { @Mapping(source = "question.id", target = "questionId") diff --git a/src/main/java/fr/istic/service/mapper/HybridGradedCommentMapper.java b/src/main/java/fr/istic/service/mapper/HybridGradedCommentMapper.java index eee5127..dd11625 100644 --- a/src/main/java/fr/istic/service/mapper/HybridGradedCommentMapper.java +++ b/src/main/java/fr/istic/service/mapper/HybridGradedCommentMapper.java @@ -7,7 +7,7 @@ /** * Mapper for the entity {@link HybridGradedComment} and its DTO {@link HybridGradedCommentDTO}. */ -@Mapper(componentModel = "cdi", uses = {QuestionMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {QuestionMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface HybridGradedCommentMapper extends EntityMapper { @Mapping(source = "question.id", target = "questionId") @Mapping(source = "grade", target = "grade", qualifiedByName = "quarterpoint2point") diff --git a/src/main/java/fr/istic/service/mapper/QuestionMapper.java b/src/main/java/fr/istic/service/mapper/QuestionMapper.java index 9e51cec..95b5cbd 100644 --- a/src/main/java/fr/istic/service/mapper/QuestionMapper.java +++ b/src/main/java/fr/istic/service/mapper/QuestionMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Question} and its DTO {@link QuestionDTO}. */ -@Mapper(componentModel = "cdi", uses = {ZoneMapper.class, QuestionTypeMapper.class, ExamMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {ZoneMapper.class, QuestionTypeMapper.class, ExamMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface QuestionMapper extends EntityMapper { @Mapping(source = "zone.id", target = "zoneId") diff --git a/src/main/java/fr/istic/service/mapper/QuestionTypeMapper.java b/src/main/java/fr/istic/service/mapper/QuestionTypeMapper.java index aaac615..2226022 100644 --- a/src/main/java/fr/istic/service/mapper/QuestionTypeMapper.java +++ b/src/main/java/fr/istic/service/mapper/QuestionTypeMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link QuestionType} and its DTO {@link QuestionTypeDTO}. */ -@Mapper(componentModel = "cdi", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface QuestionTypeMapper extends EntityMapper { diff --git a/src/main/java/fr/istic/service/mapper/ScanContentMapper.java b/src/main/java/fr/istic/service/mapper/ScanContentMapper.java index 2f89e8d..b7d0eb6 100644 --- a/src/main/java/fr/istic/service/mapper/ScanContentMapper.java +++ b/src/main/java/fr/istic/service/mapper/ScanContentMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Scan} and its DTO {@link ScanDTOContent}. */ -@Mapper(componentModel = "cdi", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface ScanContentMapper extends EntityMapper { diff --git a/src/main/java/fr/istic/service/mapper/ScanMapper.java b/src/main/java/fr/istic/service/mapper/ScanMapper.java index 779a9df..5e91e77 100644 --- a/src/main/java/fr/istic/service/mapper/ScanMapper.java +++ b/src/main/java/fr/istic/service/mapper/ScanMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Scan} and its DTO {@link ScanDTO}. */ -@Mapper(componentModel = "cdi", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface ScanMapper extends EntityMapper { diff --git a/src/main/java/fr/istic/service/mapper/StudentMapper.java b/src/main/java/fr/istic/service/mapper/StudentMapper.java index 3751319..1360b8d 100644 --- a/src/main/java/fr/istic/service/mapper/StudentMapper.java +++ b/src/main/java/fr/istic/service/mapper/StudentMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Student} and its DTO {@link StudentDTO}. */ -@Mapper(componentModel = "cdi", uses = {ExamSheetMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {ExamSheetMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface StudentMapper extends EntityMapper { diff --git a/src/main/java/fr/istic/service/mapper/StudentResponseMapper.java b/src/main/java/fr/istic/service/mapper/StudentResponseMapper.java index ad82b12..8a2a333 100644 --- a/src/main/java/fr/istic/service/mapper/StudentResponseMapper.java +++ b/src/main/java/fr/istic/service/mapper/StudentResponseMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link StudentResponse} and its DTO {@link StudentResponseDTO}. */ -@Mapper(componentModel = "cdi", uses = {QuestionMapper.class, ExamSheetMapper.class, TextCommentMapper.class, GradedCommentMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {QuestionMapper.class, ExamSheetMapper.class, TextCommentMapper.class, GradedCommentMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface StudentResponseMapper extends EntityMapper { @Mapping(source = "question.id", target = "questionId") diff --git a/src/main/java/fr/istic/service/mapper/TemplateContentMapper.java b/src/main/java/fr/istic/service/mapper/TemplateContentMapper.java index 22ca650..6c22f3b 100644 --- a/src/main/java/fr/istic/service/mapper/TemplateContentMapper.java +++ b/src/main/java/fr/istic/service/mapper/TemplateContentMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Template} and its DTO {@link TemplateDTOContent}. */ -@Mapper(componentModel = "cdi", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface TemplateContentMapper extends EntityMapper { diff --git a/src/main/java/fr/istic/service/mapper/TemplateMapper.java b/src/main/java/fr/istic/service/mapper/TemplateMapper.java index 14a3354..1629233 100644 --- a/src/main/java/fr/istic/service/mapper/TemplateMapper.java +++ b/src/main/java/fr/istic/service/mapper/TemplateMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Template} and its DTO {@link TemplateDTO}. */ -@Mapper(componentModel = "cdi", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface TemplateMapper extends EntityMapper { diff --git a/src/main/java/fr/istic/service/mapper/TextCommentMapper.java b/src/main/java/fr/istic/service/mapper/TextCommentMapper.java index cc4eab8..b142992 100644 --- a/src/main/java/fr/istic/service/mapper/TextCommentMapper.java +++ b/src/main/java/fr/istic/service/mapper/TextCommentMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link TextComment} and its DTO {@link TextCommentDTO}. */ -@Mapper(componentModel = "cdi", uses = {QuestionMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {QuestionMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface TextCommentMapper extends EntityMapper { @Mapping(source = "question.id", target = "questionId") diff --git a/src/main/java/fr/istic/service/mapper/UserMapper.java b/src/main/java/fr/istic/service/mapper/UserMapper.java index 4170a10..0b51af6 100644 --- a/src/main/java/fr/istic/service/mapper/UserMapper.java +++ b/src/main/java/fr/istic/service/mapper/UserMapper.java @@ -4,7 +4,7 @@ import fr.istic.domain.User; import fr.istic.service.dto.UserDTO; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import java.util.HashSet; import java.util.List; import java.util.Objects; diff --git a/src/main/java/fr/istic/service/mapper/ZoneMapper.java b/src/main/java/fr/istic/service/mapper/ZoneMapper.java index 7368f4f..43cff1c 100644 --- a/src/main/java/fr/istic/service/mapper/ZoneMapper.java +++ b/src/main/java/fr/istic/service/mapper/ZoneMapper.java @@ -9,7 +9,7 @@ /** * Mapper for the entity {@link Zone} and its DTO {@link ZoneDTO}. */ -@Mapper(componentModel = "cdi", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +@Mapper(componentModel = "jakarta", uses = {}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public interface ZoneMapper extends EntityMapper { diff --git a/src/main/java/fr/istic/web/rest/AccountResource.java b/src/main/java/fr/istic/web/rest/AccountResource.java index a261ce1..fd6d0ae 100644 --- a/src/main/java/fr/istic/web/rest/AccountResource.java +++ b/src/main/java/fr/istic/web/rest/AccountResource.java @@ -17,15 +17,15 @@ import java.security.Principal; import java.util.Optional; import java.util.concurrent.CompletionStage; -import javax.annotation.security.PermitAll; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; +import jakarta.annotation.security.PermitAll; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/web/rest/Answer2HybridGradedCommentResource.java b/src/main/java/fr/istic/web/rest/Answer2HybridGradedCommentResource.java index 23df1fb..c6b59a5 100644 --- a/src/main/java/fr/istic/web/rest/Answer2HybridGradedCommentResource.java +++ b/src/main/java/fr/istic/web/rest/Answer2HybridGradedCommentResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Answer2HybridGradedComment; import fr.istic.domain.Authority; @@ -26,11 +26,11 @@ import java.util.List; import java.util.Optional; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/web/rest/AuthorityResource.java b/src/main/java/fr/istic/web/rest/AuthorityResource.java index 00211bf..ca66a35 100644 --- a/src/main/java/fr/istic/web/rest/AuthorityResource.java +++ b/src/main/java/fr/istic/web/rest/AuthorityResource.java @@ -3,14 +3,14 @@ import fr.istic.security.AuthoritiesConstants; import fr.istic.service.UserService; import java.util.List; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; /** * REST controller to manage authorities. diff --git a/src/main/java/fr/istic/web/rest/CasAuth.java b/src/main/java/fr/istic/web/rest/CasAuth.java index 72dcd32..7ccdc2e 100644 --- a/src/main/java/fr/istic/web/rest/CasAuth.java +++ b/src/main/java/fr/istic/web/rest/CasAuth.java @@ -9,13 +9,13 @@ import org.slf4j.LoggerFactory; import org.w3c.dom.Document; -import javax.annotation.security.PermitAll; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; +import jakarta.annotation.security.PermitAll; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; import javax.net.ssl.HttpsURLConnection; -import javax.ws.rs.*; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import java.io.BufferedReader; diff --git a/src/main/java/fr/istic/web/rest/CommentsResource.java b/src/main/java/fr/istic/web/rest/CommentsResource.java index 344f855..c32963a 100644 --- a/src/main/java/fr/istic/web/rest/CommentsResource.java +++ b/src/main/java/fr/istic/web/rest/CommentsResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Authority; import fr.istic.domain.Comments; @@ -26,11 +26,11 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/CourseGroupResource.java b/src/main/java/fr/istic/web/rest/CourseGroupResource.java index 4a257e9..d4ee517 100644 --- a/src/main/java/fr/istic/web/rest/CourseGroupResource.java +++ b/src/main/java/fr/istic/web/rest/CourseGroupResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.CourseGroup; import fr.istic.security.AuthoritiesConstants; @@ -19,12 +19,12 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.List; import java.util.Optional; diff --git a/src/main/java/fr/istic/web/rest/CourseResource.java b/src/main/java/fr/istic/web/rest/CourseResource.java index 6eda51d..521c97f 100644 --- a/src/main/java/fr/istic/web/rest/CourseResource.java +++ b/src/main/java/fr/istic/web/rest/CourseResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Authority; import fr.istic.domain.Course; @@ -23,12 +23,12 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.Optional; /** diff --git a/src/main/java/fr/istic/web/rest/ExamResource.java b/src/main/java/fr/istic/web/rest/ExamResource.java index aee74a5..cb3b405 100644 --- a/src/main/java/fr/istic/web/rest/ExamResource.java +++ b/src/main/java/fr/istic/web/rest/ExamResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Authority; import fr.istic.domain.Course; @@ -27,13 +27,13 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.HashSet; diff --git a/src/main/java/fr/istic/web/rest/ExamSheetResource.java b/src/main/java/fr/istic/web/rest/ExamSheetResource.java index a534175..4561268 100644 --- a/src/main/java/fr/istic/web/rest/ExamSheetResource.java +++ b/src/main/java/fr/istic/web/rest/ExamSheetResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Authority; import fr.istic.domain.ExamSheet; @@ -22,13 +22,13 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.json.JsonObject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.json.JsonObject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/ExtendedAPI.java b/src/main/java/fr/istic/web/rest/ExtendedAPI.java index d036ae8..1fdd3ad 100644 --- a/src/main/java/fr/istic/web/rest/ExtendedAPI.java +++ b/src/main/java/fr/istic/web/rest/ExtendedAPI.java @@ -80,13 +80,13 @@ import fr.istic.service.mapper.ZoneMapper; import fr.istic.web.util.HeaderUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.transaction.Transactional; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.io.ByteArrayInputStream; import java.io.FileWriter; @@ -115,7 +115,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; /** * REST controller for managing {@link fr.istic.domain.Comments}. diff --git a/src/main/java/fr/istic/web/rest/FinalResultResource.java b/src/main/java/fr/istic/web/rest/FinalResultResource.java index 5477ae5..e036978 100644 --- a/src/main/java/fr/istic/web/rest/FinalResultResource.java +++ b/src/main/java/fr/istic/web/rest/FinalResultResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Authority; import fr.istic.domain.Exam; @@ -23,11 +23,11 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/GradedCommentResource.java b/src/main/java/fr/istic/web/rest/GradedCommentResource.java index b6c585c..2434605 100644 --- a/src/main/java/fr/istic/web/rest/GradedCommentResource.java +++ b/src/main/java/fr/istic/web/rest/GradedCommentResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Authority; import fr.istic.domain.GradedComment; @@ -24,11 +24,11 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/HybridGradedCommentResource.java b/src/main/java/fr/istic/web/rest/HybridGradedCommentResource.java index 9242a43..7168d7d 100644 --- a/src/main/java/fr/istic/web/rest/HybridGradedCommentResource.java +++ b/src/main/java/fr/istic/web/rest/HybridGradedCommentResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.Answer2HybridGradedComment; import fr.istic.domain.Authority; @@ -27,11 +27,11 @@ import java.util.List; import java.util.Optional; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/web/rest/JHipsterConfigurationEndpoint.java b/src/main/java/fr/istic/web/rest/JHipsterConfigurationEndpoint.java index ac4c16b..944a808 100644 --- a/src/main/java/fr/istic/web/rest/JHipsterConfigurationEndpoint.java +++ b/src/main/java/fr/istic/web/rest/JHipsterConfigurationEndpoint.java @@ -7,12 +7,12 @@ import org.eclipse.microprofile.config.ConfigProvider; import org.eclipse.microprofile.config.spi.ConfigSource; -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.annotation.security.RolesAllowed; +import jakarta.enterprise.context.RequestScoped; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.annotation.security.RolesAllowed; import java.util.List; import java.util.stream.Collectors; import java.util.stream.StreamSupport; diff --git a/src/main/java/fr/istic/web/rest/JHipsterLoggersEndpoint.java b/src/main/java/fr/istic/web/rest/JHipsterLoggersEndpoint.java index 56c9677..209ea07 100644 --- a/src/main/java/fr/istic/web/rest/JHipsterLoggersEndpoint.java +++ b/src/main/java/fr/istic/web/rest/JHipsterLoggersEndpoint.java @@ -5,11 +5,11 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.RequestScoped; -import javax.ws.rs.*; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.RequestScoped; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import java.util.*; import java.util.function.Function; import java.util.logging.Level; diff --git a/src/main/java/fr/istic/web/rest/JHipsterMetricsEndpoint.java b/src/main/java/fr/istic/web/rest/JHipsterMetricsEndpoint.java index c2a43eb..37151d4 100644 --- a/src/main/java/fr/istic/web/rest/JHipsterMetricsEndpoint.java +++ b/src/main/java/fr/istic/web/rest/JHipsterMetricsEndpoint.java @@ -7,11 +7,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; import java.util.*; diff --git a/src/main/java/fr/istic/web/rest/ManagementInfoResource.java b/src/main/java/fr/istic/web/rest/ManagementInfoResource.java index 431fc10..b56e498 100644 --- a/src/main/java/fr/istic/web/rest/ManagementInfoResource.java +++ b/src/main/java/fr/istic/web/rest/ManagementInfoResource.java @@ -2,14 +2,14 @@ import fr.istic.service.ManagementInfoService; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; @Path("/management/info") @Produces(MediaType.APPLICATION_JSON) diff --git a/src/main/java/fr/istic/web/rest/QuestionResource.java b/src/main/java/fr/istic/web/rest/QuestionResource.java index d674f72..7cb321e 100644 --- a/src/main/java/fr/istic/web/rest/QuestionResource.java +++ b/src/main/java/fr/istic/web/rest/QuestionResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.QuestionService; import fr.istic.service.SecurityService; @@ -23,12 +23,12 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/QuestionTypeResource.java b/src/main/java/fr/istic/web/rest/QuestionTypeResource.java index a6b6b80..e3006d4 100644 --- a/src/main/java/fr/istic/web/rest/QuestionTypeResource.java +++ b/src/main/java/fr/istic/web/rest/QuestionTypeResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.QuestionTypeService; import fr.istic.web.rest.errors.BadRequestAlertException; @@ -18,12 +18,12 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.List; import java.util.Optional; diff --git a/src/main/java/fr/istic/web/rest/ScanResource.java b/src/main/java/fr/istic/web/rest/ScanResource.java index 58366de..5df1cab 100644 --- a/src/main/java/fr/istic/web/rest/ScanResource.java +++ b/src/main/java/fr/istic/web/rest/ScanResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.ScanService; import fr.istic.service.SecurityService; @@ -21,12 +21,12 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/ShibAuth.java b/src/main/java/fr/istic/web/rest/ShibAuth.java index d3863fa..7c0f9de 100644 --- a/src/main/java/fr/istic/web/rest/ShibAuth.java +++ b/src/main/java/fr/istic/web/rest/ShibAuth.java @@ -10,13 +10,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.security.PermitAll; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.core.Response; +import jakarta.annotation.security.PermitAll; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; import java.net.URI; @Path("/api/shib") diff --git a/src/main/java/fr/istic/web/rest/StudentResource.java b/src/main/java/fr/istic/web/rest/StudentResource.java index d453c74..5e9efb6 100644 --- a/src/main/java/fr/istic/web/rest/StudentResource.java +++ b/src/main/java/fr/istic/web/rest/StudentResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.StudentService; import fr.istic.web.rest.errors.AccountResourceException; @@ -25,12 +25,12 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/StudentResponseResource.java b/src/main/java/fr/istic/web/rest/StudentResponseResource.java index 9f35d85..ae7f036 100644 --- a/src/main/java/fr/istic/web/rest/StudentResponseResource.java +++ b/src/main/java/fr/istic/web/rest/StudentResponseResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.StudentResponseService; import fr.istic.service.customdto.StudentResponseNote; @@ -24,11 +24,11 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.Collections; diff --git a/src/main/java/fr/istic/web/rest/TemplateResource.java b/src/main/java/fr/istic/web/rest/TemplateResource.java index 1309db3..e398094 100644 --- a/src/main/java/fr/istic/web/rest/TemplateResource.java +++ b/src/main/java/fr/istic/web/rest/TemplateResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.TemplateService; import fr.istic.web.rest.errors.BadRequestAlertException; @@ -21,12 +21,12 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.Optional; /** diff --git a/src/main/java/fr/istic/web/rest/TextCommentResource.java b/src/main/java/fr/istic/web/rest/TextCommentResource.java index 9c20ca3..dfef97e 100644 --- a/src/main/java/fr/istic/web/rest/TextCommentResource.java +++ b/src/main/java/fr/istic/web/rest/TextCommentResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.TextCommentService; import fr.istic.web.rest.errors.AccountResourceException; @@ -25,11 +25,11 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/istic/web/rest/UserJWTController.java b/src/main/java/fr/istic/web/rest/UserJWTController.java index dad48b6..d7c1ef9 100644 --- a/src/main/java/fr/istic/web/rest/UserJWTController.java +++ b/src/main/java/fr/istic/web/rest/UserJWTController.java @@ -5,17 +5,17 @@ import fr.istic.web.rest.vm.LoginVM; import io.quarkus.runtime.annotations.RegisterForReflection; import io.quarkus.security.runtime.QuarkusSecurityIdentity; -import javax.annotation.security.PermitAll; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.json.bind.annotation.JsonbProperty; -import javax.validation.Valid; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.annotation.security.PermitAll; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.json.bind.annotation.JsonbProperty; +import jakarta.validation.Valid; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/fr/istic/web/rest/UserResource.java b/src/main/java/fr/istic/web/rest/UserResource.java index a55f67e..472ff4b 100644 --- a/src/main/java/fr/istic/web/rest/UserResource.java +++ b/src/main/java/fr/istic/web/rest/UserResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.domain.User; import fr.istic.security.AuthoritiesConstants; @@ -18,16 +18,16 @@ import fr.istic.web.util.ResponseUtil; import java.util.List; import java.util.Optional; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.validation.Valid; -import javax.ws.rs.*; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.core.UriInfo; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.validation.Valid; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; +import jakarta.ws.rs.core.UriInfo; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.slf4j.Logger; diff --git a/src/main/java/fr/istic/web/rest/ZoneResource.java b/src/main/java/fr/istic/web/rest/ZoneResource.java index fcaa047..40a2eef 100644 --- a/src/main/java/fr/istic/web/rest/ZoneResource.java +++ b/src/main/java/fr/istic/web/rest/ZoneResource.java @@ -1,6 +1,6 @@ package fr.istic.web.rest; -import static javax.ws.rs.core.UriBuilder.fromPath; +import static jakarta.ws.rs.core.UriBuilder.fromPath; import fr.istic.service.ZoneService; import fr.istic.service.customdto.ResizeZoneDTO; @@ -21,11 +21,11 @@ import fr.istic.web.rest.vm.SortRequestVM; import fr.istic.web.util.PaginationUtil; -import javax.annotation.security.RolesAllowed; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.*; -import javax.ws.rs.core.*; +import jakarta.annotation.security.RolesAllowed; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.*; import java.util.Objects; import java.util.Optional; diff --git a/src/main/java/fr/istic/web/rest/errors/BadRequestAlertException.java b/src/main/java/fr/istic/web/rest/errors/BadRequestAlertException.java index 6f7dc62..168b24c 100644 --- a/src/main/java/fr/istic/web/rest/errors/BadRequestAlertException.java +++ b/src/main/java/fr/istic/web/rest/errors/BadRequestAlertException.java @@ -1,9 +1,9 @@ package fr.istic.web.rest.errors; -import static javax.ws.rs.core.Response.Status.BAD_REQUEST; +import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; public class BadRequestAlertException extends WebApplicationException { private static final long serialVersionUID = 1L; diff --git a/src/main/java/fr/istic/web/rest/errors/EmailNotFoundException.java b/src/main/java/fr/istic/web/rest/errors/EmailNotFoundException.java index 6bfc872..c7be156 100644 --- a/src/main/java/fr/istic/web/rest/errors/EmailNotFoundException.java +++ b/src/main/java/fr/istic/web/rest/errors/EmailNotFoundException.java @@ -1,9 +1,9 @@ package fr.istic.web.rest.errors; -import static javax.ws.rs.core.Response.Status.BAD_REQUEST; +import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; public class EmailNotFoundException extends WebApplicationException { diff --git a/src/main/java/fr/istic/web/rest/errors/UserNotAuthenticatedException.java b/src/main/java/fr/istic/web/rest/errors/UserNotAuthenticatedException.java index f4866cc..2ad175a 100644 --- a/src/main/java/fr/istic/web/rest/errors/UserNotAuthenticatedException.java +++ b/src/main/java/fr/istic/web/rest/errors/UserNotAuthenticatedException.java @@ -1,9 +1,9 @@ package fr.istic.web.rest.errors; -import static javax.ws.rs.core.Response.Status.UNAUTHORIZED; +import static jakarta.ws.rs.core.Response.Status.UNAUTHORIZED; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; public class UserNotAuthenticatedException extends WebApplicationException { private static final long serialVersionUID = 1L; diff --git a/src/main/java/fr/istic/web/rest/vm/LoginVM.java b/src/main/java/fr/istic/web/rest/vm/LoginVM.java index 17d658e..0411fb9 100644 --- a/src/main/java/fr/istic/web/rest/vm/LoginVM.java +++ b/src/main/java/fr/istic/web/rest/vm/LoginVM.java @@ -2,8 +2,8 @@ import io.quarkus.runtime.annotations.RegisterForReflection; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; /** * View Model object for storing a user's credentials. diff --git a/src/main/java/fr/istic/web/rest/vm/ManagedUserVM.java b/src/main/java/fr/istic/web/rest/vm/ManagedUserVM.java index 8c24971..d0a43df 100644 --- a/src/main/java/fr/istic/web/rest/vm/ManagedUserVM.java +++ b/src/main/java/fr/istic/web/rest/vm/ManagedUserVM.java @@ -3,7 +3,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; import fr.istic.service.dto.UserDTO; -import javax.validation.constraints.Size; +import jakarta.validation.constraints.Size; /** * View Model extending the UserDTO, which is meant to be used in the user management UI. diff --git a/src/main/java/fr/istic/web/rest/vm/PageRequestVM.java b/src/main/java/fr/istic/web/rest/vm/PageRequestVM.java index fcc00d8..ee9c230 100644 --- a/src/main/java/fr/istic/web/rest/vm/PageRequestVM.java +++ b/src/main/java/fr/istic/web/rest/vm/PageRequestVM.java @@ -2,9 +2,9 @@ import io.quarkus.panache.common.Page; -import javax.validation.constraints.Positive; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.QueryParam; +import jakarta.validation.constraints.Positive; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.QueryParam; public class PageRequestVM { diff --git a/src/main/java/fr/istic/web/rest/vm/SortRequestVM.java b/src/main/java/fr/istic/web/rest/vm/SortRequestVM.java index 039616d..a7cf88c 100644 --- a/src/main/java/fr/istic/web/rest/vm/SortRequestVM.java +++ b/src/main/java/fr/istic/web/rest/vm/SortRequestVM.java @@ -2,7 +2,7 @@ import io.quarkus.panache.common.Sort; -import javax.ws.rs.QueryParam; +import jakarta.ws.rs.QueryParam; import java.util.List; public class SortRequestVM { diff --git a/src/main/java/fr/istic/web/util/HeaderUtil.java b/src/main/java/fr/istic/web/util/HeaderUtil.java index d5f8ec1..961b4bb 100644 --- a/src/main/java/fr/istic/web/util/HeaderUtil.java +++ b/src/main/java/fr/istic/web/util/HeaderUtil.java @@ -32,7 +32,7 @@ public static Map createAlert(String applicationName, String mes * @param enableTranslation a boolean. * @param entityName a {@link java.lang.String} object. * @param param a {@link java.lang.String} object. - * @return a {@link javax.ws.rs.core.MultivaluedMap} object. + * @return a {@link jakarta.ws.rs.core.MultivaluedMap} object. */ public static Map createEntityCreationAlert( String applicationName, @@ -53,7 +53,7 @@ public static Map createEntityCreationAlert( * @param enableTranslation a boolean. * @param entityName a {@link java.lang.String} object. * @param param a {@link java.lang.String} object. - * @return a {@link javax.ws.rs.core.MultivaluedMap} object. + * @return a {@link jakarta.ws.rs.core.MultivaluedMap} object. */ public static Map createEntityUpdateAlert( String applicationName, @@ -74,7 +74,7 @@ public static Map createEntityUpdateAlert( * @param enableTranslation a boolean. * @param entityName a {@link java.lang.String} object. * @param param a {@link java.lang.String} object. - * @return a {@link javax.ws.rs.core.MultivaluedMap} object. + * @return a {@link jakarta.ws.rs.core.MultivaluedMap} object. */ public static Map createEntityDeletionAlert( String applicationName, @@ -96,7 +96,7 @@ public static Map createEntityDeletionAlert( * @param entityName a {@link java.lang.String} object. * @param errorKey a {@link java.lang.String} object. * @param defaultMessage a {@link java.lang.String} object. - * @return a {@link javax.ws.rs.core.MultivaluedMap} object. + * @return a {@link jakarta.ws.rs.core.MultivaluedMap} object. */ public static Map createFailureAlert( String applicationName, diff --git a/src/main/java/fr/istic/web/util/PaginationUtil.java b/src/main/java/fr/istic/web/util/PaginationUtil.java index 4cbdb47..a2bee5d 100644 --- a/src/main/java/fr/istic/web/util/PaginationUtil.java +++ b/src/main/java/fr/istic/web/util/PaginationUtil.java @@ -2,9 +2,9 @@ import fr.istic.service.Paged; -import javax.ws.rs.core.Link; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.ws.rs.core.Link; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import java.util.ArrayList; public final class PaginationUtil { diff --git a/src/main/java/fr/istic/web/util/ResponseUtil.java b/src/main/java/fr/istic/web/util/ResponseUtil.java index 133a749..26941b2 100644 --- a/src/main/java/fr/istic/web/util/ResponseUtil.java +++ b/src/main/java/fr/istic/web/util/ResponseUtil.java @@ -3,7 +3,7 @@ import java.util.Collections; import java.util.Map; import java.util.Optional; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.core.Response; public interface ResponseUtil { static Response wrapOrNotFound(Optional maybeResponse) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 67a510f..9b6b923 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -172,8 +172,12 @@ quarkus.swagger-ui.path=/swagger-ui quarkus.native.additional-build-args=\ -H:ResourceConfigurationFiles=resources-config.json,\ - --initialize-at-run-time=fr.istic.security.RandomUtil,\ - --trace-object-instantiation=org.apache.fontbox.ttf.BufferedRandomAccessFile + -H:+UnlockExperimentalVMOptions,\ + --initialize-at-run-time=fr.istic.security.RandomUtil\\,org.apache.pdfbox.pdmodel.font.PDType1Font\\,org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB\\,org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray +# --trace-object-instantiation=org.apache.fontbox.ttf.BufferedRandomAccessFile +# -H:ReflectionConfigurationFiles=reflection-config.json,\ +# +# --initialize-at-run-time=fr.istic.security.RandomUtil\\,org.apache.pdfbox.pdmodel.font.PDType1Font\\,org.apache.pdfbox.pdmodel.PDDocument\\,org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB\\,org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray,\ quarkus.http.limits.max-body-size=10G upload.directory= /tmp/files @@ -187,6 +191,3 @@ correctexam.bucketname=test correctexam.uses3=true correctexam.saveasfile=false %dev.quarkus.hibernate-orm.second-level-caching-enabled=false -4 13 -{examId: 487, pageNumber: 5, value: '{"pages":"data:image/webp;base64,UklGRn5sAQBXRUJQV…spDAJNKJ21aemZb+wCHXPXxIjPejDWG0uaoUJgAAAAAAAAA"}', id: 13} -5 14 diff --git a/src/main/resources/resources-config.json b/src/main/resources/resources-config.json index 91bd02b..3f01c23 100644 --- a/src/main/resources/resources-config.json +++ b/src/main/resources/resources-config.json @@ -2,6 +2,21 @@ "resources": [ { "pattern": "jwt/privateKey.pem" + }, + { + "pattern": "org/apache/pdfbox/resources/afm/*" + }, + { + "pattern": "org/apache/pdfbox/resources/glyphlist/*" + }, + { + "pattern": "org/apache/pdfbox/resources/icc/*" + }, + { + "pattern": "org/apache/pdfbox/resources/text/*" + }, + { + "pattern": "org/apache/pdfbox/resources/ttf/*" } ] } diff --git a/src/test/java/fr/istic/TestUtil.java b/src/test/java/fr/istic/TestUtil.java index eb5988d..e30b07f 100644 --- a/src/test/java/fr/istic/TestUtil.java +++ b/src/test/java/fr/istic/TestUtil.java @@ -2,7 +2,7 @@ import static fr.istic.config.Constants.DATE_TIME_FORMAT; import static io.restassured.RestAssured.given; -import static javax.ws.rs.core.Response.Status.OK; +import static jakarta.ws.rs.core.Response.Status.OK; import static org.hamcrest.Matchers.*; import static org.assertj.core.api.Assertions.assertThat; @@ -10,11 +10,11 @@ import io.restassured.mapper.ObjectMapper; import io.restassured.mapper.ObjectMapperDeserializationContext; import io.restassured.mapper.ObjectMapperSerializationContext; -import javax.json.bind.Jsonb; -import javax.json.bind.JsonbBuilder; -import javax.json.bind.JsonbConfig; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; +import jakarta.json.bind.Jsonb; +import jakarta.json.bind.JsonbBuilder; +import jakarta.json.bind.JsonbConfig; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.temporal.Temporal; diff --git a/src/test/java/fr/istic/config/LocalDateProviderTest.java b/src/test/java/fr/istic/config/LocalDateProviderTest.java index 71f4424..68d16bf 100644 --- a/src/test/java/fr/istic/config/LocalDateProviderTest.java +++ b/src/test/java/fr/istic/config/LocalDateProviderTest.java @@ -1,7 +1,7 @@ package fr.istic.config; import org.junit.jupiter.api.Test; -import javax.ws.rs.ext.ParamConverter; +import jakarta.ws.rs.ext.ParamConverter; import java.time.LocalDate; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; diff --git a/src/test/java/fr/istic/config/mock/JHipsterInfoMock.java b/src/test/java/fr/istic/config/mock/JHipsterInfoMock.java index 7491b19..733bd72 100644 --- a/src/test/java/fr/istic/config/mock/JHipsterInfoMock.java +++ b/src/test/java/fr/istic/config/mock/JHipsterInfoMock.java @@ -3,7 +3,7 @@ import fr.istic.config.JHipsterInfo; import io.quarkus.test.Mock; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; @Mock @ApplicationScoped diff --git a/src/test/java/fr/istic/service/MailServiceIT.java b/src/test/java/fr/istic/service/MailServiceIT.java index 14cc27d..9268d1e 100644 --- a/src/test/java/fr/istic/service/MailServiceIT.java +++ b/src/test/java/fr/istic/service/MailServiceIT.java @@ -7,7 +7,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; diff --git a/src/test/java/fr/istic/service/mapper/CommentsMapperTest.java b/src/test/java/fr/istic/service/mapper/CommentsMapperTest.java deleted file mode 100644 index ee3e3ad..0000000 --- a/src/test/java/fr/istic/service/mapper/CommentsMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class CommentsMapperTest { - - private CommentsMapper commentsMapper; - - @BeforeEach - public void setUp() { - commentsMapper = new CommentsMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(commentsMapper.fromId(id).id).isEqualTo(id); - assertThat(commentsMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/CourseGroupMapperTest.java b/src/test/java/fr/istic/service/mapper/CourseGroupMapperTest.java deleted file mode 100644 index ef5d707..0000000 --- a/src/test/java/fr/istic/service/mapper/CourseGroupMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class CourseGroupMapperTest { - - private CourseGroupMapper courseGroupMapper; - - @BeforeEach - public void setUp() { - courseGroupMapper = new CourseGroupMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(courseGroupMapper.fromId(id).id).isEqualTo(id); - assertThat(courseGroupMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/CourseMapperTest.java b/src/test/java/fr/istic/service/mapper/CourseMapperTest.java deleted file mode 100644 index 77b817a..0000000 --- a/src/test/java/fr/istic/service/mapper/CourseMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class CourseMapperTest { - - private CourseMapper courseMapper; - - @BeforeEach - public void setUp() { - courseMapper = new CourseMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(courseMapper.fromId(id).id).isEqualTo(id); - assertThat(courseMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/ExamMapperTest.java b/src/test/java/fr/istic/service/mapper/ExamMapperTest.java deleted file mode 100644 index 67118dd..0000000 --- a/src/test/java/fr/istic/service/mapper/ExamMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class ExamMapperTest { - - private ExamMapper examMapper; - - @BeforeEach - public void setUp() { - examMapper = new ExamMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(examMapper.fromId(id).id).isEqualTo(id); - assertThat(examMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/ExamSheetMapperTest.java b/src/test/java/fr/istic/service/mapper/ExamSheetMapperTest.java deleted file mode 100644 index 8e836f1..0000000 --- a/src/test/java/fr/istic/service/mapper/ExamSheetMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class ExamSheetMapperTest { - - private ExamSheetMapper examSheetMapper; - - @BeforeEach - public void setUp() { - examSheetMapper = new ExamSheetMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(examSheetMapper.fromId(id).id).isEqualTo(id); - assertThat(examSheetMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/FinalResultMapperTest.java b/src/test/java/fr/istic/service/mapper/FinalResultMapperTest.java deleted file mode 100644 index 759f1ea..0000000 --- a/src/test/java/fr/istic/service/mapper/FinalResultMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class FinalResultMapperTest { - - private FinalResultMapper finalResultMapper; - - @BeforeEach - public void setUp() { - finalResultMapper = new FinalResultMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(finalResultMapper.fromId(id).id).isEqualTo(id); - assertThat(finalResultMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/GradedCommentMapperTest.java b/src/test/java/fr/istic/service/mapper/GradedCommentMapperTest.java deleted file mode 100644 index 1082db5..0000000 --- a/src/test/java/fr/istic/service/mapper/GradedCommentMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class GradedCommentMapperTest { - - private GradedCommentMapper gradedCommentMapper; - - @BeforeEach - public void setUp() { - gradedCommentMapper = new GradedCommentMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(gradedCommentMapper.fromId(id).id).isEqualTo(id); - assertThat(gradedCommentMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/QuestionMapperTest.java b/src/test/java/fr/istic/service/mapper/QuestionMapperTest.java deleted file mode 100644 index f40a78c..0000000 --- a/src/test/java/fr/istic/service/mapper/QuestionMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class QuestionMapperTest { - - private QuestionMapper questionMapper; - - @BeforeEach - public void setUp() { - questionMapper = new QuestionMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(questionMapper.fromId(id).id).isEqualTo(id); - assertThat(questionMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/QuestionTypeMapperTest.java b/src/test/java/fr/istic/service/mapper/QuestionTypeMapperTest.java deleted file mode 100644 index e9bf16a..0000000 --- a/src/test/java/fr/istic/service/mapper/QuestionTypeMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class QuestionTypeMapperTest { - - private QuestionTypeMapper questionTypeMapper; - - @BeforeEach - public void setUp() { - questionTypeMapper = new QuestionTypeMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(questionTypeMapper.fromId(id).id).isEqualTo(id); - assertThat(questionTypeMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/ScanMapperTest.java b/src/test/java/fr/istic/service/mapper/ScanMapperTest.java deleted file mode 100644 index 8dfa210..0000000 --- a/src/test/java/fr/istic/service/mapper/ScanMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class ScanMapperTest { - - private ScanMapper scanMapper; - - @BeforeEach - public void setUp() { - scanMapper = new ScanMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(scanMapper.fromId(id).id).isEqualTo(id); - assertThat(scanMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/StudentMapperTest.java b/src/test/java/fr/istic/service/mapper/StudentMapperTest.java deleted file mode 100644 index 6d2b908..0000000 --- a/src/test/java/fr/istic/service/mapper/StudentMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class StudentMapperTest { - - private StudentMapper studentMapper; - - @BeforeEach - public void setUp() { - studentMapper = new StudentMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(studentMapper.fromId(id).id).isEqualTo(id); - assertThat(studentMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/StudentResponseMapperTest.java b/src/test/java/fr/istic/service/mapper/StudentResponseMapperTest.java deleted file mode 100644 index a092181..0000000 --- a/src/test/java/fr/istic/service/mapper/StudentResponseMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class StudentResponseMapperTest { - - private StudentResponseMapper studentResponseMapper; - - @BeforeEach - public void setUp() { - studentResponseMapper = new StudentResponseMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(studentResponseMapper.fromId(id).id).isEqualTo(id); - assertThat(studentResponseMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/TemplateMapperTest.java b/src/test/java/fr/istic/service/mapper/TemplateMapperTest.java deleted file mode 100644 index 8724955..0000000 --- a/src/test/java/fr/istic/service/mapper/TemplateMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class TemplateMapperTest { - - private TemplateMapper templateMapper; - - @BeforeEach - public void setUp() { - templateMapper = new TemplateMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(templateMapper.fromId(id).id).isEqualTo(id); - assertThat(templateMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/TextCommentMapperTest.java b/src/test/java/fr/istic/service/mapper/TextCommentMapperTest.java deleted file mode 100644 index 9ee8c68..0000000 --- a/src/test/java/fr/istic/service/mapper/TextCommentMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class TextCommentMapperTest { - - private TextCommentMapper textCommentMapper; - - @BeforeEach - public void setUp() { - textCommentMapper = new TextCommentMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(textCommentMapper.fromId(id).id).isEqualTo(id); - assertThat(textCommentMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/UserMapperTest.java b/src/test/java/fr/istic/service/mapper/UserMapperTest.java deleted file mode 100644 index dc7ba68..0000000 --- a/src/test/java/fr/istic/service/mapper/UserMapperTest.java +++ /dev/null @@ -1,136 +0,0 @@ -package fr.istic.service.mapper; - -import fr.istic.domain.User; -import fr.istic.service.dto.UserDTO; -import org.apache.commons.lang3.RandomStringUtils; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Unit tests for {@link UserMapper}. - */ -public class UserMapperTest { - - private static final String DEFAULT_LOGIN = "johndoe"; - private static final Long DEFAULT_ID = 1L; - - private UserMapper userMapper; - private User user; - private UserDTO userDto; - - @BeforeEach - public void init() { - userMapper = new UserMapper(); - user = new User(); - user.login = DEFAULT_LOGIN; - user.password = RandomStringUtils.random(60); - user.activated = true; - user.email = "johndoe@localhost"; - user.firstName = "john"; - user.lastName = "doe"; - user.imageUrl = "image_url"; - user.langKey = "en"; - - userDto = new UserDTO(user); - } - - @Test - public void usersToUserDTOsShouldMapOnlyNonNullUsers() { - List users = new ArrayList<>(); - users.add(user); - users.add(null); - - List userDTOS = userMapper.usersToUserDTOs(users); - - assertThat(userDTOS).isNotEmpty(); - assertThat(userDTOS).size().isEqualTo(1); - } - - @Test - public void userDTOsToUsersShouldMapOnlyNonNullUsers() { - List usersDto = new ArrayList<>(); - usersDto.add(userDto); - usersDto.add(null); - - List users = userMapper.userDTOsToUsers(usersDto); - - assertThat(users).isNotEmpty(); - assertThat(users).size().isEqualTo(1); - } - - @Test - public void userDTOsToUsersWithAuthoritiesStringShouldMapToUsersWithAuthoritiesDomain() { - Set authoritiesAsString = new HashSet<>(); - authoritiesAsString.add("ADMIN"); - userDto.authorities = authoritiesAsString; - - List usersDto = new ArrayList<>(); - usersDto.add(userDto); - - List users = userMapper.userDTOsToUsers(usersDto); - - assertThat(users).isNotEmpty(); - assertThat(users).size().isEqualTo(1); - assertThat(users.get(0).authorities).isNotNull(); - assertThat(users.get(0).authorities).isNotEmpty(); - assertThat(users.get(0).authorities.iterator().next().name).isEqualTo("ADMIN"); - } - - @Test - public void userDTOsToUsersMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { - userDto.authorities = null; - - List usersDto = new ArrayList<>(); - usersDto.add(userDto); - - List users = userMapper.userDTOsToUsers(usersDto); - - assertThat(users).isNotEmpty(); - assertThat(users).size().isEqualTo(1); - assertThat(users.get(0).authorities).isNotNull(); - assertThat(users.get(0).authorities).isEmpty(); - } - - @Test - public void userDTOToUserMapWithAuthoritiesStringShouldReturnUserWithAuthorities() { - Set authoritiesAsString = new HashSet<>(); - authoritiesAsString.add("ADMIN"); - userDto.authorities = authoritiesAsString; - - User user = userMapper.userDTOToUser(userDto); - - assertThat(user).isNotNull(); - assertThat(user.authorities).isNotNull(); - assertThat(user.authorities).isNotEmpty(); - assertThat(user.authorities.iterator().next().name).isEqualTo("ADMIN"); - } - - @Test - public void userDTOToUserMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { - userDto.authorities = null; - - User user = userMapper.userDTOToUser(userDto); - - assertThat(user).isNotNull(); - assertThat(user.authorities).isNotNull(); - assertThat(user.authorities).isEmpty(); - } - - @Test - public void userDTOToUserMapWithNullUserShouldReturnNull() { - assertThat(userMapper.userDTOToUser(null)).isNull(); - } - - @Test - public void testUserFromId() { - assertThat(userMapper.userFromId(DEFAULT_ID).id).isEqualTo(DEFAULT_ID); - assertThat(userMapper.userFromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/service/mapper/ZoneMapperTest.java b/src/test/java/fr/istic/service/mapper/ZoneMapperTest.java deleted file mode 100644 index 7e26b87..0000000 --- a/src/test/java/fr/istic/service/mapper/ZoneMapperTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.istic.service.mapper; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; - -public class ZoneMapperTest { - - private ZoneMapper zoneMapper; - - @BeforeEach - public void setUp() { - zoneMapper = new ZoneMapperImpl(); - } - - @Test - public void testEntityFromId() { - Long id = 1L; - assertThat(zoneMapper.fromId(id).id).isEqualTo(id); - assertThat(zoneMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/fr/istic/web/rest/AccountResourceTest.java b/src/test/java/fr/istic/web/rest/AccountResourceTest.java index e27dcfd..ed5ec29 100644 --- a/src/test/java/fr/istic/web/rest/AccountResourceTest.java +++ b/src/test/java/fr/istic/web/rest/AccountResourceTest.java @@ -3,9 +3,9 @@ import static io.restassured.RestAssured.get; import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.MediaType.TEXT_PLAIN; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.MediaType.TEXT_PLAIN; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; import static org.junit.jupiter.api.Assertions.fail; @@ -30,9 +30,9 @@ import java.util.List; import java.util.Set; import java.util.regex.Pattern; -import javax.inject.Inject; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import liquibase.Liquibase; import org.apache.commons.lang3.RandomStringUtils; diff --git a/src/test/java/fr/istic/web/rest/CommentsResourceTest.java b/src/test/java/fr/istic/web/rest/CommentsResourceTest.java index c7906b5..88fd342 100644 --- a/src/test/java/fr/istic/web/rest/CommentsResourceTest.java +++ b/src/test/java/fr/istic/web/rest/CommentsResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; import static org.junit.jupiter.api.Assertions.fail; @@ -21,7 +21,7 @@ import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; import java.util.regex.Pattern; diff --git a/src/test/java/fr/istic/web/rest/CourseGroupResourceTest.java b/src/test/java/fr/istic/web/rest/CourseGroupResourceTest.java index b83559f..9e13bf4 100644 --- a/src/test/java/fr/istic/web/rest/CourseGroupResourceTest.java +++ b/src/test/java/fr/istic/web/rest/CourseGroupResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,7 +16,7 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; import java.util.ArrayList; @@ -471,7 +471,7 @@ public void getCourseGroup() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(courseGroupDTO.id.intValue())) - + .body("groupName", is(DEFAULT_GROUP_NAME)); } diff --git a/src/test/java/fr/istic/web/rest/CourseResourceTest.java b/src/test/java/fr/istic/web/rest/CourseResourceTest.java index 7851c68..53835f5 100644 --- a/src/test/java/fr/istic/web/rest/CourseResourceTest.java +++ b/src/test/java/fr/istic/web/rest/CourseResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,7 +16,7 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; import java.util.ArrayList; @@ -471,7 +471,7 @@ public void getCourse() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(courseDTO.id.intValue())) - + .body("name", is(DEFAULT_NAME)); } diff --git a/src/test/java/fr/istic/web/rest/ExamResourceTest.java b/src/test/java/fr/istic/web/rest/ExamResourceTest.java index 6d0105d..54b68c6 100644 --- a/src/test/java/fr/istic/web/rest/ExamResourceTest.java +++ b/src/test/java/fr/istic/web/rest/ExamResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,10 +16,10 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; - + @QuarkusTest public class ExamResourceTest { @@ -470,7 +470,7 @@ public void getExam() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(examDTO.id.intValue())) - + .body("name", is(DEFAULT_NAME)); } diff --git a/src/test/java/fr/istic/web/rest/ExamSheetResourceTest.java b/src/test/java/fr/istic/web/rest/ExamSheetResourceTest.java index 5eeb439..201af0f 100644 --- a/src/test/java/fr/istic/web/rest/ExamSheetResourceTest.java +++ b/src/test/java/fr/istic/web/rest/ExamSheetResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,10 +16,10 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; - + @QuarkusTest public class ExamSheetResourceTest { @@ -484,7 +484,7 @@ public void getExamSheet() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(examSheetDTO.id.intValue())) - + .body("name", is(DEFAULT_NAME)) .body("pagemin", is(DEFAULT_PAGEMIN.intValue())) .body("pagemax", is(DEFAULT_PAGEMAX.intValue())); diff --git a/src/test/java/fr/istic/web/rest/FinalResultResourceTest.java b/src/test/java/fr/istic/web/rest/FinalResultResourceTest.java index 6a0184b..c7acdcc 100644 --- a/src/test/java/fr/istic/web/rest/FinalResultResourceTest.java +++ b/src/test/java/fr/istic/web/rest/FinalResultResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,10 +16,10 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; - + @QuarkusTest public class FinalResultResourceTest { @@ -424,7 +424,7 @@ public void getFinalResult() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(finalResultDTO.id.intValue())) - + .body("note", is(DEFAULT_NOTE.intValue())); } diff --git a/src/test/java/fr/istic/web/rest/GradedCommentResourceTest.java b/src/test/java/fr/istic/web/rest/GradedCommentResourceTest.java index a266c94..c47b3d1 100644 --- a/src/test/java/fr/istic/web/rest/GradedCommentResourceTest.java +++ b/src/test/java/fr/istic/web/rest/GradedCommentResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,7 +16,7 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; diff --git a/src/test/java/fr/istic/web/rest/ManagementInfoResourceTest.java b/src/test/java/fr/istic/web/rest/ManagementInfoResourceTest.java index 38d72ac..bfbe11c 100644 --- a/src/test/java/fr/istic/web/rest/ManagementInfoResourceTest.java +++ b/src/test/java/fr/istic/web/rest/ManagementInfoResourceTest.java @@ -11,8 +11,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.OK; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.OK; import static org.assertj.core.api.Assertions.assertThat; @QuarkusTest diff --git a/src/test/java/fr/istic/web/rest/QuestionResourceTest.java b/src/test/java/fr/istic/web/rest/QuestionResourceTest.java index 5a618d1..67ab3eb 100644 --- a/src/test/java/fr/istic/web/rest/QuestionResourceTest.java +++ b/src/test/java/fr/istic/web/rest/QuestionResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -17,7 +17,7 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; diff --git a/src/test/java/fr/istic/web/rest/QuestionTypeResourceTest.java b/src/test/java/fr/istic/web/rest/QuestionTypeResourceTest.java index d6426b2..ba8325c 100644 --- a/src/test/java/fr/istic/web/rest/QuestionTypeResourceTest.java +++ b/src/test/java/fr/istic/web/rest/QuestionTypeResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,10 +16,10 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; - + @QuarkusTest public class QuestionTypeResourceTest { @@ -484,7 +484,7 @@ public void getQuestionType() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(questionTypeDTO.id.intValue())) - + .body("algoName", is(DEFAULT_ALGO_NAME)) .body("endpoint", is(DEFAULT_ENDPOINT)) .body("jsFunction", is(DEFAULT_JS_FUNCTION)); diff --git a/src/test/java/fr/istic/web/rest/StudentResourceTest.java b/src/test/java/fr/istic/web/rest/StudentResourceTest.java index 63a7e91..aee3cbe 100644 --- a/src/test/java/fr/istic/web/rest/StudentResourceTest.java +++ b/src/test/java/fr/istic/web/rest/StudentResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,7 +16,7 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; import java.util.ArrayList; @@ -545,7 +545,7 @@ public void getStudent() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(studentDTO.id.intValue())) - + .body("name", is(DEFAULT_NAME)) .body("firstname", is(DEFAULT_FIRSTNAME)) .body("ine", is(DEFAULT_INE)) diff --git a/src/test/java/fr/istic/web/rest/StudentResponseResourceTest.java b/src/test/java/fr/istic/web/rest/StudentResponseResourceTest.java index e59e97d..f3d3c50 100644 --- a/src/test/java/fr/istic/web/rest/StudentResponseResourceTest.java +++ b/src/test/java/fr/istic/web/rest/StudentResponseResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,7 +16,7 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; import java.util.ArrayList; diff --git a/src/test/java/fr/istic/web/rest/TextCommentResourceTest.java b/src/test/java/fr/istic/web/rest/TextCommentResourceTest.java index 1726d75..fe467fc 100644 --- a/src/test/java/fr/istic/web/rest/TextCommentResourceTest.java +++ b/src/test/java/fr/istic/web/rest/TextCommentResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,10 +16,10 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; - + @QuarkusTest public class TextCommentResourceTest { @@ -431,7 +431,7 @@ public void getTextComment() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(textCommentDTO.id.intValue())) - + .body("text", is(DEFAULT_TEXT)) .body("zonegeneratedid", is(DEFAULT_ZONEGENERATEDID)); } diff --git a/src/test/java/fr/istic/web/rest/UserJWTControllerTest.java b/src/test/java/fr/istic/web/rest/UserJWTControllerTest.java index 82e11fa..6ed57b5 100644 --- a/src/test/java/fr/istic/web/rest/UserJWTControllerTest.java +++ b/src/test/java/fr/istic/web/rest/UserJWTControllerTest.java @@ -1,8 +1,8 @@ package fr.istic.web.rest; import static io.restassured.RestAssured.given; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.hamcrest.Matchers.*; import static org.junit.jupiter.api.Assertions.fail; @@ -15,8 +15,8 @@ import io.quarkus.test.junit.QuarkusTest; import java.util.List; import java.util.regex.Pattern; -import javax.inject.Inject; -import javax.ws.rs.core.HttpHeaders; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.HttpHeaders; import liquibase.Liquibase; import org.junit.jupiter.api.*; diff --git a/src/test/java/fr/istic/web/rest/UserResourceTest.java b/src/test/java/fr/istic/web/rest/UserResourceTest.java index 0b36a93..3621f3e 100644 --- a/src/test/java/fr/istic/web/rest/UserResourceTest.java +++ b/src/test/java/fr/istic/web/rest/UserResourceTest.java @@ -3,9 +3,9 @@ import static io.restassured.RestAssured.get; import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.HttpHeaders.CONTENT_TYPE; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -21,9 +21,9 @@ import io.restassured.RestAssured; import java.time.Instant; import java.util.Set; -import javax.inject.Inject; -import javax.transaction.Transactional; -import javax.ws.rs.core.HttpHeaders; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; +import jakarta.ws.rs.core.HttpHeaders; import liquibase.Liquibase; import org.apache.commons.lang3.RandomStringUtils; diff --git a/src/test/java/fr/istic/web/rest/ZoneResourceTest.java b/src/test/java/fr/istic/web/rest/ZoneResourceTest.java index e6f8d04..8a6674d 100644 --- a/src/test/java/fr/istic/web/rest/ZoneResourceTest.java +++ b/src/test/java/fr/istic/web/rest/ZoneResourceTest.java @@ -2,8 +2,8 @@ import static io.restassured.RestAssured.given; import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.Response.Status.*; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.Response.Status.*; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.*; @@ -16,10 +16,10 @@ import io.quarkus.liquibase.LiquibaseFactory; import org.junit.jupiter.api.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.List; - + @QuarkusTest public class ZoneResourceTest { @@ -452,7 +452,7 @@ public void getZone() { .statusCode(OK.getStatusCode()) .contentType(APPLICATION_JSON) .body("id", is(zoneDTO.id.intValue())) - + .body("pageNumber", is(DEFAULT_PAGE_NUMBER.intValue())) .body("xInit", is(DEFAULT_X_INIT.intValue())) .body("yInit", is(DEFAULT_Y_INIT.intValue())) From 8184102dff80c61a5c4df7a76a9343d57a85224c Mon Sep 17 00:00:00 2001 From: Olivier Barais Date: Wed, 10 Jan 2024 19:09:40 +0100 Subject: [PATCH 2/5] update for quarkus 3, java 21 --- src/main/resources/reflection-config.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/resources/reflection-config.json diff --git a/src/main/resources/reflection-config.json b/src/main/resources/reflection-config.json new file mode 100644 index 0000000..9d49196 --- /dev/null +++ b/src/main/resources/reflection-config.json @@ -0,0 +1,11 @@ +[ + { + "name" : "org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true + } +] From 8682fbd540b5739c818c67702db434e68738a1ef Mon Sep 17 00:00:00 2001 From: Olivier Barais Date: Thu, 11 Jan 2024 08:15:40 +0100 Subject: [PATCH 3/5] fix test --- pom.xml | 19 ++++++++++++------- src/main/resources/application.properties | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 2534818..086b9a6 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 1.0.0-SNAPSHOT CorrectExam - 1.0.1 + 1.2.1 3.6.4 8.27 4.0.0 @@ -87,6 +87,7 @@ io.quarkus quarkus-undertow + io.quarkus quarkus-resteasy @@ -127,7 +128,7 @@ org.ow2.asm asm - 9.5 + 9.6 test @@ -196,6 +197,8 @@ io.rest-assured rest-assured + 5.4.0 + test @@ -392,16 +395,18 @@ maven-resources-plugin ${maven-resources-plugin.version} - org.jboss.logmanager.LogManager - + ${maven.home} + + - --> + maven-failsafe-plugin ${maven-failsafe-plugin.version} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9b6b923..409d62e 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -119,6 +119,7 @@ quarkus.hibernate-orm.cache."fr.istic.domain.GradedComment.studentResponses".mem %test.quarkus.liquibase.migrate-at-start=true %test.quarkus.liquibase.change-log=config/liquibase/mastertest.xml %test.correctexam.uses3=false +quarkus.http.test-port=8083 ## configure your caches quarkus.cache.type=caffeine @@ -191,3 +192,4 @@ correctexam.bucketname=test correctexam.uses3=true correctexam.saveasfile=false %dev.quarkus.hibernate-orm.second-level-caching-enabled=false +%test.quarkus.http.host=localhost From c65bbb8860b987ea887e5f4ac978080553c9b8d7 Mon Sep 17 00:00:00 2001 From: Olivier Barais Date: Fri, 12 Jan 2024 08:09:02 +0100 Subject: [PATCH 4/5] update dockerfile --- .github/workflows/develop.yml | 20 ++++++++++++++++--- .github/workflows/maven.yml | 4 ++-- src/main/docker/Dockerfile.build.amd64 | 13 +++++++----- src/main/docker/Dockerfile.native | 2 +- .../java/fr/istic/service/ExamService.java | 1 + 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index ca9894a..3b9735e 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -5,7 +5,7 @@ name: Java CI with Maven on: push: - branches: [ develop1 ] + branches: [ develop ] jobs: build: @@ -14,11 +14,25 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: maven - name: Build with Maven run: mvn -B package --file pom.xml -Pnative + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: ./ + file: ./src/main/docker/Dockerfile.native + push: true + tags: barais/grade-scope-istic:develop diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 2862cb7..fafd13b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -14,10 +14,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '21' distribution: 'temurin' cache: maven - name: Build with Maven diff --git a/src/main/docker/Dockerfile.build.amd64 b/src/main/docker/Dockerfile.build.amd64 index 454e348..51daf3d 100644 --- a/src/main/docker/Dockerfile.build.amd64 +++ b/src/main/docker/Dockerfile.build.amd64 @@ -1,18 +1,21 @@ -FROM ghcr.io/graalvm/graalvm-ce:ol9-java11 AS build-step +FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:jdk-21 AS build-step +USER root WORKDIR /app -RUN gu install native-image +# RUN gu install native-image RUN microdnf install git -y RUN git clone https://github.com/correctexam/corrigeExamBack WORKDIR /app/corrigeExamBack +RUN git checkout develop +WORKDIR /app/corrigeExamBack RUN mkdir -p /opt/maven WORKDIR /opt/maven -RUN curl -O "https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz" && tar xzvf "apache-maven-3.6.3-bin.tar.gz" && rm "apache-maven-3.6.3-bin.tar.gz" +RUN curl -O "https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz" && tar xzvf "apache-maven-3.9.6-bin.tar.gz" && rm "apache-maven-3.9.6-bin.tar.gz" WORKDIR /app/corrigeExamBack -RUN /opt/maven/apache-maven-3.6.3/bin/mvn package -Pnative +RUN /opt/maven/apache-maven-3.9.6/bin/mvn package -Pnative -FROM oraclelinux:9-slim as prod +FROM quay.io/quarkus/quarkus-micro-image:2.0-amd64 as prod WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \ diff --git a/src/main/docker/Dockerfile.native b/src/main/docker/Dockerfile.native index d84d26e..e2efe58 100644 --- a/src/main/docker/Dockerfile.native +++ b/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/grade-scope-istic # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 +FROM quay.io/quarkus/quarkus-micro-image:2.0-amd64 WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \ diff --git a/src/main/java/fr/istic/service/ExamService.java b/src/main/java/fr/istic/service/ExamService.java index 6f9574c..84f65dc 100644 --- a/src/main/java/fr/istic/service/ExamService.java +++ b/src/main/java/fr/istic/service/ExamService.java @@ -220,6 +220,7 @@ public Optional findOne(Long id) { */ @Transactional public Paged findAll(Page page) { + log.debug("Request to get all Exams"); return new Paged<>(Exam.findAll().page(page)) .map(exam -> examMapper.toDto((Exam) exam)); From 747ed38ebd90e408fa576037ab31b4e40013470d Mon Sep 17 00:00:00 2001 From: Olivier Barais Date: Fri, 12 Jan 2024 08:10:35 +0100 Subject: [PATCH 5/5] update --- .github/workflows/develop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 3b9735e..b7dd2ea 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -14,10 +14,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v2 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: maven - name: Build with Maven