From ebb1135fb3276324af2471d2c47b5a84f3825740 Mon Sep 17 00:00:00 2001 From: Damian Sobieralski Date: Mon, 22 Jul 2024 17:28:35 -0400 Subject: [PATCH] LMSA-9180 - made changes after code review --- .../ThemeContentJpaCustomRestController.java | 2 +- .../coursesetupwizard/model/BannerImage.java | 4 ++- .../coursesetupwizard/model/ThemeContent.java | 4 ++- .../lms/coursesetupwizard/model/ThemeLog.java | 4 ++- .../resources/templates/theme/guidance.html | 23 +------------- src/main/resources/templates/theme/intro.html | 14 ++------- .../resources/templates/theme/navigation.html | 23 +------------- .../resources/templates/theme/review.html | 21 ------------- .../templates/theme/selectBanner.html | 11 ++----- .../templates/theme/selectTheme.html | 15 ++-------- .../resources/templates/theme/submit.html | 30 +------------------ 11 files changed, 20 insertions(+), 131 deletions(-) diff --git a/src/main/java/edu/iu/uits/lms/coursesetupwizard/controller/rest/ThemeContentJpaCustomRestController.java b/src/main/java/edu/iu/uits/lms/coursesetupwizard/controller/rest/ThemeContentJpaCustomRestController.java index aa8ddcf..29fcff1 100644 --- a/src/main/java/edu/iu/uits/lms/coursesetupwizard/controller/rest/ThemeContentJpaCustomRestController.java +++ b/src/main/java/edu/iu/uits/lms/coursesetupwizard/controller/rest/ThemeContentJpaCustomRestController.java @@ -63,7 +63,7 @@ @Tag(name = "ThemeContentRepository") @Slf4j /* - * This REST controller supplements the REST JPA endpoints auto-defined in BannerImageRepository. + * This REST controller supplements the REST JPA endpoints auto-defined in ThemeContentRepository. * That's why @Tag's name matches that repository so that via swagger these endpoints are grouped under * the JPA auto-generated ones. */ diff --git a/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/BannerImage.java b/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/BannerImage.java index 1efeb85..2c8cade 100644 --- a/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/BannerImage.java +++ b/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/BannerImage.java @@ -53,6 +53,7 @@ import javax.persistence.PreUpdate; import javax.persistence.SequenceGenerator; import javax.persistence.Table; +import javax.persistence.UniqueConstraint; import java.util.Date; import java.util.List; @@ -87,7 +88,8 @@ public class BannerImage { inverseJoinColumns = @JoinColumn(name = "BANNER_IMAGE_CATEGORY_ID"), indexes = {@Index(name = "IDX_CSW_BAN_IMG_X_CAT_BID", columnList = "BANNER_IMAGE_ID"), @Index(name = "IDX_CSW_BAN_IMG_X_CAT_CAT", columnList = "BANNER_IMAGE_CATEGORY_ID")}, - foreignKey = @ForeignKey(name = "FK_CSW_BANNER_IMAGE_ID"), inverseForeignKey = @ForeignKey(name = "FK_CSW_BANNER_IMAGE_CATEGORY_ID")) + foreignKey = @ForeignKey(name = "FK_CSW_BANNER_IMAGE_ID"), inverseForeignKey = @ForeignKey(name = "FK_CSW_BANNER_IMAGE_CATEGORY_ID"), + uniqueConstraints = @UniqueConstraint(columnNames = {"BANNER_IMAGE_ID", "BANNER_IMAGE_CATEGORY_ID"})) private List bannerImageCategories; @Column(name = "CREATEDON") diff --git a/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeContent.java b/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeContent.java index 459e8a1..10e8a46 100644 --- a/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeContent.java +++ b/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeContent.java @@ -40,6 +40,7 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; +import javax.persistence.Lob; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; import javax.persistence.Table; @@ -55,7 +56,8 @@ public class ThemeContent { @Column(name = "NAME") private String name; - @Column(name = "TEMPLATE_TEXT") + @Lob + @Column(name = "TEMPLATE_TEXT", columnDefinition = "TEXT") private String templateText; @Column(name = "CREATEDON") diff --git a/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeLog.java b/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeLog.java index bfffd6b..d7f84ac 100644 --- a/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeLog.java +++ b/src/main/java/edu/iu/uits/lms/coursesetupwizard/model/ThemeLog.java @@ -41,6 +41,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.Lob; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; import javax.persistence.SequenceGenerator; @@ -82,7 +83,8 @@ public class ThemeLog { @Column(name = "INCLUDE_GUIDANCE") private boolean includeGuidance; - @Column(name = "ERRORS") + @Lob + @Column(name = "ERRORS", columnDefinition = "TEXT") private String errors; @Column(name = "CREATEDON") diff --git a/src/main/resources/templates/theme/guidance.html b/src/main/resources/templates/theme/guidance.html index 627b20d..8dc6a98 100644 --- a/src/main/resources/templates/theme/guidance.html +++ b/src/main/resources/templates/theme/guidance.html @@ -48,30 +48,9 @@

Include guidance

- - + \ No newline at end of file diff --git a/src/main/resources/templates/theme/intro.html b/src/main/resources/templates/theme/intro.html index 897cf7d..0e3e366 100644 --- a/src/main/resources/templates/theme/intro.html +++ b/src/main/resources/templates/theme/intro.html @@ -37,23 +37,13 @@

Intro

- - - + - + \ No newline at end of file diff --git a/src/main/resources/templates/theme/navigation.html b/src/main/resources/templates/theme/navigation.html index 96f1b70..9e7d4ef 100644 --- a/src/main/resources/templates/theme/navigation.html +++ b/src/main/resources/templates/theme/navigation.html @@ -55,30 +55,9 @@

Include navigation

- - + \ No newline at end of file diff --git a/src/main/resources/templates/theme/review.html b/src/main/resources/templates/theme/review.html index d3b6b64..7146bbc 100644 --- a/src/main/resources/templates/theme/review.html +++ b/src/main/resources/templates/theme/review.html @@ -59,30 +59,9 @@

Review

- diff --git a/src/main/resources/templates/theme/selectBanner.html b/src/main/resources/templates/theme/selectBanner.html index 55e9536..676db56 100644 --- a/src/main/resources/templates/theme/selectBanner.html +++ b/src/main/resources/templates/theme/selectBanner.html @@ -56,7 +56,7 @@

Select banner

- +
@@ -75,16 +75,11 @@

Select banner

- diff --git a/src/main/resources/templates/theme/selectTheme.html b/src/main/resources/templates/theme/selectTheme.html index 85eb7c4..ba2b4ff 100644 --- a/src/main/resources/templates/theme/selectTheme.html +++ b/src/main/resources/templates/theme/selectTheme.html @@ -25,7 +25,6 @@

Select theme

Theme options -
  • @@ -39,24 +38,17 @@

    Select theme

+
- - - + \ No newline at end of file diff --git a/src/main/resources/templates/theme/submit.html b/src/main/resources/templates/theme/submit.html index 0d685f2..0ec563f 100644 --- a/src/main/resources/templates/theme/submit.html +++ b/src/main/resources/templates/theme/submit.html @@ -38,33 +38,5 @@

Submit

- - - - - - + \ No newline at end of file