From b3d7fc8ad7dd5bb2604eeed811a2dcd392feb642 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Fri, 8 Sep 2023 16:20:25 +0200 Subject: [PATCH 01/28] [gitflow-maven-plugin] Update for next development version 1.14.1-2.23.2-SNAPSHOT --- bundles/core/pom.xml | 4 ++-- examples/bundles/examples-core/pom.xml | 6 +++--- examples/content-packages/examples-libs/pom.xml | 6 +++--- examples/content-packages/examples-sample-content/pom.xml | 4 ++-- examples/content-packages/examples/pom.xml | 6 +++--- examples/pom.xml | 4 ++-- parent/pom.xml | 4 ++-- pom.xml | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bundles/core/pom.xml b/bundles/core/pom.xml index 347f2bc..4a8200a 100644 --- a/bundles/core/pom.xml +++ b/bundles/core/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT ../../parent/pom.xml io.wcm io.wcm.wcm.core.components - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT jar WCM Core Components diff --git a/examples/bundles/examples-core/pom.xml b/examples/bundles/examples-core/pom.xml index 77211de..4d27bf8 100644 --- a/examples/bundles/examples-core/pom.xml +++ b/examples/bundles/examples-core/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-core - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT jar WCM Core Components Examples Core @@ -44,7 +44,7 @@ io.wcm io.wcm.wcm.core.components - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT compile diff --git a/examples/content-packages/examples-libs/pom.xml b/examples/content-packages/examples-libs/pom.xml index 33f4521..707c39d 100644 --- a/examples/content-packages/examples-libs/pom.xml +++ b/examples/content-packages/examples-libs/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-libs - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT content-package WCM Core Components Examples wcm.io Libraries @@ -42,7 +42,7 @@ io.wcm io.wcm.wcm.core.components - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT compile diff --git a/examples/content-packages/examples-sample-content/pom.xml b/examples/content-packages/examples-sample-content/pom.xml index 466e5e3..f2acd5e 100644 --- a/examples/content-packages/examples-sample-content/pom.xml +++ b/examples/content-packages/examples-sample-content/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-sample-content - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT content-package WCM Core Components Examples Content diff --git a/examples/content-packages/examples/pom.xml b/examples/content-packages/examples/pom.xml index 09e3026..6c439d5 100644 --- a/examples/content-packages/examples/pom.xml +++ b/examples/content-packages/examples/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT content-package WCM Core Components Examples @@ -42,7 +42,7 @@ io.wcm.samples io.wcm.wcm.core.components.examples-core - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT compile diff --git a/examples/pom.xml b/examples/pom.xml index e3036b3..5ec7c7f 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT ../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples.root - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT pom diff --git a/parent/pom.xml b/parent/pom.xml index 24543a4..98ef299 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -31,7 +31,7 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT pom WCM Core Components @@ -54,7 +54,7 @@ http://localhost:4503 - 2023-09-08T14:17:30Z + 2023-09-08T14:20:23Z diff --git a/pom.xml b/pom.xml index 5aa565d..74d8130 100644 --- a/pom.xml +++ b/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT parent/pom.xml io.wcm io.wcm.wcm.core.components.root - 1.14.0-2.23.2 + 1.14.1-2.23.2-SNAPSHOT pom ${site.url}/${site.url.module.prefix}/ From 39b4e7fd888e8f2b10c2a038428288676a76be20 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Tue, 17 Oct 2023 10:36:19 +0200 Subject: [PATCH 02/28] update dependencies --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 98ef299..67d5bda 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -160,7 +160,7 @@ io.wcm io.wcm.testing.aem-mock.junit5 - 5.3.0 + 5.4.0 org.apache.sling From 9e62d0772b1cbf5a4aa0ca8e158bf827647a044c Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Wed, 8 Nov 2023 12:16:29 +0100 Subject: [PATCH 03/28] Add Java 21 build (#16) Update to checkout@v4 Update dependencies --- .github/workflows/maven-build.yml | 2 +- .github/workflows/maven-deploy.yml | 2 +- .github/workflows/release-from-tag.yml | 2 +- parent/pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index c85498c..fc4f02d 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -20,7 +20,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - java: [11, 17] + java: [11, 17, 21] os: [ubuntu-latest] distribution: [temurin] diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml index 30b8e54..c709b1c 100644 --- a/.github/workflows/maven-deploy.yml +++ b/.github/workflows/maven-deploy.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure GIT run: | diff --git a/.github/workflows/release-from-tag.yml b/.github/workflows/release-from-tag.yml index 53c567c..40c2cd7 100644 --- a/.github/workflows/release-from-tag.yml +++ b/.github/workflows/release-from-tag.yml @@ -12,7 +12,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ncipollo/release-action@v1 with: body: 'Changes: https://wcm.io/wcm/core-components/changes-report.html' diff --git a/parent/pom.xml b/parent/pom.xml index 67d5bda..3eff1fa 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,7 +25,7 @@ io.wcm io.wcm.parent_toplevel - 2.2.2 + 2.2.3-SNAPSHOT @@ -160,7 +160,7 @@ io.wcm io.wcm.testing.aem-mock.junit5 - 5.4.0 + 5.4.1-SNAPSHOT org.apache.sling From 4a8610ad68eaa0baad7bd6f82cd183a3be5d7c12 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 20 Nov 2023 15:02:14 +0100 Subject: [PATCH 04/28] update parent dependency --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 3eff1fa..29bbb58 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,7 +25,7 @@ io.wcm io.wcm.parent_toplevel - 2.2.3-SNAPSHOT + 2.2.4 From 006d3a1067f6e76dc80b0ff9e082de541cb090ee Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Tue, 21 Nov 2023 09:40:27 +0100 Subject: [PATCH 05/28] update testing dependency --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 29bbb58..f184e81 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -160,7 +160,7 @@ io.wcm io.wcm.testing.aem-mock.junit5 - 5.4.1-SNAPSHOT + 5.4.2 org.apache.sling From ee0d6167b4d9c5ef7420500ec6e8ff0bc32195e5 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Wed, 22 Nov 2023 15:40:08 +0100 Subject: [PATCH 06/28] update dependencies --- examples/content-packages/examples-libs/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/content-packages/examples-libs/pom.xml b/examples/content-packages/examples-libs/pom.xml index 707c39d..b516f51 100644 --- a/examples/content-packages/examples-libs/pom.xml +++ b/examples/content-packages/examples-libs/pom.xml @@ -143,7 +143,7 @@ io.wcm io.wcm.caconfig.editor - 1.15.6 + 1.15.8 io.wcm @@ -188,7 +188,7 @@ io.wcm io.wcm.wcm.ui.granite - 1.9.14 + 1.10.0 From 0d734468167275a3e7a6e9f9bde6f55be07140c2 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 27 Nov 2023 10:44:45 +0100 Subject: [PATCH 07/28] update parent_toplevel dependency --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index f184e81..5a13e44 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,7 +25,7 @@ io.wcm io.wcm.parent_toplevel - 2.2.4 + 2.2.5-SNAPSHOT From 7439e60a840b5726dbc33706b28b881defb1e6ce Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Tue, 12 Dec 2023 11:08:18 +0100 Subject: [PATCH 08/28] update dependencies --- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parent/pom.xml b/parent/pom.xml index 5a13e44..0cc2c1e 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,7 +25,7 @@ io.wcm io.wcm.parent_toplevel - 2.2.5-SNAPSHOT + 2.2.6 @@ -160,7 +160,7 @@ io.wcm io.wcm.testing.aem-mock.junit5 - 5.4.2 + 5.4.4 org.apache.sling From 9187e85f628fa0ce978153479f8be419c9c949ae Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Sat, 16 Dec 2023 10:56:16 +0100 Subject: [PATCH 09/28] update dependency --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 0cc2c1e..752a633 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -170,7 +170,7 @@ org.apache.sling org.apache.sling.testing.caconfig-mock-plugin - 1.5.2 + 1.5.4 io.wcm From d0b79d493633f1286a3795206a970795153aa226 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 18 Dec 2023 12:52:00 +0100 Subject: [PATCH 10/28] update dependencies --- examples/content-packages/examples-libs/pom.xml | 6 +++--- parent/pom.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/content-packages/examples-libs/pom.xml b/examples/content-packages/examples-libs/pom.xml index b516f51..2d8fa7a 100644 --- a/examples/content-packages/examples-libs/pom.xml +++ b/examples/content-packages/examples-libs/pom.xml @@ -168,17 +168,17 @@ io.wcm io.wcm.handler.link - 1.10.2 + 1.10.4 io.wcm io.wcm.handler.media - 1.15.8 + 1.16.0 io.wcm io.wcm.handler.richtext - 1.6.4 + 1.6.6 io.wcm diff --git a/parent/pom.xml b/parent/pom.xml index 752a633..0af7f1c 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,7 +25,7 @@ io.wcm io.wcm.parent_toplevel - 2.2.6 + 2.2.8 @@ -190,7 +190,7 @@ io.wcm io.wcm.testing.wcm-io-mock.handler - 1.4.0 + 1.5.0 From d510853990a4065d53a8145beb427f50c6c7c05c Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Wed, 20 Dec 2023 11:59:46 +0100 Subject: [PATCH 11/28] Update to Handler 2.x dependencies (#17) --- bundles/core/pom.xml | 4 +-- .../commons/link/LinkWrapperTest.java | 1 - changes.xml | 6 ++++ examples/bundles/examples-core/pom.xml | 6 ++-- .../content-packages/examples-libs/pom.xml | 16 +++++------ .../examples-sample-content/pom.xml | 4 +-- examples/content-packages/examples/pom.xml | 6 ++-- examples/pom.xml | 4 +-- parent/pom.xml | 28 +++++++------------ pom.xml | 4 +-- src/site/markdown/index.md | 1 + 11 files changed, 39 insertions(+), 41 deletions(-) diff --git a/bundles/core/pom.xml b/bundles/core/pom.xml index 4a8200a..6f4770b 100644 --- a/bundles/core/pom.xml +++ b/bundles/core/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT ../../parent/pom.xml io.wcm io.wcm.wcm.core.components - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT jar WCM Core Components diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java index 67b5c57..6cd5d93 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java @@ -48,7 +48,6 @@ import io.wcm.testing.mock.aem.junit5.AemContext; import io.wcm.testing.mock.aem.junit5.AemContextExtension; import io.wcm.wcm.commons.contenttype.ContentType; -import io.wcm.wcm.core.components.commons.link.LinkWrapper; import io.wcm.wcm.core.components.testcontext.AppAemContext; @ExtendWith(AemContextExtension.class) diff --git a/changes.xml b/changes.xml index c6cb227..feb90a3 100644 --- a/changes.xml +++ b/changes.xml @@ -23,6 +23,12 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd"> + + + Switch to Handler 2.x. + + + Add Image (v3). diff --git a/examples/bundles/examples-core/pom.xml b/examples/bundles/examples-core/pom.xml index 4d27bf8..25c28e8 100644 --- a/examples/bundles/examples-core/pom.xml +++ b/examples/bundles/examples-core/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-core - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT jar WCM Core Components Examples Core @@ -44,7 +44,7 @@ io.wcm io.wcm.wcm.core.components - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT compile diff --git a/examples/content-packages/examples-libs/pom.xml b/examples/content-packages/examples-libs/pom.xml index 2d8fa7a..0ae6b47 100644 --- a/examples/content-packages/examples-libs/pom.xml +++ b/examples/content-packages/examples-libs/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-libs - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT content-package WCM Core Components Examples wcm.io Libraries @@ -42,7 +42,7 @@ io.wcm io.wcm.wcm.core.components - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT compile @@ -158,27 +158,27 @@ io.wcm io.wcm.handler.commons - 1.5.0 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.url - 1.10.2 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.link - 1.10.4 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.media - 1.16.0 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.richtext - 1.6.6 + 2.0.0-SNAPSHOT io.wcm diff --git a/examples/content-packages/examples-sample-content/pom.xml b/examples/content-packages/examples-sample-content/pom.xml index f2acd5e..7e76593 100644 --- a/examples/content-packages/examples-sample-content/pom.xml +++ b/examples/content-packages/examples-sample-content/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-sample-content - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT content-package WCM Core Components Examples Content diff --git a/examples/content-packages/examples/pom.xml b/examples/content-packages/examples/pom.xml index 6c439d5..a9bfedf 100644 --- a/examples/content-packages/examples/pom.xml +++ b/examples/content-packages/examples/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT content-package WCM Core Components Examples @@ -42,7 +42,7 @@ io.wcm.samples io.wcm.wcm.core.components.examples-core - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT compile diff --git a/examples/pom.xml b/examples/pom.xml index 5ec7c7f..483fc9a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT ../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples.root - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT pom diff --git a/parent/pom.xml b/parent/pom.xml index 0af7f1c..d0a2e76 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.parent_toplevel - 2.2.8 + 2.3.0-SNAPSHOT io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT pom WCM Core Components @@ -54,20 +54,12 @@ http://localhost:4503 - 2023-09-08T14:20:23Z + 2023-12-19T13:04:38Z - - io.wcm.maven - io.wcm.maven.aem-dependencies - 6.5.17.0001 - pom - import - - com.adobe.cq @@ -123,27 +115,27 @@ io.wcm io.wcm.handler.commons - 1.5.0 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.url - 1.10.2 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.link - 1.10.2 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.media - 1.15.6 + 2.0.0-SNAPSHOT io.wcm io.wcm.handler.richtext - 1.6.4 + 2.0.0-SNAPSHOT io.wcm @@ -153,7 +145,7 @@ io.wcm io.wcm.wcm.ui.granite - 1.9.14 + 1.10.0 @@ -190,7 +182,7 @@ io.wcm io.wcm.testing.wcm-io-mock.handler - 1.5.0 + 2.0.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 74d8130..4263e38 100644 --- a/pom.xml +++ b/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT parent/pom.xml io.wcm io.wcm.wcm.core.components.root - 1.14.1-2.23.2-SNAPSHOT + 2.0.0-2.23.2-SNAPSHOT pom ${site.url}/${site.url.module.prefix}/ diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 1faa433..2eac641 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -35,6 +35,7 @@ There is currently no added wcm.io support for the Core Component AMP extensions |wcm.io WCM Core Components version | AEM Sites Core Component version | AEM version supported |-----------------------------------|----------------------------------|--------------------------------------------- +| 2.0.0-2.23.2 | 2.23.2 and up | AEM 6.5.17, AEMaaCS | 1.14.0-2.23.2 | 2.23.2 and up | AEM 6.5.17, AEMaaCS | 1.13.0-2.22.6 | 2.22.6 and up | AEM 6.5.14, AEMaaCS | 1.12.0-2.20.0 | 2.20.0 and up | AEM 6.5.13, AEMaaCS From 76010e8b15660222828257324b6eb5407e1083ff Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 21 Dec 2023 14:17:48 +0100 Subject: [PATCH 12/28] make use of core.wcm.components.testing.aem-mock-plugin --- bundles/core/pom.xml | 5 +++++ .../wcm/core/components/testcontext/AppAemContext.java | 8 ++------ parent/pom.xml | 5 +++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bundles/core/pom.xml b/bundles/core/pom.xml index 6f4770b..f6cd7a4 100644 --- a/bundles/core/pom.xml +++ b/bundles/core/pom.xml @@ -154,6 +154,11 @@ org.apache.sling.testing.logging-mock test + + com.adobe.cq + core.wcm.components.testing.aem-mock-plugin + test + org.apache.sling org.apache.sling.testing.caconfig-mock-plugin diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/AppAemContext.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/AppAemContext.java index 7c4276b..f77a518 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/AppAemContext.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/AppAemContext.java @@ -19,6 +19,7 @@ */ package io.wcm.wcm.core.components.testcontext; +import static com.adobe.cq.wcm.core.components.testing.mock.ContextPlugins.CORE_COMPONENTS; import static com.day.cq.commons.jcr.JcrConstants.JCR_LANGUAGE; import static com.day.cq.commons.jcr.JcrConstants.JCR_TITLE; import static io.wcm.testing.mock.wcmio.caconfig.ContextPlugins.WCMIO_CACONFIG; @@ -33,8 +34,6 @@ import org.apache.sling.api.resource.PersistenceException; import org.jetbrains.annotations.NotNull; -import com.adobe.cq.wcm.core.components.internal.link.DefaultPathProcessor; - import io.wcm.handler.media.spi.MediaFormatProvider; import io.wcm.handler.media.spi.MediaHandlerConfig; import io.wcm.handler.url.spi.UrlHandlerConfig; @@ -62,7 +61,7 @@ private AppAemContext() { public static AemContext newAemContext() { return new AemContextBuilder() .plugin(CACONFIG) - .plugin(WCMIO_SLING, WCMIO_WCM, WCMIO_CACONFIG, WCMIO_HANDLER) + .plugin(CORE_COMPONENTS, WCMIO_SLING, WCMIO_WCM, WCMIO_CACONFIG, WCMIO_HANDLER) .afterSetUp(SETUP_CALLBACK) .build(); } @@ -82,9 +81,6 @@ public void execute(@NotNull AemContext context) throws PersistenceException, IO context.registerService(MediaHandlerConfig.class, new MediaHandlerConfigImpl()); context.registerService(MediaFormatProvider.class, new MediaFormatProviderImpl()); - // core components link handling services - context.registerInjectActivateService(DefaultPathProcessor.class); - // create template context.create().resource(TEMPLATE_PATH, JCR_TITLE, "Template #1"); diff --git a/parent/pom.xml b/parent/pom.xml index d0a2e76..1865009 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -159,6 +159,11 @@ org.apache.sling.testing.logging-mock 2.0.0 + + com.adobe.cq + core.wcm.components.testing.aem-mock-plugin + ${core.wcm.components.version} + org.apache.sling org.apache.sling.testing.caconfig-mock-plugin From ddf37ad43e77d146adceab0e4130da7c1b16bd61 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 8 Jan 2024 15:49:26 +0100 Subject: [PATCH 13/28] switch to cfg.json format --- ...mpl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.cfg.json | 5 +++++ ....impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.config | 1 - ...mmons.instancetype.impl.InstanceTypeServiceImpl.cfg.json | 3 +++ ...commons.instancetype.impl.InstanceTypeServiceImpl.config | 1 - ...rviceUserMapperImpl.amended-wcmiocmpsmp-handler.cfg.json | 5 +++++ ...ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.config | 1 - ...mmons.instancetype.impl.InstanceTypeServiceImpl.cfg.json | 3 +++ ...commons.instancetype.impl.InstanceTypeServiceImpl.config | 1 - ...pl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.cfg.json | 5 +++++ ...impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.config | 1 - ...l.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.cfg.json | 6 ++++++ ...mpl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.config | 1 - 12 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.cfg.json delete mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.config create mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json delete mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config create mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.cfg.json delete mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.config create mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json delete mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config create mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.cfg.json delete mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.config create mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.cfg.json delete mode 100644 examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.config diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.cfg.json b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.cfg.json new file mode 100644 index 0000000..bfbb5b8 --- /dev/null +++ b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.cfg.json @@ -0,0 +1,5 @@ +{ + "sling.servlet.resourceTypes": [ + "wcm-io/wcm/core/components/wcmio/responsiveimage/v1/responsiveimage" + ] +} diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.config b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.config deleted file mode 100644 index 8804ea8..0000000 --- a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet-wcmiocmpsmp.config +++ /dev/null @@ -1 +0,0 @@ -sling.servlet.resourceTypes=["wcm-io/wcm/core/components/wcmio/responsiveimage/v1/responsiveimage"] \ No newline at end of file diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json new file mode 100644 index 0000000..8686fa1 --- /dev/null +++ b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json @@ -0,0 +1,3 @@ +{ + "instance.type": "author" +} diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config deleted file mode 100644 index 412644f..0000000 --- a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config +++ /dev/null @@ -1 +0,0 @@ -instance.type="author" \ No newline at end of file diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.cfg.json b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.cfg.json new file mode 100644 index 0000000..9b09012 --- /dev/null +++ b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.cfg.json @@ -0,0 +1,5 @@ +{ + "user.mapping": [ + "io.wcm.handler.media:dam-rendition-metadata=[dam-writer-service]" + ] +} diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.config b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.config deleted file mode 100644 index 4e995cd..0000000 --- a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.author/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-handler.config +++ /dev/null @@ -1 +0,0 @@ -user.mapping=["io.wcm.handler.media:dam-rendition-metadata\=[dam-writer-service]"] diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json new file mode 100644 index 0000000..48f8651 --- /dev/null +++ b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.cfg.json @@ -0,0 +1,3 @@ +{ + "instance.type": "publish" +} diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config deleted file mode 100644 index d01a061..0000000 --- a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config.publish/io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl.config +++ /dev/null @@ -1 +0,0 @@ -instance.type="publish" \ No newline at end of file diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.cfg.json b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.cfg.json new file mode 100644 index 0000000..eb322b7 --- /dev/null +++ b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.cfg.json @@ -0,0 +1,5 @@ +{ + "user.mapping": [ + "io.wcm.handler.media:dynamic-media-support=[configuration-reader-service]" + ] +} diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.config b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.config deleted file mode 100644 index 192be33..0000000 --- a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-dm.config +++ /dev/null @@ -1 +0,0 @@ -user.mapping=["io.wcm.handler.media:dynamic-media-support\=[configuration-reader-service]"] \ No newline at end of file diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.cfg.json b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.cfg.json new file mode 100644 index 0000000..dece9e4 --- /dev/null +++ b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.cfg.json @@ -0,0 +1,6 @@ +{ + "user.mapping": [ + "io.wcm.handler.url:clientlibs-service=[sling-scripting]", + "io.wcm.wcm.commons:component-properties=[sling-scripting]" + ] +} diff --git a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.config b/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.config deleted file mode 100644 index 6c5069b..0000000 --- a/examples/content-packages/examples-libs/jcr_root/apps/wcm-io-samples/wcm-core-components-libs/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-wcmiocmpsmp-wcm.config +++ /dev/null @@ -1 +0,0 @@ -user.mapping=["io.wcm.handler.url:clientlibs-service\=[sling-scripting]","io.wcm.wcm.commons:component-properties\=[sling-scripting]"] \ No newline at end of file From 00618065f1c6bcbd56431e53bb98eb51713f0114 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Tue, 16 Jan 2024 14:28:39 +0100 Subject: [PATCH 14/28] explicitly define folder type for JSON files with "nt:unstructured" as root node to circumvent SLING-12197 --- .../components/wcmio/commons/mediaAltTextInclude/v1.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 bundles/core/src/main/webapp/app-root/components/wcmio/commons/mediaAltTextInclude/v1.json diff --git a/bundles/core/src/main/webapp/app-root/components/wcmio/commons/mediaAltTextInclude/v1.json b/bundles/core/src/main/webapp/app-root/components/wcmio/commons/mediaAltTextInclude/v1.json new file mode 100644 index 0000000..bdf9f6f --- /dev/null +++ b/bundles/core/src/main/webapp/app-root/components/wcmio/commons/mediaAltTextInclude/v1.json @@ -0,0 +1,3 @@ +{ + "jcr:primaryType": "sling:Folder" +} From 8ca7a7c26956dc4178552beee003c44c59d23430 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Tue, 16 Jan 2024 14:33:41 +0100 Subject: [PATCH 15/28] fix unit test --- .../wcm/wcm/core/components/impl/models/v3/ImageV3ImplTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3ImplTest.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3ImplTest.java index 1606748..06ad7c9 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3ImplTest.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3ImplTest.java @@ -192,7 +192,7 @@ void testWithAssetImage_SVG() { Image underTest = AdaptTo.notNull(context.request(), Image.class); - String expectedMediaUrl = DAM_ROOT + "/sample.svg/_jcr_content/renditions/original./sample.svg"; + String expectedMediaUrl = DAM_ROOT + "/sample.svg/_jcr_content/renditions/original.media_file.file/sample.svg"; assertEquals(expectedMediaUrl, underTest.getSrc()); assertNull(underTest.getSrcUriTemplate()); From 0a19db37833109cefd0327aa62dd4e5aafcd558b Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Tue, 16 Jan 2024 14:34:12 +0100 Subject: [PATCH 16/28] eliminate PMD warnings concerning finalize attack --- .../wcm/wcm/core/components/impl/util/CoreResourceWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/util/CoreResourceWrapper.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/util/CoreResourceWrapper.java index 76d6588..c28ebff 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/util/CoreResourceWrapper.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/util/CoreResourceWrapper.java @@ -40,7 +40,7 @@ * Additionally supports overwriting and hiding some properties. */ @Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION) -public class CoreResourceWrapper extends ResourceWrapper { +public final class CoreResourceWrapper extends ResourceWrapper { private ValueMap valueMap; private String overriddenResourceType; From 86ccddf84b6a71274fd3ebbe654fbe8949c24e02 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Tue, 16 Jan 2024 17:59:51 +0100 Subject: [PATCH 17/28] Explicitly define folder type for JSON files with "nt:unstructured" as root node to circumvent SLING-12197. --- changes.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changes.xml b/changes.xml index feb90a3..c7bfd07 100644 --- a/changes.xml +++ b/changes.xml @@ -27,6 +27,9 @@ Switch to Handler 2.x. + + Explicitly define folder type for JSON files with "nt:unstructured" as root node to circumvent SLING-12197. + From 65513f194a5ef664b3fe597bbd320cba0a638ca7 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Wed, 17 Jan 2024 12:36:38 +0100 Subject: [PATCH 18/28] eliminate code warnings with updated null annotations, add additional null checks --- .../components/commons/link/LinkWrapper.java | 6 +++++- .../components/impl/models/v2/ImageV2Impl.java | 7 ++++++- .../impl/models/v2/NavigationV2Impl.java | 5 +++-- .../components/impl/models/v3/ImageV3Impl.java | 13 +++++++++---- .../models/wcmio/v1/ResponsiveImageV1Impl.java | 4 +++- .../impl/servlets/ImageWidthProxyServlet.java | 18 +++++++++++------- .../commons/link/LinkWrapperTest.java | 3 +-- .../wcmio/v1/ResponsiveImageV1ImplTest.java | 3 +++ .../ComponentFeatureImageResolverTest.java | 5 +++++ .../core/components/testcontext/TestUtils.java | 4 +++- .../testcontext/UrlHandlerConfigImpl.java | 3 ++- 11 files changed, 51 insertions(+), 20 deletions(-) diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/commons/link/LinkWrapper.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/commons/link/LinkWrapper.java index d1cf7cf..03f7ef1 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/commons/link/LinkWrapper.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/commons/link/LinkWrapper.java @@ -79,7 +79,11 @@ public boolean isValid() { @JsonSerialize(using = LinkHtmlAttributesSerializer.class) @JsonProperty("attributes") public @NotNull Map getHtmlAttributes() { - return link.getAnchorAttributes(); + Map result = link.getAnchorAttributes(); + if (result == null) { + result = Map.of(); + } + return result; } @Override diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ImageV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ImageV2Impl.java index ec7693b..6065fbf 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ImageV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ImageV2Impl.java @@ -37,6 +37,7 @@ import io.wcm.handler.link.Link; import io.wcm.handler.media.Media; +import io.wcm.handler.media.Rendition; import io.wcm.wcm.core.components.impl.models.helpers.ImageAreaV1Impl; import io.wcm.wcm.core.components.impl.models.v3.ImageV3Impl; import io.wcm.wcm.core.components.impl.servlets.ImageWidthProxyServlet; @@ -89,7 +90,11 @@ protected List buildAreas() { */ @Override protected List buildRenditionWidths() { - long maxWidth = media.getRendition().getWidth(); + Rendition rendition = media.getRendition(); + if (rendition == null) { + return List.of(); + } + long maxWidth = rendition.getWidth(); String[] configuredWidths = currentStyle.get(PN_DESIGN_ALLOWED_RENDITION_WIDTHS, new String[0]); return Arrays.stream(configuredWidths) .map(NumberUtils::toLong) diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2Impl.java index 1c42990..918c6ef 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2Impl.java @@ -267,8 +267,9 @@ private boolean isCurrent(@NotNull Page page, @NotNull Link link) { } private boolean currentPageIsRedirectTarget(@NotNull Link link) { - return link.getTargetPage() != null - && StringUtils.equals(getCurrentPage().getPath(), link.getTargetPage().getPath()); + Page targetPage = link.getTargetPage(); + return targetPage != null + && StringUtils.equals(getCurrentPage().getPath(), targetPage.getPath()); } protected NavigationItem newNavigationItem(@NotNull Page page, @NotNull Link link, diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java index 22a1061..5ee3136 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java @@ -147,8 +147,9 @@ private void activate() { // resolve media and properties from DAM asset media = buildMedia(altFromAsset); + Rendition rendition = media.getRendition(); - if (media.isValid() && !media.getRendition().isImage()) { + if (media.isValid() && (rendition == null || !rendition.isImage())) { // no image asset selected (cannot be rendered) - set to invalid media = mediaHandler.invalid(); } @@ -213,9 +214,13 @@ private void initPropertiesFromDamAsset(ValueMap properties) { * @return Widths */ protected List buildRenditionWidths() { - double primaryRatio = media.getRendition().getRatio(); + Rendition rendition = media.getRendition(); + if (rendition == null) { + return List.of(); + } + double primaryRatio = rendition.getRatio(); return media.getRenditions().stream() - .filter(rendition -> Ratio.matches(rendition.getRatio(), primaryRatio)) + .filter(item -> Ratio.matches(item.getRatio(), primaryRatio)) .map(Rendition::getWidth) .distinct() .sorted() @@ -228,7 +233,7 @@ protected List buildRenditionWidths() { */ protected String buildSrcPattern() { Rendition rendition = media.getRendition(); - if (!rendition.isImage() || rendition.isVectorImage()) { + if (rendition == null || !rendition.isImage() || rendition.isVectorImage()) { return null; } UriTemplate uriTempalte = rendition.getUriTemplate(UriTemplateType.SCALE_WIDTH); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java index f0854be..a56c869 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java @@ -59,6 +59,7 @@ import io.wcm.handler.media.Media; import io.wcm.handler.media.MediaHandler; import io.wcm.handler.media.MediaNameConstants; +import io.wcm.handler.media.Rendition; import io.wcm.sling.commons.adapter.AdaptTo; import io.wcm.sling.models.annotations.AemObject; import io.wcm.wcm.core.components.impl.models.helpers.AbstractComponentImpl; @@ -126,8 +127,9 @@ private void activate() { .mediaHandlerProperty("data-cmp-hook-image", "image") .mediaHandlerProperty(MediaNameConstants.PROP_CSS_CLASS, "cmp-wcmio-responsiveimage__image") .buildMedia(); + Rendition rendition = media.getRendition(); - if (media.isValid() && !media.getRendition().isImage()) { + if (media.isValid() && (rendition == null || !rendition.isImage())) { // no image asset selected (cannot be rendered) - set to invalid media = mediaHandler.invalid(); } diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/servlets/ImageWidthProxyServlet.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/servlets/ImageWidthProxyServlet.java index ee8b4be..ef616da 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/servlets/ImageWidthProxyServlet.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/servlets/ImageWidthProxyServlet.java @@ -18,6 +18,7 @@ import org.apache.sling.commons.mime.MimeTypeService; import org.apache.sling.servlets.annotations.SlingServletResourceTypes; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import org.slf4j.Logger; @@ -27,6 +28,7 @@ import io.wcm.handler.media.MediaArgs; import io.wcm.handler.media.MediaBuilder; import io.wcm.handler.media.MediaHandler; +import io.wcm.handler.media.Rendition; import io.wcm.handler.media.impl.ImageFileServlet; import io.wcm.sling.commons.adapter.AdaptTo; import io.wcm.wcm.commons.contenttype.ContentType; @@ -78,15 +80,17 @@ protected void doGet(@NotNull SlingHttpServletRequest request, @NotNull SlingHtt } // if media url used ImageFileServlet forward request - if (usesImageFileServlet(media.getUrl())) { - log.debug("Forward to {}", media.getUrl()); - request.getRequestDispatcher(media.getUrl()).forward(request, response); + String url = media.getUrl(); + Rendition rendition = media.getRendition(); + if (usesImageFileServlet(url)) { + log.debug("Forward to {}", url); + request.getRequestDispatcher(url).forward(request, response); } - else { + else if (rendition != null) { // otherwise it points directly to a binary in repository, stream it directly - log.debug("Stream binary content from {}", media.getRendition().getPath()); + log.debug("Stream binary content from {}", rendition.getPath()); response.setContentType(getMimeType(request)); - Resource resource = AdaptTo.notNull(media.getRendition(), Resource.class); + Resource resource = AdaptTo.notNull(rendition, Resource.class); try (InputStream is = resource.adaptTo(InputStream.class)) { BufferedOutputStream bos = new BufferedOutputStream(response.getOutputStream()); IOUtils.copy(is, bos); @@ -113,7 +117,7 @@ private Media buildMedia(SlingHttpServletRequest request, long width) { return builder.build(); } - private boolean usesImageFileServlet(String mediaUrl) { + private boolean usesImageFileServlet(@Nullable String mediaUrl) { return StringUtils.contains(mediaUrl, "." + ImageFileServlet.SELECTOR + "."); } diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java index 6cd5d93..a5d6db8 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/commons/link/LinkWrapperTest.java @@ -66,7 +66,6 @@ void setUp() { } @Test - @SuppressWarnings("unused") void testInvalid() { LinkWrapper underTest = new LinkWrapper(linkHandler.invalid()); @@ -74,7 +73,7 @@ void testInvalid() { assertNull(underTest.getURL()); assertNull(underTest.getMappedURL()); assertNull(underTest.getExternalizedURL()); - assertNull(underTest.getHtmlAttributes()); + assertEquals(Map.of(), underTest.getHtmlAttributes()); assertNull(underTest.getReference()); assertNotNull(underTest.getLinkObject()); diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1ImplTest.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1ImplTest.java index b582615..5f61a24 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1ImplTest.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1ImplTest.java @@ -131,6 +131,7 @@ void testInvalidAssetReference() { } @Test + @SuppressWarnings("null") void testWithAssetImage() { context.currentResource(context.create().resource(page.getContentResource().getPath() + "/image", PROPERTY_RESOURCE_TYPE, RESOURCE_TYPE, @@ -289,6 +290,7 @@ void testWithNoImageAsset() { } @Test + @SuppressWarnings("null") void testDisplayPopupTitle() { context.currentResource(context.create().resource(page.getContentResource().getPath() + "/image", PROPERTY_RESOURCE_TYPE, RESOURCE_TYPE, @@ -349,6 +351,7 @@ void testUUID_Disabled() { } @Test + @SuppressWarnings("null") void testAreas() { context.currentResource(context.create().resource(page.getContentResource().getPath() + "/image", PROPERTY_RESOURCE_TYPE, RESOURCE_TYPE, diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/util/ComponentFeatureImageResolverTest.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/util/ComponentFeatureImageResolverTest.java index fa64cb8..002d028 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/util/ComponentFeatureImageResolverTest.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/util/ComponentFeatureImageResolverTest.java @@ -104,6 +104,7 @@ void testInvalidImage() { } @Test + @SuppressWarnings("null") void testComponentImage() { Resource component = context.create().resource(page1, "comp1", PROPERTY_RESOURCE_TYPE, COMPONENT_RESOURCE_TYPE, @@ -119,6 +120,7 @@ void testComponentImage() { } @Test + @SuppressWarnings("null") void testComponentImage_Decorative() { Resource component = context.create().resource(page1, "comp1", PROPERTY_RESOURCE_TYPE, COMPONENT_RESOURCE_TYPE, @@ -135,6 +137,7 @@ void testComponentImage_Decorative() { } @Test + @SuppressWarnings("null") void testComponentImage_Decorative_Policy() { context.contentPolicyMapping(COMPONENT_RESOURCE_TYPE, PN_MEDIA_IS_DECORATIVE_STANDARD, true); @@ -182,6 +185,7 @@ void testComponentImageFromPage_NoFeatureImage() { } @Test + @SuppressWarnings("null") void testComponentImageFromPage() { Resource component = context.create().resource(page1, "comp1", PROPERTY_RESOURCE_TYPE, COMPONENT_RESOURCE_TYPE, @@ -205,6 +209,7 @@ void testComponentImageFromPage() { } @Test + @SuppressWarnings("null") void testComponentImageFromPage_FallbackCurrentPage() { Resource component = context.create().resource(page1, "comp1", PROPERTY_RESOURCE_TYPE, COMPONENT_RESOURCE_TYPE, diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/TestUtils.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/TestUtils.java index 20c990a..992d8cf 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/TestUtils.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/TestUtils.java @@ -45,6 +45,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.wcm.handler.media.Rendition; import io.wcm.testing.mock.aem.junit5.AemContext; import io.wcm.wcm.core.components.models.mixin.LinkMixin; import io.wcm.wcm.core.components.models.mixin.MediaMixin; @@ -116,7 +117,8 @@ public static void assertValidMedia(Object object, String mediaUrl) { MediaMixin mediaMixin = (MediaMixin)object; assertTrue(mediaMixin.isMediaValid()); assertEquals(mediaUrl, mediaMixin.getMediaURL()); - if (mediaMixin.getMediaObject().getRendition().isImage()) { + Rendition rendition = mediaMixin.getMediaObject().getRendition(); + if (rendition != null && rendition.isImage()) { assertNotNull(mediaMixin.getMediaMarkup()); } } diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/UrlHandlerConfigImpl.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/UrlHandlerConfigImpl.java index 5f9b57c..7a682eb 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/UrlHandlerConfigImpl.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/UrlHandlerConfigImpl.java @@ -22,6 +22,7 @@ import static io.wcm.wcm.core.components.testcontext.AppAemContext.ROOT_LEVEL; import org.apache.sling.api.resource.Resource; +import org.jetbrains.annotations.Nullable; import io.wcm.handler.url.spi.UrlHandlerConfig; @@ -31,7 +32,7 @@ class UrlHandlerConfigImpl extends UrlHandlerConfig { @Override - public int getSiteRootLevel(Resource contextResource) { + public int getSiteRootLevel(@Nullable Resource contextResource) { return ROOT_LEVEL; } From 77707dca396ec0c9ef896081f6ec29d4aa0a3357 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Sat, 20 Jan 2024 10:57:12 +0100 Subject: [PATCH 19/28] generics from HtmlElement and ImageMapArea is removed --- .../impl/models/helpers/ImageAreaV1Impl.java | 4 ++-- .../impl/models/helpers/ImageAreaV2Impl.java | 15 ++++++++++++--- .../models/wcmio/v1/ResponsiveImageV1Impl.java | 6 +++--- .../components/testcontext/ImageAreaTestData.java | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV1Impl.java index 6278eee..6bb0364 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV1Impl.java @@ -33,12 +33,12 @@ /** * Implementation of {@link ImageArea}. */ -public class ImageAreaV1Impl extends ImageAreaV2Impl { +public final class ImageAreaV1Impl extends ImageAreaV2Impl { /** * @param delegate Delegate */ - public ImageAreaV1Impl(ImageMapArea delegate) { + public ImageAreaV1Impl(ImageMapArea delegate) { super(delegate); } diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV2Impl.java index 3e4beba..e263e35 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV2Impl.java @@ -38,15 +38,15 @@ */ public class ImageAreaV2Impl implements ImageArea { - private final ImageMapArea delegate; + private final ImageMapArea delegate; private final LinkWrapper link; /** * @param delegate Delegate */ - public ImageAreaV2Impl(ImageMapArea delegate) { + public ImageAreaV2Impl(ImageMapArea delegate) { this.delegate = delegate; - io.wcm.handler.link.Link delegateLink = delegate.getLink(); + io.wcm.handler.link.Link delegateLink = toLink(delegate.getLink()); if (delegateLink != null) { this.link = new LinkWrapper(delegateLink); } @@ -55,6 +55,15 @@ public ImageAreaV2Impl(ImageMapArea delegate) { } } + private io.wcm.handler.link.Link toLink(Object linkObject) { + if (linkObject instanceof io.wcm.handler.link.Link) { + return (io.wcm.handler.link.Link)linkObject; + } + else { + return null; + } + } + @Override public String getShape() { return delegate.getShape(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java index a56c869..ea8b9b5 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java @@ -175,7 +175,7 @@ private void initPropertiesFromDamAsset(ValueMap properties) { } @SuppressWarnings("unchecked") - private static void setImageTitle(HtmlElement element, String title) { + private static void setImageTitle(HtmlElement element, String title) { if (element == null) { return; } @@ -183,8 +183,8 @@ private static void setImageTitle(HtmlElement element, String title) { element.setTitle(title); } else { - List> children = (List)element.getChildren(); - for (HtmlElement child : children) { + List children = (List)element.getChildren(); + for (HtmlElement child : children) { setImageTitle(child, title); } } diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/ImageAreaTestData.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/ImageAreaTestData.java index 2728d4e..6e18b9c 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/ImageAreaTestData.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/testcontext/ImageAreaTestData.java @@ -68,7 +68,7 @@ public static List getExpectedAreasV1(AemContext context) { private static ImageArea areaV1(@NotNull String shape, @NotNull String coordinates, @Nullable String relativeCoordinates, @Nullable Link link, @NotNull String linkUrl, @Nullable String linkWindowTarget, @Nullable String altText) { - return new ImageAreaV1Impl(new ImageMapAreaImpl(shape, coordinates, relativeCoordinates, + return new ImageAreaV1Impl(new ImageMapAreaImpl(shape, coordinates, relativeCoordinates, link, linkUrl, linkWindowTarget, altText)); } From eaf68bfc5c611b97a39aa38c5fe4281fa3dfa749 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Wed, 24 Jan 2024 16:44:45 +0100 Subject: [PATCH 20/28] Image (v3): Remove support for inline image editing, as the Adobe Image V3 component has removed support for that as well. --- .../app-root/components/image/v3/image.json | 64 +------------------ changes.xml | 3 + 2 files changed, 4 insertions(+), 63 deletions(-) diff --git a/bundles/core/src/main/webapp/app-root/components/image/v3/image.json b/bundles/core/src/main/webapp/app-root/components/image/v3/image.json index e0b4576..787d3ff 100644 --- a/bundles/core/src/main/webapp/app-root/components/image/v3/image.json +++ b/bundles/core/src/main/webapp/app-root/components/image/v3/image.json @@ -8,69 +8,7 @@ "wcmio:linkTargetUrlFallbackProperty": "linkURL", "cq:editConfig": { - "jcr:primaryType": "cq:EditConfig", - "cq:inherit": true, - /* - * Overwrite inplace edit config to: - * - Disable cropping on inline toolbar as it does not support predefined ratios - * - Remove default ratios as they are fetched from assigned media formats - * - Remove image/webp support - */ - "cq:inplaceEditing": { - "jcr:primaryType": "cq:InplaceEditingConfig", - "editorType": "image", - "active": true, - "configPath": "inplaceEditingConfig", - "inplaceEditingConfig": { - "jcr:primaryType": "nt:unstructured", - "plugins": { - "crop": { - "features": "*", - "supportedMimeTypes": ["image/jpeg", "image/png", "image/tiff"] - }, - "flip": { - "features": "-", - "supportedMimeTypes": ["image/jpeg", "image/png", "image/tiff"] - }, - "map": { - "features": "*", - "supportedMimeTypes": ["image/jpeg", "image/png", "image/tiff", "image/svg+xml"] - }, - "rotate": { - "features": "*", - "supportedMimeTypes": ["image/jpeg", "image/png", "image/tiff"] - }, - "zoom": { - "features": "*", - "supportedMimeTypes": ["image/jpeg", "image/png", "image/tiff", "image/svg+xml"] - } - }, - "ui": { - "inline": { - "toolbar": ["rotate#right", "history#undo", "history#redo", "fullscreen#fullscreen", "control#close", "control#finish"], - "replacementToolbars": { - "crop": ["crop#identifier", "crop#unlaunch", "crop#confirm"] - } - }, - "fullscreen": { - "toolbar": { - "left": ["crop#launchwithratio", "rotate#right", "map#launch", "flip#horizontal", "flip#vertical", "zoom#reset100", "zoom#popupslider"], - "right": ["history#undo", "history#redo", "fullscreen#fullscreenexit"] - }, - "replacementToolbars": { - "crop": { - "left": ["crop#identifier"], - "right": ["crop#unlaunch", "crop#confirm"] - }, - "map": { - "left": ["map#rectangle", "map#circle", "map#polygon"], - "right": ["map#unlaunch", "map#confirm"] - } - } - } - } - } - } + "jcr:primaryType": "cq:EditConfig" }, "cq:dialog": { diff --git a/changes.xml b/changes.xml index c7bfd07..084ac25 100644 --- a/changes.xml +++ b/changes.xml @@ -30,6 +30,9 @@ Explicitly define folder type for JSON files with "nt:unstructured" as root node to circumvent SLING-12197. + + Image (v3): Remove support for inline image editing, as the Adobe Image V3 component has removed support for that as well. + From 1e5bed1b8d1f52e1d09f84a8724ee2f901bc9196 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Wed, 24 Jan 2024 16:51:37 +0100 Subject: [PATCH 21/28] Next Generation Dynamic Media/Polaris Remote Assets Support (#18) --- .../wcm/core/components/impl/models/v3/ImageV3Impl.java | 9 ++++++--- .../impl/models/wcmio/v1/ResponsiveImageV1Impl.java | 9 ++++++--- .../v1/responsiveimage/responsiveimage.html | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java index 5ee3136..335eafa 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/ImageV3Impl.java @@ -60,6 +60,7 @@ import io.wcm.handler.media.UriTemplate; import io.wcm.handler.media.UriTemplateType; import io.wcm.handler.media.format.Ratio; +import io.wcm.handler.mediasource.inline.InlineMediaSource; import io.wcm.handler.url.UrlHandler; import io.wcm.sling.models.annotations.AemObject; import io.wcm.wcm.core.components.commons.link.LinkWrapper; @@ -186,14 +187,16 @@ protected List buildAreas() { private void initPropertiesFromDamAsset(ValueMap properties) { Asset asset = media.getAsset(); if (asset != null) { + if (!StringUtils.equals(media.getMediaSource().getId(), InlineMediaSource.ID)) { + fileReference = asset.getPath(); + } + alt = asset.getAltText(); + com.day.cq.dam.api.Asset damAsset = asset.adaptTo(com.day.cq.dam.api.Asset.class); if (damAsset != null) { boolean titleFromAsset = properties.get(PN_TITLE_VALUE_FROM_DAM, currentStyle.get(PN_TITLE_VALUE_FROM_DAM, true)); boolean uuidDisabled = currentStyle.get(PN_UUID_DISABLED, false); - fileReference = damAsset.getPath(); - alt = asset.getAltText(); - if (!uuidDisabled) { uuid = damAsset.getID(); } diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java index ea8b9b5..1a624b2 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/wcmio/v1/ResponsiveImageV1Impl.java @@ -60,6 +60,7 @@ import io.wcm.handler.media.MediaHandler; import io.wcm.handler.media.MediaNameConstants; import io.wcm.handler.media.Rendition; +import io.wcm.handler.mediasource.inline.InlineMediaSource; import io.wcm.sling.commons.adapter.AdaptTo; import io.wcm.sling.models.annotations.AemObject; import io.wcm.wcm.core.components.impl.models.helpers.AbstractComponentImpl; @@ -152,14 +153,16 @@ private void activate() { private void initPropertiesFromDamAsset(ValueMap properties) { Asset asset = media.getAsset(); if (asset != null) { + if (!StringUtils.equals(media.getMediaSource().getId(), InlineMediaSource.ID)) { + fileReference = asset.getPath(); + } + alt = asset.getAltText(); + com.day.cq.dam.api.Asset damAsset = asset.adaptTo(com.day.cq.dam.api.Asset.class); if (damAsset != null) { boolean titleFromAsset = properties.get(PN_TITLE_VALUE_FROM_DAM, currentStyle.get(PN_TITLE_VALUE_FROM_DAM, true)); boolean uuidDisabled = currentStyle.get(PN_UUID_DISABLED, false); - fileReference = damAsset.getPath(); - alt = asset.getAltText(); - if (!uuidDisabled) { uuid = damAsset.getID(); } diff --git a/bundles/core/src/main/webapp/app-root/components/wcmio/responsiveimage/v1/responsiveimage/responsiveimage.html b/bundles/core/src/main/webapp/app-root/components/wcmio/responsiveimage/v1/responsiveimage/responsiveimage.html index 0ce440b..c9583f1 100644 --- a/bundles/core/src/main/webapp/app-root/components/wcmio/responsiveimage/v1/responsiveimage/responsiveimage.html +++ b/bundles/core/src/main/webapp/app-root/components/wcmio/responsiveimage/v1/responsiveimage/responsiveimage.html @@ -3,6 +3,7 @@ data-cmp-is="wcmio-responsiveimage" data-asset="${image.fileReference}" data-asset-id="${image.uuid}" + data-cmp-filereference="${image.fileReference}" data-title="${image.title || image.alt}" id="${image.id}" data-cmp-data-layer="${image.data.json}" From f5828b2bc36c13a6da17e38e29a988fd50daac07 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 25 Jan 2024 09:44:41 +0100 Subject: [PATCH 22/28] update to SP19 --- build-deploy_aem65.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-deploy_aem65.sh b/build-deploy_aem65.sh index 0c4f88f..c82018a 100644 --- a/build-deploy_aem65.sh +++ b/build-deploy_aem65.sh @@ -26,7 +26,7 @@ fi # install AEM 6.5 with service pack mvn --non-recursive wcmio-content-package:install \ --activate-profiles=${MAVEN_PROFILES} \ - -Dvault.artifact=adobe.binary.aem.65.servicepack:aem-service-pkg:zip:6.5.18.0 \ + -Dvault.artifact=adobe.binary.aem.65.servicepack:aem-service-pkg:zip:6.5.19.0 \ -Dvault.delayAfterInstallSec=30 if [ "$?" -ne "0" ]; then From 4698c378b61044c6f279c04bce80b68357bb5063 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 25 Jan 2024 12:16:52 +0100 Subject: [PATCH 23/28] Eliminate SonarQube warnings --- .../components/impl/models/helpers/AbstractComponentImpl.java | 1 + .../impl/models/helpers/LanguageNavigationItemV1Impl.java | 2 ++ .../impl/models/helpers/LanguageNavigationItemV2Impl.java | 2 ++ .../components/impl/models/helpers/LinkListItemV1Impl.java | 4 ++-- .../components/impl/models/helpers/LinkListItemV2Impl.java | 2 +- .../components/impl/models/helpers/NavigationItemV1Impl.java | 4 +++- .../components/impl/models/helpers/NavigationItemV2Impl.java | 4 +++- .../components/impl/models/helpers/PageListItemV1Impl.java | 3 ++- .../components/impl/models/helpers/PageListItemV4Impl.java | 2 +- .../wcm/wcm/core/components/impl/models/v1/ButtonV1Impl.java | 4 ++-- .../core/components/impl/models/v1/LayoutContainerV1Impl.java | 2 +- .../wcm/wcm/core/components/impl/models/v1/TeaserV1Impl.java | 2 +- .../core/components/impl/models/v2/BreadcrumbV2ItemImpl.java | 1 + .../wcm/wcm/core/components/impl/models/v2/ButtonV2Impl.java | 2 +- .../wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java | 3 ++- .../wcm/wcm/core/components/impl/models/v2/TitleV2Impl.java | 2 +- .../core/components/impl/models/v3/BreadcrumbV3ItemImpl.java | 1 + .../wcm/wcm/core/components/impl/models/v3/TitleV3Impl.java | 2 +- .../core/components/impl/models/v1/NavigationV1ImplTest.java | 1 + .../core/components/impl/models/v2/NavigationV2ImplTest.java | 1 + 20 files changed, 30 insertions(+), 15 deletions(-) diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/AbstractComponentImpl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/AbstractComponentImpl.java index fee23ec..74357bf 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/AbstractComponentImpl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/AbstractComponentImpl.java @@ -29,6 +29,7 @@ /** * Abstract class that can be used as a base class for {@link Component} implementations. */ +@SuppressWarnings("java:S2176") // accept duplicate class name public abstract class AbstractComponentImpl extends com.adobe.cq.wcm.core.components.util.AbstractComponentImpl implements ComponentExporter { @Override diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV1Impl.java index 75133b0..d1d975e 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV1Impl.java @@ -37,6 +37,7 @@ /** * {@link LanguageNavigationItem} implementation. */ +@SuppressWarnings("java:S110") // class hierarchy levels public class LanguageNavigationItemV1Impl extends NavigationItemV1Impl implements LanguageNavigationItem { private final Page page; @@ -56,6 +57,7 @@ public class LanguageNavigationItemV1Impl extends NavigationItemV1Impl implement * @param parentId Parent ID * @param parentComponent The component that contains this list item */ + @SuppressWarnings("java:S107") // number of parameters public LanguageNavigationItemV1Impl(@NotNull Page page, @NotNull Link link, int level, boolean active, boolean current, @NotNull List children, @Nullable String title, @Nullable String parentId, @Nullable Component parentComponent) { diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV2Impl.java index 05b2a8b..729522f 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV2Impl.java @@ -37,6 +37,7 @@ /** * {@link LanguageNavigationItem} implementation. */ +@SuppressWarnings("java:S110") // class hierarchy levels public class LanguageNavigationItemV2Impl extends NavigationItemV2Impl implements LanguageNavigationItem { private final Page page; @@ -56,6 +57,7 @@ public class LanguageNavigationItemV2Impl extends NavigationItemV2Impl implement * @param parentId Parent ID * @param parentComponent The component that contains this list item */ + @SuppressWarnings("java:S107") // number of parameters public LanguageNavigationItemV2Impl(@NotNull Page page, @NotNull Link link, int level, boolean active, boolean current, @NotNull List children, @Nullable String title, @Nullable String parentId, @Nullable Component parentComponent) { diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV1Impl.java index 25c74af..9d958e5 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV1Impl.java @@ -58,7 +58,7 @@ public LinkListItemV1Impl(@NotNull String title, @NotNull LinkWrapper link, @Not /** * @deprecated Deprecated in API */ - @Deprecated + @Deprecated(forRemoval = true) @Override @JsonIgnore public com.adobe.cq.wcm.core.components.commons.link.Link getLink() { @@ -70,7 +70,7 @@ public com.adobe.cq.wcm.core.components.commons.link.Link getLink() { * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore(false) public String getURL() { return super.getURL(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java index 4c5ede1..1032df7 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java @@ -75,7 +75,7 @@ public LinkListItemV2Impl(@NotNull String title, @NotNull LinkWrapper link, @Not * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore public String getURL() { return link.getURL(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV1Impl.java index 46be7ac..6940d4a 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV1Impl.java @@ -34,6 +34,7 @@ /** * {@link NavigationItem} implementation. */ +@SuppressWarnings("java:S110") // class hierarchy levels public class NavigationItemV1Impl extends PageListItemV1Impl implements NavigationItem { private final Page page; @@ -52,6 +53,7 @@ public class NavigationItemV1Impl extends PageListItemV1Impl implements Navigati * @param parentId Parent ID * @param parentComponent The component that contains this list item */ + @SuppressWarnings("java:S107") // number of parameters public NavigationItemV1Impl(@NotNull Page page, @NotNull Link link, int level, boolean active, boolean current, @NotNull List children, @Nullable String parentId, @Nullable Component parentComponent) { @@ -67,7 +69,7 @@ public NavigationItemV1Impl(@NotNull Page page, @NotNull Link link, * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore public Page getPage() { return page; diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV2Impl.java index f4893bc..fbb2c81 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/NavigationItemV2Impl.java @@ -34,6 +34,7 @@ /** * {@link NavigationItem} implementation. */ +@SuppressWarnings("java:S110") // class hierarchy levels public class NavigationItemV2Impl extends PageListItemV2Impl implements NavigationItem { private final Page page; @@ -52,6 +53,7 @@ public class NavigationItemV2Impl extends PageListItemV2Impl implements Navigati * @param parentId Parent ID * @param parentComponent The component that contains this list item */ + @SuppressWarnings("java:S107") // number of parameters public NavigationItemV2Impl(@NotNull Page page, @NotNull Link link, int level, boolean active, boolean current, @NotNull List children, @Nullable String parentId, @Nullable Component parentComponent) { @@ -67,7 +69,7 @@ public NavigationItemV2Impl(@NotNull Page page, @NotNull Link link, * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore public Page getPage() { return page; diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV1Impl.java index 4d5a442..71c937a 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV1Impl.java @@ -33,6 +33,7 @@ /** * {@link ListItem} implementation for page links. */ +@SuppressWarnings("java:S110") // class hierarchy levels public class PageListItemV1Impl extends PageListItemV2Impl implements LinkMixin { /** @@ -63,7 +64,7 @@ public PageListItemV1Impl(@NotNull Page page, @NotNull Link link, * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore(false) public String getURL() { return super.getURL(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV4Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV4Impl.java index 5d0fd5b..e0f5963 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV4Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV4Impl.java @@ -106,7 +106,7 @@ public PageListItemV4Impl(@NotNull Page page, @NotNull Link link, * @deprecated Deprecated in API */ @Override - @Deprecated(since = "1.9.0-2.17.2") + @Deprecated(forRemoval = true, since = "1.9.0-2.17.2") @JsonIgnore public String getURL() { return link.getURL(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/ButtonV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/ButtonV1Impl.java index c4e84c9..627b1b1 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/ButtonV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/ButtonV1Impl.java @@ -58,7 +58,7 @@ public class ButtonV1Impl extends ButtonV2Impl implements LinkMixin { /** * @deprecated Deprecated in API */ - @Deprecated + @Deprecated(forRemoval = true) @Override @JsonIgnore public com.adobe.cq.wcm.core.components.commons.link.Link getButtonLink() { @@ -70,7 +70,7 @@ public com.adobe.cq.wcm.core.components.commons.link.Link getButtonLink() { * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore(false) public String getLink() { return super.getLink(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/LayoutContainerV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/LayoutContainerV1Impl.java index b6a33bb..a0cca29 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/LayoutContainerV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/LayoutContainerV1Impl.java @@ -74,7 +74,7 @@ public class LayoutContainerV1Impl extends AbstractContainerImpl implements Layo */ @Override @JsonIgnore - @Deprecated(since = "1.13.0-2.22.6") + @Deprecated(forRemoval = true, since = "1.13.0-2.22.6") public @NotNull List getItems() { return delegate.getItems(); } diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/TeaserV1Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/TeaserV1Impl.java index 7afbd93..48cf5da 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/TeaserV1Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/TeaserV1Impl.java @@ -70,7 +70,7 @@ public com.adobe.cq.wcm.core.components.commons.link.Link getLink() { * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore(false) @JsonProperty("linkURL") public String getLinkURL() { diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/BreadcrumbV2ItemImpl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/BreadcrumbV2ItemImpl.java index 215d87b..4b0a1ce 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/BreadcrumbV2ItemImpl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/BreadcrumbV2ItemImpl.java @@ -40,6 +40,7 @@ @JsonIgnoreProperties({ "page", "children", "level", "description", "lastModified", PROPERTY_PATH }) +@SuppressWarnings("java:S110") // class hierarchy levels public class BreadcrumbV2ItemImpl extends NavigationItemV1Impl implements NavigationItem { /** diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ButtonV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ButtonV2Impl.java index 865a3e5..408335a 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ButtonV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/ButtonV2Impl.java @@ -93,7 +93,7 @@ public Link getButtonLink() { * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore public String getLink() { return link.getURL(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java index 8e967d6..e605f20 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java @@ -104,6 +104,7 @@ public class TeaserV2Impl extends AbstractComponentImpl implements Teaser, Media private boolean titleLinkHidden; @PostConstruct + @SuppressWarnings({ "java:S3776", "java:S6541" }) // ignore complexity private void activate() { ValueMap properties = resource.getValueMap(); @@ -215,7 +216,7 @@ public Link getLink() { * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore public String getLinkURL() { return link.getURL(); diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TitleV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TitleV2Impl.java index c701d86..2376b06 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TitleV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TitleV2Impl.java @@ -67,7 +67,7 @@ public com.adobe.cq.wcm.core.components.commons.link.Link getLink() { * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore(false) @JsonProperty("linkURL") public String getLinkURL() { diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/BreadcrumbV3ItemImpl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/BreadcrumbV3ItemImpl.java index eb4ff35..eaa99f9 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/BreadcrumbV3ItemImpl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/BreadcrumbV3ItemImpl.java @@ -40,6 +40,7 @@ @JsonIgnoreProperties({ "page", "children", "level", "description", "lastModified", PROPERTY_PATH }) +@SuppressWarnings("java:S110") // class hierarchy levels public class BreadcrumbV3ItemImpl extends NavigationItemV2Impl implements NavigationItem { /** diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/TitleV3Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/TitleV3Impl.java index 527f6cc..b4164a7 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/TitleV3Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v3/TitleV3Impl.java @@ -84,7 +84,7 @@ private void activate() { * @deprecated Deprecated in API */ @Override - @Deprecated + @Deprecated(forRemoval = true) @JsonIgnore public String getLinkURL() { return link.getURL(); diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v1/NavigationV1ImplTest.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v1/NavigationV1ImplTest.java index bfe0b56..4ac4919 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v1/NavigationV1ImplTest.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v1/NavigationV1ImplTest.java @@ -54,6 +54,7 @@ import io.wcm.wcm.core.components.testcontext.AppAemContext; @ExtendWith(AemContextExtension.class) +@SuppressWarnings("java:S5976") // similar tests class NavigationV1ImplTest { private final AemContext context = AppAemContext.newAemContext(); diff --git a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2ImplTest.java b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2ImplTest.java index 1a57a3a..1a82b90 100644 --- a/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2ImplTest.java +++ b/bundles/core/src/test/java/io/wcm/wcm/core/components/impl/models/v2/NavigationV2ImplTest.java @@ -54,6 +54,7 @@ import io.wcm.wcm.core.components.testcontext.AppAemContext; @ExtendWith(AemContextExtension.class) +@SuppressWarnings("java:S5976") // similar tests class NavigationV2ImplTest { private final AemContext context = AppAemContext.newAemContext(); From a28b12d5eeaaf0735eee35df52ee09447eab3a4f Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 25 Jan 2024 12:24:20 +0100 Subject: [PATCH 24/28] use link::getURL instead of deprecated this::getURL --- .../core/components/impl/models/helpers/LinkListItemV2Impl.java | 2 +- .../io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java index 1032df7..a15ce4a 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java @@ -97,7 +97,7 @@ protected String getItemIdPrefix() { protected @NotNull PageData getComponentData() { return DataLayerBuilder.extending(super.getComponentData()).asPage() .withTitle(this::getTitle) - .withLinkUrl(this::getURL) + .withLinkUrl(link::getURL) .build(); } diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java index e605f20..31f78c1 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v2/TeaserV2Impl.java @@ -262,7 +262,7 @@ public String getTitleType() { protected @NotNull ComponentData getComponentData() { return DataLayerBuilder.extending(super.getComponentData()).asComponent() .withTitle(this::getTitle) - .withLinkUrl(this::getLinkURL) + .withLinkUrl(link::getURL) .withDescription(this::getDescription) .build(); } From 64c4a8febc67cbb4cb1ed1c37b167180c35d5c01 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Fri, 26 Jan 2024 12:09:34 +0100 Subject: [PATCH 25/28] update parent dependency --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 1865009..9cc13ac 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,7 +25,7 @@ io.wcm io.wcm.parent_toplevel - 2.3.0-SNAPSHOT + 2.3.0 From d6c59e85f9d96eea7ca4c3639da77187ea0b4532 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Fri, 26 Jan 2024 19:04:38 +0100 Subject: [PATCH 26/28] update dependencies --- changes.xml | 6 +++--- examples/content-packages/examples-libs/pom.xml | 4 ++-- parent/pom.xml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/changes.xml b/changes.xml index 084ac25..2fc89f0 100644 --- a/changes.xml +++ b/changes.xml @@ -24,9 +24,9 @@ - - Switch to Handler 2.x. - + Migrate from wcm.io Handler 1.x to 2.x for details. + ]]> Explicitly define folder type for JSON files with "nt:unstructured" as root node to circumvent SLING-12197. diff --git a/examples/content-packages/examples-libs/pom.xml b/examples/content-packages/examples-libs/pom.xml index 0ae6b47..5d0eef0 100644 --- a/examples/content-packages/examples-libs/pom.xml +++ b/examples/content-packages/examples-libs/pom.xml @@ -158,7 +158,7 @@ io.wcm io.wcm.handler.commons - 2.0.0-SNAPSHOT + 2.0.0 io.wcm @@ -188,7 +188,7 @@ io.wcm io.wcm.wcm.ui.granite - 1.10.0 + 1.10.2 diff --git a/parent/pom.xml b/parent/pom.xml index 9cc13ac..488dfe5 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -115,7 +115,7 @@ io.wcm io.wcm.handler.commons - 2.0.0-SNAPSHOT + 2.0.0 io.wcm @@ -152,7 +152,7 @@ io.wcm io.wcm.testing.aem-mock.junit5 - 5.4.4 + 5.5.0 org.apache.sling From 694e54fc580ef3eca6ce8aa9735354b85d90757d Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Fri, 26 Jan 2024 21:07:18 +0100 Subject: [PATCH 27/28] prepare release --- changes.xml | 2 +- examples/content-packages/examples-libs/pom.xml | 8 ++++---- parent/pom.xml | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/changes.xml b/changes.xml index 2fc89f0..5c1f052 100644 --- a/changes.xml +++ b/changes.xml @@ -23,7 +23,7 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd"> - + Migrate from wcm.io Handler 1.x to 2.x for details. ]]> diff --git a/examples/content-packages/examples-libs/pom.xml b/examples/content-packages/examples-libs/pom.xml index 5d0eef0..bf4a18e 100644 --- a/examples/content-packages/examples-libs/pom.xml +++ b/examples/content-packages/examples-libs/pom.xml @@ -163,22 +163,22 @@ io.wcm io.wcm.handler.url - 2.0.0-SNAPSHOT + 2.0.0 io.wcm io.wcm.handler.link - 2.0.0-SNAPSHOT + 2.0.0 io.wcm io.wcm.handler.media - 2.0.0-SNAPSHOT + 2.0.0 io.wcm io.wcm.handler.richtext - 2.0.0-SNAPSHOT + 2.0.0 io.wcm diff --git a/parent/pom.xml b/parent/pom.xml index 488dfe5..7f181f5 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -120,22 +120,22 @@ io.wcm io.wcm.handler.url - 2.0.0-SNAPSHOT + 2.0.0 io.wcm io.wcm.handler.link - 2.0.0-SNAPSHOT + 2.0.0 io.wcm io.wcm.handler.media - 2.0.0-SNAPSHOT + 2.0.0 io.wcm io.wcm.handler.richtext - 2.0.0-SNAPSHOT + 2.0.0 io.wcm @@ -187,7 +187,7 @@ io.wcm io.wcm.testing.wcm-io-mock.handler - 2.0.0-SNAPSHOT + 2.0.0 From 07cb2ea17fce4ff7a3708c4025d29507134a0eaf Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Fri, 26 Jan 2024 21:12:11 +0100 Subject: [PATCH 28/28] [gitflow-maven-plugin] Update versions for release 2.0.0-2.23.2 --- bundles/core/pom.xml | 4 ++-- examples/bundles/examples-core/pom.xml | 6 +++--- examples/content-packages/examples-libs/pom.xml | 6 +++--- examples/content-packages/examples-sample-content/pom.xml | 4 ++-- examples/content-packages/examples/pom.xml | 6 +++--- examples/pom.xml | 4 ++-- parent/pom.xml | 4 ++-- pom.xml | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bundles/core/pom.xml b/bundles/core/pom.xml index f6cd7a4..36d889c 100644 --- a/bundles/core/pom.xml +++ b/bundles/core/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 ../../parent/pom.xml io.wcm io.wcm.wcm.core.components - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 jar WCM Core Components diff --git a/examples/bundles/examples-core/pom.xml b/examples/bundles/examples-core/pom.xml index 25c28e8..dc38ce5 100644 --- a/examples/bundles/examples-core/pom.xml +++ b/examples/bundles/examples-core/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-core - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 jar WCM Core Components Examples Core @@ -44,7 +44,7 @@ io.wcm io.wcm.wcm.core.components - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 compile diff --git a/examples/content-packages/examples-libs/pom.xml b/examples/content-packages/examples-libs/pom.xml index bf4a18e..591e6f4 100644 --- a/examples/content-packages/examples-libs/pom.xml +++ b/examples/content-packages/examples-libs/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-libs - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 content-package WCM Core Components Examples wcm.io Libraries @@ -42,7 +42,7 @@ io.wcm io.wcm.wcm.core.components - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 compile diff --git a/examples/content-packages/examples-sample-content/pom.xml b/examples/content-packages/examples-sample-content/pom.xml index 7e76593..71deadd 100644 --- a/examples/content-packages/examples-sample-content/pom.xml +++ b/examples/content-packages/examples-sample-content/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples-sample-content - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 content-package WCM Core Components Examples Content diff --git a/examples/content-packages/examples/pom.xml b/examples/content-packages/examples/pom.xml index a9bfedf..352c963 100644 --- a/examples/content-packages/examples/pom.xml +++ b/examples/content-packages/examples/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 ../../../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 content-package WCM Core Components Examples @@ -42,7 +42,7 @@ io.wcm.samples io.wcm.wcm.core.components.examples-core - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 compile diff --git a/examples/pom.xml b/examples/pom.xml index 483fc9a..6c77a40 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 ../parent/pom.xml io.wcm.samples io.wcm.wcm.core.components.examples.root - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 pom diff --git a/parent/pom.xml b/parent/pom.xml index 7f181f5..e86998c 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -31,7 +31,7 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 pom WCM Core Components @@ -54,7 +54,7 @@ http://localhost:4503 - 2023-12-19T13:04:38Z + 2024-01-26T20:12:08Z diff --git a/pom.xml b/pom.xml index 4263e38..e88db5e 100644 --- a/pom.xml +++ b/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.wcm.core.components.parent - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 parent/pom.xml io.wcm io.wcm.wcm.core.components.root - 2.0.0-2.23.2-SNAPSHOT + 2.0.0-2.23.2 pom ${site.url}/${site.url.module.prefix}/