Skip to content

Commit 32248aa

Browse files
authored
Merge pull request #500 from exadel-inc/release-2.4.1
[Tech] Merged release-2.4.1 branch to master
2 parents f3bf1fd + ebf5611 commit 32248aa

File tree

185 files changed

+2399
-779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+2399
-779
lines changed

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: "CLA Assistant"
13-
if: (github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
13+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
1414
# Alpha Release
1515
uses: cla-assistant/github-action@v2.1.3-beta
1616
env:

all/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.exadel.etoolbox</groupId>
99
<artifactId>etoolbox-authoring-kit</artifactId>
10-
<version>2.4.0</version>
10+
<version>2.4.1</version>
1111
</parent>
1212

1313
<artifactId>etoolbox-authoring-kit-all</artifactId>

core/pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.exadel.etoolbox</groupId>
99
<artifactId>etoolbox-authoring-kit</artifactId>
10-
<version>2.4.0</version>
10+
<version>2.4.1</version>
1111
</parent>
1212

1313
<artifactId>etoolbox-authoring-kit-core</artifactId>
@@ -118,6 +118,10 @@
118118
<groupId>com.google.guava</groupId>
119119
<artifactId>guava</artifactId>
120120
</dependency>
121+
<dependency>
122+
<groupId>io.wcm</groupId>
123+
<artifactId>io.wcm.testing.aem-mock.core</artifactId>
124+
</dependency>
121125
<dependency>
122126
<groupId>io.wcm</groupId>
123127
<artifactId>io.wcm.testing.aem-mock.junit4</artifactId>
@@ -142,6 +146,14 @@
142146
<groupId>junit</groupId>
143147
<artifactId>junit</artifactId>
144148
</dependency>
149+
<dependency>
150+
<groupId>org.apache.commons</groupId>
151+
<artifactId>commons-collections4</artifactId>
152+
</dependency>
153+
<dependency>
154+
<groupId>org.apache.commons</groupId>
155+
<artifactId>commons-lang3</artifactId>
156+
</dependency>
145157
<dependency>
146158
<groupId>org.apache.sling</groupId>
147159
<artifactId>org.apache.sling.api</artifactId>

core/src/main/java/com/exadel/aem/toolkit/api/annotations/injectors/I18N.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* particular internationalized string. Internationalization depends on the detection of the locale.
3333
* <p>By default, the locale is detected through the property of the current resource page. To override this, one can
3434
* either provide a particular locale value, a locale detector (a routine that guesses on the locale by, e.g., the
35-
* request path), or fall back to the standard mechanism which guesses on a locale by the preferences of the current
35+
* request path) or fall back to the standard mechanism which guesses on a locale by the preferences of the current
3636
* user.
3737
* <p>The preferred adaptable object for this injector in an AEM environment is {@code SlingHttpServletRequest}. If
3838
* adaptation is done from a {@code Resource}, the result depends on whether a proper Sling resource bundle exists for

core/src/main/java/com/exadel/aem/toolkit/api/annotations/main/DesignDialog.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@
4545
String title() default "";
4646

4747
/**
48-
* Renders as the `height` attribute of component's {@code cq:design_dialog} node. If no value provided,
49-
* default {@code 480} is used
48+
* Renders as the `height` attribute of component's {@code cq:design_dialog} node
5049
* @return Double-typed number
5150
*/
51+
@PropertyRendering(ignoreValues = "0.0")
5252
@ValueRestriction(ValueRestrictions.POSITIVE)
53-
double height() default 480;
53+
double height() default 0;
5454

5555
/**
56-
* Renders as the `width` attribute of component's {@code cq:design_dialog} node. If no value provided,
57-
* default {@code 560} is used
56+
* Renders as the `width` attribute of component's {@code cq:design_dialog} node
5857
* @return Double-typed number
5958
*/
59+
@PropertyRendering(ignoreValues = "0.0")
6060
@ValueRestriction(ValueRestrictions.POSITIVE)
61-
double width() default 560;
61+
double width() default 0;
6262

6363
/**
6464
* When set to true, forces the entire dialog to ignore freshness of the Granite UI form beside the dialog. This will

core/src/main/java/com/exadel/aem/toolkit/api/annotations/main/Dialog.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,26 @@
140140
String helpPath() default "";
141141

142142
/**
143-
* Renders as the {@code height} attribute of component's {@code cq:dialog} node. If no value provided,
144-
* default {@code 480} is used
143+
* Renders as the {@code height} attribute of component's {@code cq:dialog} node
145144
* @return Double-typed number
146145
*/
147-
@PropertyRendering(scope = Scopes.CQ_DIALOG)
146+
@PropertyRendering(
147+
scope = Scopes.CQ_DIALOG,
148+
ignoreValues = "0.0"
149+
)
148150
@ValueRestriction(ValueRestrictions.POSITIVE)
149-
double height() default 480;
151+
double height() default 0;
150152

151153
/**
152-
* Renders as the {@code width} attribute of component's {@code cq:dialog} node. If no value provided,
153-
* default {@code 560} is used
154+
* Renders as the {@code width} attribute of component's {@code cq:dialog} node
154155
* @return Double-typed number
155156
*/
156-
@PropertyRendering(scope = Scopes.CQ_DIALOG)
157+
@PropertyRendering(
158+
scope = Scopes.CQ_DIALOG,
159+
ignoreValues = "0.0"
160+
)
157161
@ValueRestriction(ValueRestrictions.POSITIVE)
158-
double width() default 560;
162+
double width() default 0;
159163

160164
/**
161165
* When set to true, renders as the {@code disableTargeting} attribute of the component root node with its value

core/src/main/java/com/exadel/aem/toolkit/api/annotations/meta/StringTransformation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
import java.util.function.UnaryOperator;
1717

18-
import org.apache.commons.lang.WordUtils;
1918
import org.apache.commons.lang3.StringUtils;
19+
import org.apache.commons.lang3.text.WordUtils;
2020
import com.google.common.base.CaseFormat;
2121

2222
/**
@@ -28,7 +28,7 @@ public enum StringTransformation {
2828
UPPERCASE(String::toUpperCase),
2929
LOWERCASE(String::toLowerCase),
3030
CAMELCASE(string -> CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, string.toLowerCase())),
31-
CAPITALIZE(string -> WordUtils.capitalizeFully(string, new char[] {' ', '-'}));
31+
CAPITALIZE(string -> WordUtils.capitalizeFully(string, ' ', '-'));
3232

3333
private final UnaryOperator<String> transformation;
3434

core/src/main/java/com/exadel/aem/toolkit/api/annotations/widgets/NumberField.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/**
3939
* When set to a non-blank string, maps to the {@code value} attribute of this Granite UI component's node.
4040
* Used to define a default value for a NumberField
41-
* @return String value, castable to a number
41+
* @return String value that can be cast to a number
4242
*/
4343
@ValueRestriction(ValueRestrictions.NUMBER)
4444
String value() default "0";

core/src/main/java/com/exadel/aem/toolkit/api/handlers/EmbeddedMemberSource.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
public interface EmbeddedMemberSource extends MemberSource {
1919
/**
2020
* Retrieves an optional {@code Member} reference pointing to a member of a foreign Java class that triggered
21-
* rendering of the class that contains the current member. This is useful for rendering containers such as {@code
22-
* FieldSet}s.
21+
* rendering of the class that contains the current member. This is useful for rendering containers such as
22+
* {@code FieldSet}s.
2323
* <p><i>Ex.: Class named "{@code Foo}" contains the field {@code private FooFieldset fooFieldset;}. Class named
24-
* "{@code FooFieldset}" contains the field {@code private String bar}. As the plugin renders markup for {@code
25-
* Foo}, it needs to render members of {@code FooFieldset} inside. As it reaches the field map {@code bar}, it will
26-
* use the value {@code reportingClass = Foo.class} and grab values from {@code Foo} if needs to</i></p>
24+
* "{@code FooFieldset}" contains the field {@code private String bar}. As the plugin renders markup for
25+
* {@code Foo}, it needs to render members of {@code FooFieldset} inside. As it reaches the field map {@code bar},
26+
* it will use the values {@code reportingClass = Foo.class} and {@code upstreamMember = Foo#fooFieldset}. These
27+
* values can be then used to form up a rendering context for the current field {@code bar}: in particular, to get
28+
* embeddable settings</i></p>
2729
* @return A nullable {@code Member} reference
2830
*/
2931
Member getUpstreamMember();

core/src/main/java/com/exadel/aem/toolkit/core/CoreConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class CoreConstants {
2929

3030
public static final String PN_APPEND = "append";
3131
public static final String PN_CHECKED = "checked";
32+
public static final String PN_DEFAULT_VALUE = "defaultValue";
3233
public static final String PN_ITEM_RESOURCE_TYPE = "itemResourceType";
3334
public static final String PN_LIMIT = "limit";
3435
public static final String PN_LIST_ITEM = "listItem";

0 commit comments

Comments
 (0)