Skip to content

Commit 8561f2d

Browse files
committed
ENG-5316: Upgrade java to version 17
1 parent 0e5c2ca commit 8561f2d

46 files changed

Lines changed: 274 additions & 435 deletions

File tree

Some content is hidden

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

.github/workflows/ga-publication.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: "Configure GA Repository"
4747
uses: actions/setup-java@v1
4848
with:
49-
java-version: 11
49+
java-version: 17
5050
server-id: maven-central
5151
server-username: MAVEN_USERNAME
5252
server-password: MAVEN_PASSWORD

.github/workflows/pr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ jobs:
7272
--token "$ENTANDO_BOT_TOKEN" \
7373
;
7474
#~ JDK
75-
- name: "Set up JDK 11"
75+
- name: "Set up JDK 17"
7676
uses: actions/setup-java@v1
7777
with:
78-
java-version: 11
78+
java-version: 17
7979
#~ MAVEN CACHE
8080
- name: "Cache Maven packages"
8181
uses: actions/cache@v2
@@ -119,10 +119,10 @@ jobs:
119119
# ${{ secrets.ENTANDO_OPT_PPL_INSTALL_CMD }}
120120
# ~/ppl-run checkout-branch pr --lcd "$LOCAL_CLONE_DIR"
121121
# #~ JDK
122-
# - name: "Set up JDK 11"
122+
# - name: "Set up JDK 17"
123123
# uses: actions/setup-java@v1
124124
# with:
125-
# java-version: 11
125+
# java-version: 17
126126
# #~ MAVEN CACHE
127127
# - name: "Cache Maven packages"
128128
# id: maven-cache

.github/workflows/publication.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
ENTANDO_BOT_TOKEN: ${{ secrets.ENTANDO_BOT_TOKEN }}
1111
PR_CHECKER_PATH: ".github/pr-title-checker-config.json"
1212

13-
JDK_VERSION: 11
13+
JDK_VERSION: 17
1414
BUILD_COMMANDS: mvn clean install;
1515
DOCKER_EAP_IMAGE_BASE_NAME: entando/entando-de-app-eap
1616
DOCKER_TOMCAT_IMAGE_BASE_NAME: entando/entando-de-app-tomcat

admin-console/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.entando</groupId>
66
<artifactId>app-engine</artifactId>
7-
<version>7.3.0-SNAPSHOT</version>
7+
<version>7.4.0-SNAPSHOT</version>
88
</parent>
99
<groupId>org.entando.entando</groupId>
1010
<artifactId>entando-admin-console</artifactId>

cds-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.entando</groupId>
77
<artifactId>app-engine</artifactId>
8-
<version>7.3.0-SNAPSHOT</version>
8+
<version>7.4.0-SNAPSHOT</version>
99
</parent>
1010
<artifactId>entando-plugin-jpcds</artifactId>
1111
<groupId>org.entando.entando.plugins</groupId>

cms-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.entando</groupId>
77
<artifactId>app-engine</artifactId>
8-
<version>7.3.0-SNAPSHOT</version>
8+
<version>7.4.0-SNAPSHOT</version>
99
</parent>
1010
<groupId>org.entando.entando.plugins</groupId>
1111
<artifactId>entando-plugin-jacms</artifactId>

cms-plugin/src/main/java/com/agiletec/plugins/jacms/aps/system/services/content/ContentManager.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package com.agiletec.plugins.jacms.aps.system.services.content;
1515

1616
import com.agiletec.aps.system.ApsSystemUtils;
17-
import com.agiletec.aps.system.SystemConstants;
1817
import com.agiletec.aps.system.common.entity.ApsEntityManager;
1918
import com.agiletec.aps.system.common.entity.IEntityDAO;
2019
import com.agiletec.aps.system.common.entity.IEntitySearcherDAO;
@@ -53,8 +52,9 @@
5352
* Contents manager. This implements all the methods needed to create and manage
5453
* the contents.
5554
*/
56-
public class ContentManager extends ApsEntityManager
57-
implements IContentManager, GroupUtilizer<String>, PageUtilizer, ContentUtilizer, ResourceUtilizer, CategoryUtilizer {
55+
public class ContentManager extends ApsEntityManager
56+
implements IContentManager, GroupUtilizer<String>, PageUtilizer,
57+
ContentUtilizer, ResourceUtilizer<String>, CategoryUtilizer<String, String> {
5858

5959
private static final EntLogger logger = EntLogFactory.getSanitizedLogger(ContentManager.class);
6060

@@ -633,7 +633,7 @@ public List<String> getGroupUtilizers(String groupName) throws EntException {
633633
}
634634

635635
@Override
636-
public List getResourceUtilizers(String resourceId) throws EntException {
636+
public List<String> getResourceUtilizers(String resourceId) throws EntException {
637637
try {
638638
return this.getContentDAO().getResourceUtilizers(resourceId);
639639
} catch (Throwable t) {
@@ -642,7 +642,7 @@ public List getResourceUtilizers(String resourceId) throws EntException {
642642
}
643643

644644
@Override
645-
public List getCategoryUtilizers(String resourceId) throws EntException {
645+
public List<String> getCategoryUtilizers(String resourceId) throws EntException {
646646
try {
647647
return this.getContentDAO().getCategoryUtilizers(resourceId);
648648
} catch (Throwable t) {
@@ -661,7 +661,7 @@ public void reloadCategoryReferences(String categoryCode) {
661661

662662
@SuppressWarnings("rawtypes")
663663
@Override
664-
public List getCategoryUtilizersForReloadReferences(String categoryCode) {
664+
public List<String> getCategoryUtilizersForReloadReferences(String categoryCode) {
665665
List<String> contentIdToReload = new ArrayList<>();
666666
try {
667667
Set<String> contents = this.getContentUpdaterService().getContentsId(categoryCode);

cms-plugin/src/main/java/com/agiletec/plugins/jacms/aps/system/services/content/ContentUtilizer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
/**
2121
* Basic interface for the services whose handled elements may have references to contents.
2222
* @author E.Santoboni
23+
* @param <T>
2324
*/
24-
public interface ContentUtilizer {
25+
public interface ContentUtilizer<T> {
2526

2627
/**
2728
* Return the ID of the utilizer service.
@@ -35,6 +36,6 @@ public interface ContentUtilizer {
3536
* @return the list of the objects which reference the content.
3637
* @throws EntException in case of error.
3738
*/
38-
public List getContentUtilizers(String contentId) throws EntException;
39+
public List<T> getContentUtilizers(String contentId) throws EntException;
3940

4041
}

cms-plugin/src/main/java/com/agiletec/plugins/jacms/aps/system/services/content/model/ContentDto.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ private void fillAbstractResourceAttribute(AttributeInterface attribute, EntityA
294294
if (AbstractResourceAttribute.class.isAssignableFrom(attribute.getClass())) {
295295
AbstractResourceAttribute resourceAttribute = (AbstractResourceAttribute) attribute;
296296
for (Entry<String, Object> resourceEntry : attributeDto.getValues().entrySet()) {
297+
@SuppressWarnings("unchecked")
297298
Map<String, Object> resourceMap = (Map<String, Object>) resourceEntry.getValue();
298299
this.setResourceAttribute(resourceAttribute, resourceMap, resourceEntry.getKey());
299300
}
@@ -312,6 +313,7 @@ private void setResourceAttribute(AbstractResourceAttribute resourceAttribute, M
312313
resourceInterface.setId(resourceId);
313314
resourceInterface.setCorrelationCode(correlationCode);
314315
resourceAttribute.setResource(resourceInterface, langCode);
316+
@SuppressWarnings("unchecked")
315317
Map<String, Object> values = (Map<String, Object>) resource.get("metadata");
316318
if (values != null) {
317319
Map<String, String> metadata = values.entrySet().stream()

cms-plugin/src/main/java/com/agiletec/plugins/jacms/aps/system/services/content/widget/UserFilterOptionBean.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
243243
AttributeInterface attribute = this.getAttribute();
244244
if (attribute instanceof ITextAttribute) {
245245
String text = this.getFormFieldValues().get(this.getFormFieldNames()[0]);
246-
filter = new EntitySearchFilter(attribute.getName(), true, text, true);
246+
filter = new EntitySearchFilter<String>(attribute.getName(), true, text, true);
247247
if (attribute.isMultilingual()) {
248248
filter.setLangCode(this.getCurrentLang().getCode());
249249
}
@@ -252,7 +252,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
252252
String end = this.getFormFieldValues().get(this.getFormFieldNames()[1]);
253253
Date startDate = DateConverter.parseDate(start, this.getDateFormat());
254254
Date endDate = DateConverter.parseDate(end, this.getDateFormat());
255-
filter = new EntitySearchFilter(attribute.getName(), true, startDate, endDate);
255+
filter = new EntitySearchFilter<Date>(attribute.getName(), true, startDate, endDate);
256256
} else if (attribute instanceof BooleanAttribute) {
257257
String value = this.getFormFieldValues().get(this.getFormFieldNames()[0]);
258258
String ignore = this.getFormFieldValues().get(this.getFormFieldNames()[1]);
@@ -263,7 +263,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
263263
filter = new EntitySearchFilter(attribute.getName(), true);
264264
filter.setNullOption(true);
265265
} else {
266-
filter = new EntitySearchFilter(attribute.getName(), true, value, false);
266+
filter = new EntitySearchFilter<String>(attribute.getName(), true, value, false);
267267
}
268268
} else if (attribute instanceof NumberAttribute) {
269269
String start = this.getFormFieldValues().get(this.getFormFieldNames()[0]);
@@ -278,7 +278,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
278278
Integer endNumberInt = Integer.parseInt(end);
279279
endNumber = new BigDecimal(endNumberInt);
280280
} catch (Throwable t) {}
281-
filter = new EntitySearchFilter(attribute.getName(), true, startNumber, endNumber);
281+
filter = new EntitySearchFilter<BigDecimal>(attribute.getName(), true, startNumber, endNumber);
282282
}
283283
} catch (Throwable t) {
284284
_logger.error("Error extracting entity search filters", t);
@@ -308,14 +308,14 @@ public SearchEngineFilter extractFilter() {
308308
if (!this.isAttributeFilter()) {
309309
if (this.getKey().equals(KEY_FULLTEXT) && !StringUtils.isEmpty(value0)) {
310310
//String[] fieldsSuffix = {"", "_option"};
311-
filter = new SearchEngineFilter(this.getCurrentLang().getCode(), value0, this.getOption(value1));
311+
filter = new SearchEngineFilter<>(this.getCurrentLang().getCode(), value0, this.getOption(value1));
312312
} else if (this.getKey().equals(KEY_CATEGORY) && !StringUtils.isEmpty(value0)) {
313-
filter = new SearchEngineFilter(IIndexerDAO.CONTENT_CATEGORY_FIELD_NAME, value0, SearchEngineFilter.TextSearchOption.EXACT);
313+
filter = new SearchEngineFilter<>(IIndexerDAO.CONTENT_CATEGORY_FIELD_NAME, value0, SearchEngineFilter.TextSearchOption.EXACT);
314314
}
315315
} else {
316316
AttributeInterface attribute = this.getAttribute();
317317
if (attribute instanceof ITextAttribute && !StringUtils.isEmpty(value0)) {
318-
filter = new SearchEngineFilter(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
318+
filter = new SearchEngineFilter<>(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
319319
//String[] fieldsSuffix = {"_textFieldName"};
320320
} else if (attribute instanceof DateAttribute &&
321321
(!StringUtils.isEmpty(value0) || !StringUtils.isEmpty(value1))) {
@@ -328,10 +328,10 @@ public SearchEngineFilter extractFilter() {
328328
big1 = DateConverter.parseDate(value1, this.getDateFormat());
329329
} catch (Exception e) {}
330330
//String[] fieldsSuffix = {"_dateStartFieldName", "_dateEndFieldName"};
331-
filter = new SearchEngineFilter(this.getIndexFieldName(), big0, big1);
331+
filter = new SearchEngineFilter<>(this.getIndexFieldName(), big0, big1);
332332
} else if (attribute instanceof BooleanAttribute &&
333333
(!StringUtils.isEmpty(value0) && !StringUtils.isEmpty(value1))) {
334-
filter = new SearchEngineFilter(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
334+
filter = new SearchEngineFilter<>(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
335335
//String[] fieldsSuffix = {"_booleanFieldName", "_booleanFieldName_ignore", "_booleanFieldName_control"};
336336
} else if (attribute instanceof NumberAttribute &&
337337
(!StringUtils.isEmpty(value0) || !StringUtils.isEmpty(value1))) {
@@ -346,7 +346,7 @@ public SearchEngineFilter extractFilter() {
346346
big1 = new BigDecimal(value1);
347347
} catch (Exception e) {
348348
}
349-
filter = new SearchEngineFilter(this.getIndexFieldName(), big0, big1);
349+
filter = new SearchEngineFilter<>(this.getIndexFieldName(), big0, big1);
350350
}
351351
}
352352
return filter;

0 commit comments

Comments
 (0)