From 01e273ce087877a3236c1803dfb017d732e8e1ef Mon Sep 17 00:00:00 2001 From: jo-elimu <1451036+jo-elimu@users.noreply.github.com> Date: Sun, 28 Jul 2024 23:04:28 +0700 Subject: [PATCH] refactor(jee): javax.validation --> jakarta.validation refs #1691 --- pom.xml | 9 ++------- src/main/java/ai/elimu/model/DbMigration.java | 2 +- src/main/java/ai/elimu/model/Device.java | 2 +- src/main/java/ai/elimu/model/admin/Application.java | 2 +- .../java/ai/elimu/model/admin/ApplicationVersion.java | 2 +- .../java/ai/elimu/model/analytics/LearningEvent.java | 2 +- .../ai/elimu/model/analytics/LetterLearningEvent.java | 2 +- .../ai/elimu/model/analytics/StoryBookLearningEvent.java | 2 +- src/main/java/ai/elimu/model/content/Content.java | 2 +- src/main/java/ai/elimu/model/content/Emoji.java | 2 +- src/main/java/ai/elimu/model/content/Letter.java | 2 +- src/main/java/ai/elimu/model/content/Number.java | 2 +- src/main/java/ai/elimu/model/content/Sound.java | 2 +- src/main/java/ai/elimu/model/content/StoryBook.java | 2 +- .../java/ai/elimu/model/content/StoryBookChapter.java | 2 +- .../java/ai/elimu/model/content/StoryBookParagraph.java | 2 +- src/main/java/ai/elimu/model/content/Syllable.java | 2 +- src/main/java/ai/elimu/model/content/Word.java | 2 +- .../java/ai/elimu/model/content/multimedia/Audio.java | 2 +- .../java/ai/elimu/model/content/multimedia/Image.java | 2 +- .../ai/elimu/model/content/multimedia/Multimedia.java | 2 +- .../java/ai/elimu/model/content/multimedia/Video.java | 2 +- .../elimu/model/contributor/AudioContributionEvent.java | 2 +- .../ai/elimu/model/contributor/AudioPeerReviewEvent.java | 2 +- .../ai/elimu/model/contributor/ContributionEvent.java | 2 +- .../java/ai/elimu/model/contributor/Contributor.java | 2 +- .../elimu/model/contributor/ImageContributionEvent.java | 2 +- .../elimu/model/contributor/LetterContributionEvent.java | 2 +- .../model/contributor/LetterSoundContributionEvent.java | 2 +- .../model/contributor/LetterSoundPeerReviewEvent.java | 2 +- .../elimu/model/contributor/NumberContributionEvent.java | 2 +- .../elimu/model/contributor/NumberPeerReviewEvent.java | 2 +- .../java/ai/elimu/model/contributor/PeerReviewEvent.java | 2 +- .../elimu/model/contributor/SoundContributionEvent.java | 2 +- .../model/contributor/StoryBookContributionEvent.java | 2 +- .../model/contributor/StoryBookPeerReviewEvent.java | 2 +- .../elimu/model/contributor/WordContributionEvent.java | 2 +- .../ai/elimu/model/contributor/WordPeerReviewEvent.java | 2 +- .../admin/application/ApplicationCreateController.java | 2 +- .../web/admin/application/ApplicationEditController.java | 2 +- .../elimu/web/content/emoji/EmojiCreateController.java | 2 +- .../ai/elimu/web/content/emoji/EmojiEditController.java | 2 +- .../elimu/web/content/letter/LetterCreateController.java | 2 +- .../elimu/web/content/letter/LetterEditController.java | 2 +- .../letter_sound/LetterSoundCreateController.java | 2 +- .../content/letter_sound/LetterSoundEditController.java | 2 +- .../elimu/web/content/number/NumberCreateController.java | 2 +- .../elimu/web/content/number/NumberEditController.java | 2 +- .../elimu/web/content/sound/SoundCreateController.java | 2 +- .../ai/elimu/web/content/sound/SoundEditController.java | 2 +- .../web/content/storybook/StoryBookCreateController.java | 2 +- .../web/content/storybook/StoryBookEditController.java | 2 +- .../chapter/StoryBookChapterCreateController.java | 2 +- .../paragraph/StoryBookParagraphCreateController.java | 2 +- .../paragraph/StoryBookParagraphEditController.java | 2 +- .../ai/elimu/web/content/word/WordCreateController.java | 2 +- .../ai/elimu/web/content/word/WordEditController.java | 2 +- 57 files changed, 58 insertions(+), 63 deletions(-) diff --git a/pom.xml b/pom.xml index c49e2d363..139f1564f 100644 --- a/pom.xml +++ b/pom.xml @@ -406,16 +406,11 @@ aspectjweaver 1.9.22.1 - - - javax.validation - validation-api - 2.0.1.Final - + org.hibernate.validator hibernate-validator - 6.1.7.Final + 7.0.0.Final diff --git a/src/main/java/ai/elimu/model/DbMigration.java b/src/main/java/ai/elimu/model/DbMigration.java index 69cdd7f55..9a944d461 100644 --- a/src/main/java/ai/elimu/model/DbMigration.java +++ b/src/main/java/ai/elimu/model/DbMigration.java @@ -5,7 +5,7 @@ import javax.persistence.Entity; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class DbMigration extends BaseEntity { diff --git a/src/main/java/ai/elimu/model/Device.java b/src/main/java/ai/elimu/model/Device.java index 30450cb38..1a31ca276 100644 --- a/src/main/java/ai/elimu/model/Device.java +++ b/src/main/java/ai/elimu/model/Device.java @@ -5,7 +5,7 @@ import javax.persistence.Entity; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class Device extends BaseEntity { diff --git a/src/main/java/ai/elimu/model/admin/Application.java b/src/main/java/ai/elimu/model/admin/Application.java index 36b59002a..6f0785bec 100644 --- a/src/main/java/ai/elimu/model/admin/Application.java +++ b/src/main/java/ai/elimu/model/admin/Application.java @@ -7,7 +7,7 @@ import javax.persistence.Enumerated; import javax.persistence.FetchType; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import ai.elimu.model.BaseEntity; import ai.elimu.model.contributor.Contributor; import ai.elimu.model.v2.enums.content.LiteracySkill; diff --git a/src/main/java/ai/elimu/model/admin/ApplicationVersion.java b/src/main/java/ai/elimu/model/admin/ApplicationVersion.java index 51591c41a..9117de64a 100644 --- a/src/main/java/ai/elimu/model/admin/ApplicationVersion.java +++ b/src/main/java/ai/elimu/model/admin/ApplicationVersion.java @@ -7,7 +7,7 @@ import javax.persistence.ManyToOne; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import ai.elimu.model.BaseEntity; import ai.elimu.model.contributor.Contributor; diff --git a/src/main/java/ai/elimu/model/analytics/LearningEvent.java b/src/main/java/ai/elimu/model/analytics/LearningEvent.java index a07ef64c8..1518880a7 100644 --- a/src/main/java/ai/elimu/model/analytics/LearningEvent.java +++ b/src/main/java/ai/elimu/model/analytics/LearningEvent.java @@ -10,7 +10,7 @@ import javax.persistence.MappedSuperclass; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @MappedSuperclass public abstract class LearningEvent extends BaseEntity { diff --git a/src/main/java/ai/elimu/model/analytics/LetterLearningEvent.java b/src/main/java/ai/elimu/model/analytics/LetterLearningEvent.java index 7ce06e07f..458d1f02e 100644 --- a/src/main/java/ai/elimu/model/analytics/LetterLearningEvent.java +++ b/src/main/java/ai/elimu/model/analytics/LetterLearningEvent.java @@ -3,7 +3,7 @@ import ai.elimu.model.content.Letter; import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class LetterLearningEvent extends LearningEvent { diff --git a/src/main/java/ai/elimu/model/analytics/StoryBookLearningEvent.java b/src/main/java/ai/elimu/model/analytics/StoryBookLearningEvent.java index c6a6d00ca..d8762a130 100644 --- a/src/main/java/ai/elimu/model/analytics/StoryBookLearningEvent.java +++ b/src/main/java/ai/elimu/model/analytics/StoryBookLearningEvent.java @@ -3,7 +3,7 @@ import ai.elimu.model.content.StoryBook; import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class StoryBookLearningEvent extends LearningEvent { diff --git a/src/main/java/ai/elimu/model/content/Content.java b/src/main/java/ai/elimu/model/content/Content.java index 0005d2b01..85b1cb0ab 100644 --- a/src/main/java/ai/elimu/model/content/Content.java +++ b/src/main/java/ai/elimu/model/content/Content.java @@ -6,7 +6,7 @@ import javax.persistence.MappedSuperclass; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import ai.elimu.model.BaseEntity; import ai.elimu.model.v2.enums.content.ContentStatus; import ai.elimu.model.enums.PeerReviewStatus; diff --git a/src/main/java/ai/elimu/model/content/Emoji.java b/src/main/java/ai/elimu/model/content/Emoji.java index dd826de45..96539918f 100644 --- a/src/main/java/ai/elimu/model/content/Emoji.java +++ b/src/main/java/ai/elimu/model/content/Emoji.java @@ -7,7 +7,7 @@ import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; @Entity diff --git a/src/main/java/ai/elimu/model/content/Letter.java b/src/main/java/ai/elimu/model/content/Letter.java index e89a2f70b..ddd84797b 100644 --- a/src/main/java/ai/elimu/model/content/Letter.java +++ b/src/main/java/ai/elimu/model/content/Letter.java @@ -2,7 +2,7 @@ import javax.persistence.Column; import javax.persistence.Entity; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; @Entity diff --git a/src/main/java/ai/elimu/model/content/Number.java b/src/main/java/ai/elimu/model/content/Number.java index 9876f25e3..f2a6d4c0a 100644 --- a/src/main/java/ai/elimu/model/content/Number.java +++ b/src/main/java/ai/elimu/model/content/Number.java @@ -5,7 +5,7 @@ import javax.persistence.FetchType; import javax.persistence.ManyToMany; import javax.persistence.OrderColumn; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.hibernate.validator.constraints.NotEmpty; @Entity diff --git a/src/main/java/ai/elimu/model/content/Sound.java b/src/main/java/ai/elimu/model/content/Sound.java index e1165a120..0c3564709 100644 --- a/src/main/java/ai/elimu/model/content/Sound.java +++ b/src/main/java/ai/elimu/model/content/Sound.java @@ -5,7 +5,7 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.OneToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; import ai.elimu.model.content.multimedia.Audio; import ai.elimu.model.v2.enums.content.sound.ConsonantPlace; diff --git a/src/main/java/ai/elimu/model/content/StoryBook.java b/src/main/java/ai/elimu/model/content/StoryBook.java index 8cbfc0cec..a27a5db44 100644 --- a/src/main/java/ai/elimu/model/content/StoryBook.java +++ b/src/main/java/ai/elimu/model/content/StoryBook.java @@ -5,7 +5,7 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; import ai.elimu.model.content.multimedia.Image; import ai.elimu.model.enums.ContentLicense; diff --git a/src/main/java/ai/elimu/model/content/StoryBookChapter.java b/src/main/java/ai/elimu/model/content/StoryBookChapter.java index 89d39ef88..c9966fa63 100644 --- a/src/main/java/ai/elimu/model/content/StoryBookChapter.java +++ b/src/main/java/ai/elimu/model/content/StoryBookChapter.java @@ -4,7 +4,7 @@ import ai.elimu.model.BaseEntity; import ai.elimu.model.content.multimedia.Image; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class StoryBookChapter extends BaseEntity { diff --git a/src/main/java/ai/elimu/model/content/StoryBookParagraph.java b/src/main/java/ai/elimu/model/content/StoryBookParagraph.java index d9faff128..df5ce0b5c 100644 --- a/src/main/java/ai/elimu/model/content/StoryBookParagraph.java +++ b/src/main/java/ai/elimu/model/content/StoryBookParagraph.java @@ -8,7 +8,7 @@ import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.OrderColumn; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class StoryBookParagraph extends BaseEntity { diff --git a/src/main/java/ai/elimu/model/content/Syllable.java b/src/main/java/ai/elimu/model/content/Syllable.java index b655ba1a6..bdf2c5467 100644 --- a/src/main/java/ai/elimu/model/content/Syllable.java +++ b/src/main/java/ai/elimu/model/content/Syllable.java @@ -5,7 +5,7 @@ import javax.persistence.FetchType; import javax.persistence.ManyToMany; import javax.persistence.OrderColumn; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class Syllable extends Content { diff --git a/src/main/java/ai/elimu/model/content/Word.java b/src/main/java/ai/elimu/model/content/Word.java index 0667a2ac0..bf8cf13e3 100644 --- a/src/main/java/ai/elimu/model/content/Word.java +++ b/src/main/java/ai/elimu/model/content/Word.java @@ -7,7 +7,7 @@ import javax.persistence.FetchType; import javax.persistence.ManyToMany; import javax.persistence.OrderColumn; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import ai.elimu.model.v2.enums.content.SpellingConsistency; import ai.elimu.model.v2.enums.content.WordType; import javax.persistence.ManyToOne; diff --git a/src/main/java/ai/elimu/model/content/multimedia/Audio.java b/src/main/java/ai/elimu/model/content/multimedia/Audio.java index 283f6193e..8113612f4 100644 --- a/src/main/java/ai/elimu/model/content/multimedia/Audio.java +++ b/src/main/java/ai/elimu/model/content/multimedia/Audio.java @@ -7,7 +7,7 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Lob; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import ai.elimu.model.v2.enums.content.AudioFormat; import javax.persistence.ManyToOne; diff --git a/src/main/java/ai/elimu/model/content/multimedia/Image.java b/src/main/java/ai/elimu/model/content/multimedia/Image.java index 9f3d5f3a8..f49124add 100644 --- a/src/main/java/ai/elimu/model/content/multimedia/Image.java +++ b/src/main/java/ai/elimu/model/content/multimedia/Image.java @@ -5,7 +5,7 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Lob; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import ai.elimu.model.v2.enums.content.ImageFormat; @Entity diff --git a/src/main/java/ai/elimu/model/content/multimedia/Multimedia.java b/src/main/java/ai/elimu/model/content/multimedia/Multimedia.java index 8adc2d17c..44a9ab29a 100644 --- a/src/main/java/ai/elimu/model/content/multimedia/Multimedia.java +++ b/src/main/java/ai/elimu/model/content/multimedia/Multimedia.java @@ -10,7 +10,7 @@ import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.MappedSuperclass; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; import ai.elimu.model.content.Content; import ai.elimu.model.content.Letter; diff --git a/src/main/java/ai/elimu/model/content/multimedia/Video.java b/src/main/java/ai/elimu/model/content/multimedia/Video.java index 3ed9c1517..95f4184fc 100644 --- a/src/main/java/ai/elimu/model/content/multimedia/Video.java +++ b/src/main/java/ai/elimu/model/content/multimedia/Video.java @@ -5,7 +5,7 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Lob; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import ai.elimu.model.v2.enums.content.VideoFormat; @Entity diff --git a/src/main/java/ai/elimu/model/contributor/AudioContributionEvent.java b/src/main/java/ai/elimu/model/contributor/AudioContributionEvent.java index e60ea56b4..da86918a1 100644 --- a/src/main/java/ai/elimu/model/contributor/AudioContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/AudioContributionEvent.java @@ -2,7 +2,7 @@ import ai.elimu.model.content.multimedia.Audio; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class AudioContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/AudioPeerReviewEvent.java b/src/main/java/ai/elimu/model/contributor/AudioPeerReviewEvent.java index 1c633f7e7..0edb17fa7 100644 --- a/src/main/java/ai/elimu/model/contributor/AudioPeerReviewEvent.java +++ b/src/main/java/ai/elimu/model/contributor/AudioPeerReviewEvent.java @@ -1,7 +1,7 @@ package ai.elimu.model.contributor; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * An event where a {@link Contributor} peer-reviews a {@link Audio} which diff --git a/src/main/java/ai/elimu/model/contributor/ContributionEvent.java b/src/main/java/ai/elimu/model/contributor/ContributionEvent.java index 51b9f0813..8d853e6b1 100644 --- a/src/main/java/ai/elimu/model/contributor/ContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/ContributionEvent.java @@ -3,7 +3,7 @@ import ai.elimu.model.BaseEntity; import java.util.Calendar; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * Parent class for various types of content contribution events. diff --git a/src/main/java/ai/elimu/model/contributor/Contributor.java b/src/main/java/ai/elimu/model/contributor/Contributor.java index 02adebf14..bb1e07f26 100644 --- a/src/main/java/ai/elimu/model/contributor/Contributor.java +++ b/src/main/java/ai/elimu/model/contributor/Contributor.java @@ -11,7 +11,7 @@ import javax.persistence.FetchType; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.hibernate.validator.constraints.NotEmpty; import ai.elimu.model.enums.Role; diff --git a/src/main/java/ai/elimu/model/contributor/ImageContributionEvent.java b/src/main/java/ai/elimu/model/contributor/ImageContributionEvent.java index adaf5e383..5d0027ad6 100644 --- a/src/main/java/ai/elimu/model/contributor/ImageContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/ImageContributionEvent.java @@ -2,7 +2,7 @@ import ai.elimu.model.content.multimedia.Image; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class ImageContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/LetterContributionEvent.java b/src/main/java/ai/elimu/model/contributor/LetterContributionEvent.java index 36c7300f5..33fb9c2d7 100644 --- a/src/main/java/ai/elimu/model/contributor/LetterContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/LetterContributionEvent.java @@ -3,7 +3,7 @@ import ai.elimu.model.content.Letter; import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class LetterContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/LetterSoundContributionEvent.java b/src/main/java/ai/elimu/model/contributor/LetterSoundContributionEvent.java index 4a5e65ab3..22f93edae 100644 --- a/src/main/java/ai/elimu/model/contributor/LetterSoundContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/LetterSoundContributionEvent.java @@ -3,7 +3,7 @@ import ai.elimu.model.content.LetterSound; import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class LetterSoundContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/LetterSoundPeerReviewEvent.java b/src/main/java/ai/elimu/model/contributor/LetterSoundPeerReviewEvent.java index da29fc2a6..556e09777 100644 --- a/src/main/java/ai/elimu/model/contributor/LetterSoundPeerReviewEvent.java +++ b/src/main/java/ai/elimu/model/contributor/LetterSoundPeerReviewEvent.java @@ -1,7 +1,7 @@ package ai.elimu.model.contributor; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * An event where a {@link Contributor} peer-reviews a {@link LetterSound} which diff --git a/src/main/java/ai/elimu/model/contributor/NumberContributionEvent.java b/src/main/java/ai/elimu/model/contributor/NumberContributionEvent.java index 1f39110c2..2fb6eaca4 100644 --- a/src/main/java/ai/elimu/model/contributor/NumberContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/NumberContributionEvent.java @@ -2,7 +2,7 @@ import ai.elimu.model.content.Number; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class NumberContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/NumberPeerReviewEvent.java b/src/main/java/ai/elimu/model/contributor/NumberPeerReviewEvent.java index 324c9a266..ad76cddc7 100644 --- a/src/main/java/ai/elimu/model/contributor/NumberPeerReviewEvent.java +++ b/src/main/java/ai/elimu/model/contributor/NumberPeerReviewEvent.java @@ -1,7 +1,7 @@ package ai.elimu.model.contributor; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * An event where a {@link Contributor} peer-reviews a {@link Number} which diff --git a/src/main/java/ai/elimu/model/contributor/PeerReviewEvent.java b/src/main/java/ai/elimu/model/contributor/PeerReviewEvent.java index eb518b8d0..8fb304b7e 100644 --- a/src/main/java/ai/elimu/model/contributor/PeerReviewEvent.java +++ b/src/main/java/ai/elimu/model/contributor/PeerReviewEvent.java @@ -7,7 +7,7 @@ import javax.persistence.MappedSuperclass; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * An event where a {@link Contributor} peer-reviews a {@link ContributionEvent} of another {@link Contributor}. diff --git a/src/main/java/ai/elimu/model/contributor/SoundContributionEvent.java b/src/main/java/ai/elimu/model/contributor/SoundContributionEvent.java index 83199795c..cb54c4f4f 100644 --- a/src/main/java/ai/elimu/model/contributor/SoundContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/SoundContributionEvent.java @@ -3,7 +3,7 @@ import ai.elimu.model.content.Sound; import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class SoundContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/StoryBookContributionEvent.java b/src/main/java/ai/elimu/model/contributor/StoryBookContributionEvent.java index bed606b62..c64332b07 100644 --- a/src/main/java/ai/elimu/model/contributor/StoryBookContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/StoryBookContributionEvent.java @@ -5,7 +5,7 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class StoryBookContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/StoryBookPeerReviewEvent.java b/src/main/java/ai/elimu/model/contributor/StoryBookPeerReviewEvent.java index 776afc835..d72cd2c7b 100644 --- a/src/main/java/ai/elimu/model/contributor/StoryBookPeerReviewEvent.java +++ b/src/main/java/ai/elimu/model/contributor/StoryBookPeerReviewEvent.java @@ -2,7 +2,7 @@ import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * An event where a {@link Contributor} peer-reviews a {@link StoryBook} which diff --git a/src/main/java/ai/elimu/model/contributor/WordContributionEvent.java b/src/main/java/ai/elimu/model/contributor/WordContributionEvent.java index 049fad573..cb663e4fc 100644 --- a/src/main/java/ai/elimu/model/contributor/WordContributionEvent.java +++ b/src/main/java/ai/elimu/model/contributor/WordContributionEvent.java @@ -3,7 +3,7 @@ import ai.elimu.model.content.Word; import javax.persistence.Entity; import javax.persistence.ManyToOne; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Entity public class WordContributionEvent extends ContributionEvent { diff --git a/src/main/java/ai/elimu/model/contributor/WordPeerReviewEvent.java b/src/main/java/ai/elimu/model/contributor/WordPeerReviewEvent.java index 505adb7e0..bf17b9e63 100644 --- a/src/main/java/ai/elimu/model/contributor/WordPeerReviewEvent.java +++ b/src/main/java/ai/elimu/model/contributor/WordPeerReviewEvent.java @@ -1,7 +1,7 @@ package ai.elimu.model.contributor; import javax.persistence.*; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * An event where a {@link Contributor} peer-reviews a {@link Word} which diff --git a/src/main/java/ai/elimu/web/admin/application/ApplicationCreateController.java b/src/main/java/ai/elimu/web/admin/application/ApplicationCreateController.java index eb24e19c9..9925ac547 100644 --- a/src/main/java/ai/elimu/web/admin/application/ApplicationCreateController.java +++ b/src/main/java/ai/elimu/web/admin/application/ApplicationCreateController.java @@ -1,7 +1,7 @@ package ai.elimu.web.admin.application; import javax.servlet.http.HttpSession; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.ApplicationDao; diff --git a/src/main/java/ai/elimu/web/admin/application/ApplicationEditController.java b/src/main/java/ai/elimu/web/admin/application/ApplicationEditController.java index 4f57db38f..ec9dad530 100644 --- a/src/main/java/ai/elimu/web/admin/application/ApplicationEditController.java +++ b/src/main/java/ai/elimu/web/admin/application/ApplicationEditController.java @@ -2,7 +2,7 @@ import java.util.List; import javax.servlet.http.HttpSession; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.ApplicationDao; import ai.elimu.dao.ApplicationVersionDao; diff --git a/src/main/java/ai/elimu/web/content/emoji/EmojiCreateController.java b/src/main/java/ai/elimu/web/content/emoji/EmojiCreateController.java index eb84e84a7..93987ba87 100644 --- a/src/main/java/ai/elimu/web/content/emoji/EmojiCreateController.java +++ b/src/main/java/ai/elimu/web/content/emoji/EmojiCreateController.java @@ -1,7 +1,7 @@ package ai.elimu.web.content.emoji; import java.util.Calendar; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.EmojiDao; diff --git a/src/main/java/ai/elimu/web/content/emoji/EmojiEditController.java b/src/main/java/ai/elimu/web/content/emoji/EmojiEditController.java index a7e218ff2..811b5a6c1 100644 --- a/src/main/java/ai/elimu/web/content/emoji/EmojiEditController.java +++ b/src/main/java/ai/elimu/web/content/emoji/EmojiEditController.java @@ -2,7 +2,7 @@ import java.util.Calendar; import java.util.List; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.EmojiDao; diff --git a/src/main/java/ai/elimu/web/content/letter/LetterCreateController.java b/src/main/java/ai/elimu/web/content/letter/LetterCreateController.java index b114456e0..a4a22d906 100644 --- a/src/main/java/ai/elimu/web/content/letter/LetterCreateController.java +++ b/src/main/java/ai/elimu/web/content/letter/LetterCreateController.java @@ -1,7 +1,7 @@ package ai.elimu.web.content.letter; import java.util.Calendar; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.LetterContributionEventDao; diff --git a/src/main/java/ai/elimu/web/content/letter/LetterEditController.java b/src/main/java/ai/elimu/web/content/letter/LetterEditController.java index 68dba699c..555256664 100644 --- a/src/main/java/ai/elimu/web/content/letter/LetterEditController.java +++ b/src/main/java/ai/elimu/web/content/letter/LetterEditController.java @@ -1,7 +1,7 @@ package ai.elimu.web.content.letter; import java.util.Calendar; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.LetterContributionEventDao; diff --git a/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundCreateController.java b/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundCreateController.java index 8688041c1..7d8ef786b 100644 --- a/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundCreateController.java +++ b/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundCreateController.java @@ -1,7 +1,7 @@ package ai.elimu.web.content.letter_sound; import java.util.List; -import javax.validation.Valid; +import jakarta.validation.Valid; import ai.elimu.model.contributor.LetterSoundContributionEvent; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundEditController.java b/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundEditController.java index 4ddca0da8..bef59e922 100644 --- a/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundEditController.java +++ b/src/main/java/ai/elimu/web/content/letter_sound/LetterSoundEditController.java @@ -1,7 +1,7 @@ package ai.elimu.web.content.letter_sound; import java.util.List; -import javax.validation.Valid; +import jakarta.validation.Valid; import ai.elimu.model.contributor.LetterSoundContributionEvent; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/ai/elimu/web/content/number/NumberCreateController.java b/src/main/java/ai/elimu/web/content/number/NumberCreateController.java index 772060d0a..16447c680 100644 --- a/src/main/java/ai/elimu/web/content/number/NumberCreateController.java +++ b/src/main/java/ai/elimu/web/content/number/NumberCreateController.java @@ -4,7 +4,7 @@ import ai.elimu.dao.NumberContributionEventDao; import java.util.Calendar; import java.util.List; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.NumberDao; diff --git a/src/main/java/ai/elimu/web/content/number/NumberEditController.java b/src/main/java/ai/elimu/web/content/number/NumberEditController.java index 2f69a219d..c7dfe9c07 100644 --- a/src/main/java/ai/elimu/web/content/number/NumberEditController.java +++ b/src/main/java/ai/elimu/web/content/number/NumberEditController.java @@ -4,7 +4,7 @@ import ai.elimu.dao.NumberContributionEventDao; import java.util.Calendar; import java.util.List; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.NumberDao; diff --git a/src/main/java/ai/elimu/web/content/sound/SoundCreateController.java b/src/main/java/ai/elimu/web/content/sound/SoundCreateController.java index cf248f8e4..5f95315d1 100644 --- a/src/main/java/ai/elimu/web/content/sound/SoundCreateController.java +++ b/src/main/java/ai/elimu/web/content/sound/SoundCreateController.java @@ -3,7 +3,7 @@ import ai.elimu.dao.SoundContributionEventDao; import java.util.Calendar; import javax.servlet.http.HttpSession; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/ai/elimu/web/content/sound/SoundEditController.java b/src/main/java/ai/elimu/web/content/sound/SoundEditController.java index 6c9958123..9fc8fd5aa 100644 --- a/src/main/java/ai/elimu/web/content/sound/SoundEditController.java +++ b/src/main/java/ai/elimu/web/content/sound/SoundEditController.java @@ -4,7 +4,7 @@ import ai.elimu.dao.SoundContributionEventDao; import java.util.Calendar; import javax.servlet.http.HttpSession; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/ai/elimu/web/content/storybook/StoryBookCreateController.java b/src/main/java/ai/elimu/web/content/storybook/StoryBookCreateController.java index fd3d756b1..dd5651104 100644 --- a/src/main/java/ai/elimu/web/content/storybook/StoryBookCreateController.java +++ b/src/main/java/ai/elimu/web/content/storybook/StoryBookCreateController.java @@ -2,7 +2,7 @@ import java.util.Calendar; import java.util.List; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.ImageDao; diff --git a/src/main/java/ai/elimu/web/content/storybook/StoryBookEditController.java b/src/main/java/ai/elimu/web/content/storybook/StoryBookEditController.java index e6581f213..4df0160e6 100644 --- a/src/main/java/ai/elimu/web/content/storybook/StoryBookEditController.java +++ b/src/main/java/ai/elimu/web/content/storybook/StoryBookEditController.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.ImageDao; diff --git a/src/main/java/ai/elimu/web/content/storybook/chapter/StoryBookChapterCreateController.java b/src/main/java/ai/elimu/web/content/storybook/chapter/StoryBookChapterCreateController.java index 368428663..d91d106b0 100644 --- a/src/main/java/ai/elimu/web/content/storybook/chapter/StoryBookChapterCreateController.java +++ b/src/main/java/ai/elimu/web/content/storybook/chapter/StoryBookChapterCreateController.java @@ -15,7 +15,7 @@ import java.util.Calendar; import java.util.List; import javax.servlet.http.HttpSession; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphCreateController.java b/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphCreateController.java index 9b4406b1d..40c644f0a 100644 --- a/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphCreateController.java +++ b/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphCreateController.java @@ -19,7 +19,7 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.LogManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; diff --git a/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphEditController.java b/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphEditController.java index 596d40f27..f8d8d30e5 100644 --- a/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphEditController.java +++ b/src/main/java/ai/elimu/web/content/storybook/paragraph/StoryBookParagraphEditController.java @@ -15,7 +15,7 @@ import java.util.Calendar; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.LogManager; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/ai/elimu/web/content/word/WordCreateController.java b/src/main/java/ai/elimu/web/content/word/WordCreateController.java index 2a2430789..b1a18ecc0 100644 --- a/src/main/java/ai/elimu/web/content/word/WordCreateController.java +++ b/src/main/java/ai/elimu/web/content/word/WordCreateController.java @@ -3,7 +3,7 @@ import java.util.Calendar; import java.util.List; import java.util.Set; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.EmojiDao; diff --git a/src/main/java/ai/elimu/web/content/word/WordEditController.java b/src/main/java/ai/elimu/web/content/word/WordEditController.java index b82e594b2..0b6ca760b 100644 --- a/src/main/java/ai/elimu/web/content/word/WordEditController.java +++ b/src/main/java/ai/elimu/web/content/word/WordEditController.java @@ -2,7 +2,7 @@ import java.util.Calendar; import java.util.List; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.apache.logging.log4j.Logger; import ai.elimu.dao.AudioDao;