Skip to content

Commit 9f75e69

Browse files
committed
ENG-5316: upgrade java to version 17
1 parent f506d31 commit 9f75e69

41 files changed

Lines changed: 488 additions & 447 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/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
GH_PR_TITLE: ${{ github.event.pull_request.title }}
77
GH_PR_NUMBER: ${{ github.event.pull_request.number }}
88
GH_PR_RUN_NUMBER: ${{ github.run_number }}
9-
IMAGES_TO_BUILD: "Dockerfile.eap:entando-de-app-eap,Dockerfile.wildfly:entando-de-app-wildfly,Dockerfile.tomcat:entando-de-app-tomcat"
9+
IMAGES_TO_BUILD: "Dockerfile.tomcat:entando-de-app-tomcat"
1010
ENTANDO_CRANE_VERSION: ${{ vars.ENTANDO_CRANE_VERSION || 'v0.10.0' }}
1111
GITHUB_REF: ${{ github.ref }}
1212

@@ -29,10 +29,10 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131

32-
- name: Set up JDK 11
32+
- name: Set up JDK 17
3333
uses: actions/setup-java@v4
3434
with:
35-
java-version: '11'
35+
java-version: '17'
3636
distribution: 'temurin'
3737
cache: maven
3838

@@ -85,10 +85,10 @@ jobs:
8585
steps:
8686
- uses: actions/checkout@v4
8787

88-
- name: Set up JDK 11
88+
- name: Set up JDK 17
8989
uses: actions/setup-java@v4
9090
with:
91-
java-version: '11'
91+
java-version: '17'
9292
distribution: 'temurin'
9393
cache: maven
9494

Dockerfile.eap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM registry.hub.docker.com/entando/entando-eap73-clustered-base:7.2.0
1+
FROM registry.hub.docker.com/entando/entando-eap73-clustered-base:7.4.0-ENG-5316-PR-28
22
ARG VERSION
33

44
### Required OpenShift Labels
55
LABEL name="Entando App" \
66
maintainer="dev@entando.com" \
77
vendor="Entando Inc." \
88
version="${VERSION}" \
9-
release="7.3.0-fix.2" \
9+
release="7.5.0" \
1010
summary="Entando Application" \
1111
description="This Entando app engine application provides APIs and composition for Entando applications"
1212

Dockerfile.tomcat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM registry.hub.docker.com/entando/entando-tomcat-base:v7.3.0-ENG-5554-PR-31-KB-release-2F-7.3.0
1+
FROM registry.hub.docker.com/entando/entando-tomcat-base:7.4.0-ENG-5316-PR-28
22
ARG VERSION
33

44
### Required OpenShift Labels
55
LABEL name="Entando App" \
66
maintainer="dev@entando.com" \
77
vendor="Entando Inc." \
88
version="${VERSION}" \
9-
release="7.3.0-fix.2" \
9+
release="7.5.0" \
1010
summary="Entando Application" \
1111
description="This Entando app engine application provides APIs and composition for Entando applications"
1212

Dockerfile.wildfly

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.hub.docker.com/entando/entando-wildfly17-base:7.2.0
1+
FROM registry.hub.docker.com/entando/entando-wildfly17-base:7.4.0-ENG-5316-PR-28
22

33
ARG VERSION
44

@@ -7,7 +7,7 @@ LABEL name="Entando App" \
77
maintainer="dev@entando.com" \
88
vendor="Entando Inc." \
99
version="${VERSION}" \
10-
release="7.3.0-fix.2" \
10+
release="7.5.0" \
1111
summary="Entando Application" \
1212
description="This Entando app engine application provides APIs and composition for Entando applications"
1313

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

Lines changed: 7 additions & 7 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<String>, ResourceUtilizer<String>, CategoryUtilizer<String, String> {
5858

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

@@ -615,7 +615,7 @@ public List getPageUtilizers(String pageCode) throws EntException {
615615
}
616616

617617
@Override
618-
public List getContentUtilizers(String contentId) throws EntException {
618+
public List<String> getContentUtilizers(String contentId) throws EntException {
619619
try {
620620
return this.getContentDAO().getContentUtilizers(contentId);
621621
} catch (Throwable t) {
@@ -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: 14 additions & 28 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,45 +308,31 @@ 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))) {
322-
Date big0 = null;
323-
try {
324-
big0 = DateConverter.parseDate(value0, this.getDateFormat());
325-
} catch (Exception e) {}
326-
Date big1 = null;
327-
try {
328-
big1 = DateConverter.parseDate(value1, this.getDateFormat());
329-
} catch (Exception e) {}
322+
Date big0 = DateConverter.parseDate(value0, this.getDateFormat());
323+
Date big1 = DateConverter.parseDate(value1, this.getDateFormat());
330324
//String[] fieldsSuffix = {"_dateStartFieldName", "_dateEndFieldName"};
331-
filter = new SearchEngineFilter(this.getIndexFieldName(), big0, big1);
325+
filter = new SearchEngineFilter<>(this.getIndexFieldName(), big0, big1);
332326
} else if (attribute instanceof BooleanAttribute &&
333327
(!StringUtils.isEmpty(value0) && !StringUtils.isEmpty(value1))) {
334-
filter = new SearchEngineFilter(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
328+
filter = new SearchEngineFilter<>(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
335329
//String[] fieldsSuffix = {"_booleanFieldName", "_booleanFieldName_ignore", "_booleanFieldName_control"};
336330
} else if (attribute instanceof NumberAttribute &&
337331
(!StringUtils.isEmpty(value0) || !StringUtils.isEmpty(value1))) {
338332
//String[] fieldsSuffix = {"_numberStartFieldName", "_numberEndFieldName"};
339-
BigDecimal big0 = null;
340-
try {
341-
big0 = new BigDecimal(value0);
342-
} catch (Exception e) {
343-
}
344-
BigDecimal big1 = null;
345-
try {
346-
big1 = new BigDecimal(value1);
347-
} catch (Exception e) {
348-
}
349-
filter = new SearchEngineFilter(this.getIndexFieldName(), big0, big1);
333+
BigDecimal big0 = new BigDecimal(value0);
334+
BigDecimal big1 = new BigDecimal(value1);
335+
filter = new SearchEngineFilter<>(this.getIndexFieldName(), big0, big1);
350336
}
351337
}
352338
return filter;

cms-plugin/src/main/java/com/agiletec/plugins/jacms/aps/system/services/resource/ResourceManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
*
6060
* @author W.Ambu - E.Santoboni
6161
*/
62-
public class ResourceManager extends AbstractService implements IResourceManager, GroupUtilizer, CategoryUtilizer,
63-
RefreshableBeanTenantAware {
62+
public class ResourceManager extends AbstractService
63+
implements IResourceManager, GroupUtilizer<String>, CategoryUtilizer<String, String>, RefreshableBeanTenantAware {
6464

6565
private final EntLogger logger = EntLogFactory.getSanitizedLogger(getClass());
6666

@@ -603,7 +603,7 @@ public List<String> getGroupUtilizers(String groupName) throws EntException {
603603
}
604604

605605
@Override
606-
public List getCategoryUtilizers(String categoryCode) throws EntException {
606+
public List<String> getCategoryUtilizers(String categoryCode) throws EntException {
607607
List<String> resourcesId = null;
608608
try {
609609
resourcesId = this.getResourceDAO().searchResourcesId(null, null, null, categoryCode, null);
@@ -643,7 +643,7 @@ public void reloadCategoryReferences(String categoryCode) throws EntException {
643643
}
644644

645645
@Override
646-
public List getCategoryUtilizersForReloadReferences(String categoryCode) throws EntException {
646+
public List<String> getCategoryUtilizersForReloadReferences(String categoryCode) throws EntException {
647647
List<String> resourcesId = null;
648648
try {
649649
resourcesId = this.getCategoryUtilizers(categoryCode);

cms-plugin/src/main/java/com/agiletec/plugins/jacms/aps/system/services/resource/ResourceUtilizer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
* Interfaccia base per i servizi, i cui elementi gestiti,
2222
* possono presentare delle referenziazione con delle risorse.
2323
* @author E.Santoboni
24+
* @param <T>
2425
*/
25-
public interface ResourceUtilizer {
26+
public interface ResourceUtilizer<T> {
2627

2728
/**
2829
* Restituisce l'identificativo del servizio utilizzatore.
@@ -37,6 +38,6 @@ public interface ResourceUtilizer {
3738
* @return La lista degli oggetti referenzianti la risorsa.
3839
* @throws EntException in caso di errore.
3940
*/
40-
public List getResourceUtilizers(String resourceId) throws EntException;
41+
public List<T> getResourceUtilizers(String resourceId) throws EntException;
4142

4243
}

0 commit comments

Comments
 (0)