Skip to content

Commit e706a7f

Browse files
committed
Merge branch 'develop'
2 parents c66dbff + bc04698 commit e706a7f

29 files changed

+655
-42
lines changed

.github/workflows/maven-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
java: [17, 21]
18+
java: [17, 21, 25]
1919
os: [ubuntu-latest]
2020
distribution: [temurin]
2121

.github/workflows/maven-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/setup-java@v5
2929
with:
3030
distribution: temurin
31-
java-version: 17
31+
java-version: 21
3232
cache: maven
3333

3434
- name: Build, verify, deploy, generate site

changes.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
xsi:schemaLocation="http://maven.apache.org/changes/2.0.0 https://maven.apache.org/xsd/changes-2.0.0.xsd">
2525
<body>
2626

27+
<release version="2.6.0" date="2025-11-24">
28+
<action type="update" dev="sseifert" issue="123"><![CDATA[
29+
Dynamic Media: Do not use Dynamic Media to generate download URLs, unless explicitly enabled via OSGi configuration (backward-compatibility mode).
30+
Latest setups of Dynamic Media do not support downloading original binaries of images, thus Dynamic Media is only used for rendering image renditions and no longer for any downloads.<br/>
31+
<b>Breaking change:</b> With Dynamic Media, downloads are now served via AEM DAM by default. Your can restore the previous behavior by setting <code>enableDownloads</code> to true via "wcm.io Media Handler Dynamic Media Support" OSGi configuration.
32+
]]></action>
33+
</release>
34+
2735
<release version="2.5.4" date="2025-10-16">
2836
<action type="fix" dev="sseifert" issue="111">
2937
Dynamic Media with Open API: Display thumbnail of selected remote asset on load.

pom.xml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<parent>
2626
<groupId>io.wcm</groupId>
2727
<artifactId>io.wcm.parent_toplevel</artifactId>
28-
<version>2.6.0</version>
28+
<version>2.6.2</version>
2929
<relativePath/>
3030
</parent>
3131

3232
<groupId>io.wcm</groupId>
3333
<artifactId>io.wcm.handler.media</artifactId>
34-
<version>2.5.4</version>
34+
<version>2.6.0</version>
3535
<packaging>jar</packaging>
3636

3737
<name>Media Handler</name>
@@ -49,7 +49,7 @@
4949
<site.url.module.prefix>handler/media</site.url.module.prefix>
5050

5151
<!-- Enable reproducible builds -->
52-
<project.build.outputTimestamp>2025-10-16T12:10:54Z</project.build.outputTimestamp>
52+
<project.build.outputTimestamp>2025-11-24T11:27:58Z</project.build.outputTimestamp>
5353
</properties>
5454

5555
<dependencies>
@@ -107,7 +107,7 @@
107107
<dependency>
108108
<groupId>com.github.ben-manes.caffeine</groupId>
109109
<artifactId>caffeine</artifactId>
110-
<version>3.2.2</version>
110+
<version>3.2.3</version>
111111
<scope>compile</scope>
112112
</dependency>
113113

@@ -139,7 +139,7 @@
139139
<dependency>
140140
<groupId>io.wcm</groupId>
141141
<artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
142-
<version>5.6.10</version>
142+
<version>5.6.12</version>
143143
<scope>test</scope>
144144
</dependency>
145145
<dependency>
@@ -199,13 +199,13 @@
199199
<dependency>
200200
<groupId>com.jayway.jsonpath</groupId>
201201
<artifactId>json-path</artifactId>
202-
<version>2.9.0</version>
202+
<version>2.10.0</version>
203203
<scope>test</scope>
204204
</dependency>
205205
<dependency>
206206
<groupId>com.jayway.jsonpath</groupId>
207207
<artifactId>json-path-assert</artifactId>
208-
<version>2.9.0</version>
208+
<version>2.10.0</version>
209209
<scope>test</scope>
210210
</dependency>
211211
<dependency>
@@ -358,24 +358,6 @@
358358
</plugin>
359359

360360
</plugins>
361-
<pluginManagement>
362-
363-
<!-- Disable parallel unit tests for all environment -->
364-
<plugins>
365-
<plugin>
366-
<groupId>org.apache.maven.plugins</groupId>
367-
<artifactId>maven-surefire-plugin</artifactId>
368-
<configuration>
369-
<properties>
370-
<configurationParameters>
371-
junit.jupiter.execution.parallel.enabled = false
372-
</configurationParameters>
373-
</properties>
374-
</configuration>
375-
</plugin>
376-
</plugins>
377-
378-
</pluginManagement>
379361
</build>
380362

381363
<reporting>

src/main/java/io/wcm/handler/media/Asset.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,21 @@
3838
public interface Asset extends Adaptable {
3939

4040
/**
41+
* Get title of media item.
4142
* @return Title of media item
4243
*/
4344
@Nullable
4445
String getTitle();
4546

4647
/**
48+
* Get alternative text for media item.
4749
* @return Alternative text for media item
4850
*/
4951
@Nullable
5052
String getAltText();
5153

5254
/**
55+
* Get description for this media item.
5356
* @return Description for this media item
5457
*/
5558
@Nullable
@@ -63,6 +66,7 @@ public interface Asset extends Adaptable {
6366
String getPath();
6467

6568
/**
69+
* Get properties of media item.
6670
* @return Properties of media item
6771
*/
6872
@NotNull

src/main/java/io/wcm/handler/media/CropDimension.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public final class CropDimension extends Dimension {
4242
private final boolean autoCrop;
4343

4444
/**
45+
* Create crop dimension.
4546
* @param left Left in pixels
4647
* @param top Top in pixels
4748
* @param width Width in pixels
@@ -52,6 +53,7 @@ public CropDimension(long left, long top, long width, long height) {
5253
}
5354

5455
/**
56+
* Create crop dimension with auto-crop flag.
5557
* @param left Left in pixels
5658
* @param top Top in pixels
5759
* @param width Width in pixels
@@ -66,34 +68,39 @@ public CropDimension(long left, long top, long width, long height, boolean autoC
6668
}
6769

6870
/**
71+
* Get left coordinate in pixels.
6972
* @return Left in pixels
7073
*/
7174
public long getLeft() {
7275
return this.left;
7376
}
7477

7578
/**
79+
* Get top coordinate in pixels.
7680
* @return Top in pixels
7781
*/
7882
public long getTop() {
7983
return this.top;
8084
}
8185

8286
/**
87+
* Get right coordinate in pixels.
8388
* @return Right in pixels
8489
*/
8590
public long getRight() {
8691
return getLeft() + getWidth();
8792
}
8893

8994
/**
95+
* Get bottom coordinate in pixels.
9096
* @return Bottom in pixels
9197
*/
9298
public long getBottom() {
9399
return getTop() + getHeight();
94100
}
95101

96102
/**
103+
* Check if dimension is marked as auto-cropped.
97104
* @return true if is dimenions is marked as auto-cropped
98105
*/
99106
public boolean isAutoCrop() {
@@ -121,20 +128,23 @@ public String toString() {
121128
}
122129

123130
/**
131+
* Get crop string with coordinates.
124132
* @return Crop string with left,top,right,bottom.
125133
*/
126134
public @NotNull String getCropString() {
127135
return getLeft() + "," + getTop() + "," + getRight() + "," + getBottom();
128136
}
129137

130138
/**
139+
* Get crop string with dimensions.
131140
* @return Crop string with left,top,width,height.
132141
*/
133142
public @NotNull String getCropStringWidthHeight() {
134143
return getLeft() + "," + getTop() + "," + getWidth() + "," + getHeight();
135144
}
136145

137146
/**
147+
* Get rectangle representation of crop dimension.
138148
* @return Rectangle
139149
*/
140150
public @NotNull Rectangle2D getRectangle() {

src/main/java/io/wcm/handler/media/Dimension.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class Dimension {
3636
private final long height;
3737

3838
/**
39+
* Create dimension with width and height.
3940
* @param width Width in pixels
4041
* @param height Height in pixels
4142
*/
@@ -45,13 +46,15 @@ public Dimension(long width, long height) {
4546
}
4647

4748
/**
49+
* Get width in pixels.
4850
* @return Width in pixels
4951
*/
5052
public final long getWidth() {
5153
return this.width;
5254
}
5355

5456
/**
57+
* Get height in pixels.
5558
* @return Height in pixels
5659
*/
5760
public final long getHeight() {

0 commit comments

Comments
 (0)