Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
GH_PR_TITLE: ${{ github.event.pull_request.title }}
GH_PR_NUMBER: ${{ github.event.pull_request.number }}
GH_PR_RUN_NUMBER: ${{ github.run_number }}
IMAGES_TO_BUILD: "Dockerfile.eap:entando-de-app-eap,Dockerfile.wildfly:entando-de-app-wildfly,Dockerfile.tomcat:entando-de-app-tomcat"
IMAGES_TO_BUILD: "Dockerfile.tomcat:entando-de-app-tomcat"
ENTANDO_CRANE_VERSION: ${{ vars.ENTANDO_CRANE_VERSION || 'v0.10.0' }}
GITHUB_REF: ${{ github.ref }}

Expand All @@ -29,10 +29,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: maven

Expand Down Expand Up @@ -85,10 +85,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: maven

Expand Down
20 changes: 0 additions & 20 deletions Dockerfile.eap

This file was deleted.

5 changes: 3 additions & 2 deletions Dockerfile.tomcat
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM registry.hub.docker.com/entando/entando-tomcat-base:v7.3.0-ENG-5554-PR-31-KB-release-2F-7.3.0
FROM entando/entando-tomcat-base:v7.5.0-ENG-5316-PR-34-BB-release-2F-7.3.0

ARG VERSION

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

Expand Down
21 changes: 0 additions & 21 deletions Dockerfile.wildfly

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package com.agiletec.plugins.jacms.aps.system.services.content;

import com.agiletec.aps.system.ApsSystemUtils;
import com.agiletec.aps.system.SystemConstants;
import com.agiletec.aps.system.common.entity.ApsEntityManager;
import com.agiletec.aps.system.common.entity.IEntityDAO;
import com.agiletec.aps.system.common.entity.IEntitySearcherDAO;
Expand Down Expand Up @@ -53,8 +52,9 @@
* Contents manager. This implements all the methods needed to create and manage
* the contents.
*/
public class ContentManager extends ApsEntityManager
implements IContentManager, GroupUtilizer<String>, PageUtilizer, ContentUtilizer, ResourceUtilizer, CategoryUtilizer {
public class ContentManager extends ApsEntityManager
implements IContentManager, GroupUtilizer<String>, PageUtilizer,
ContentUtilizer<String>, ResourceUtilizer<String>, CategoryUtilizer<String, String> {

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

Expand Down Expand Up @@ -615,7 +615,7 @@ public List getPageUtilizers(String pageCode) throws EntException {
}

@Override
public List getContentUtilizers(String contentId) throws EntException {
public List<String> getContentUtilizers(String contentId) throws EntException {
try {
return this.getContentDAO().getContentUtilizers(contentId);
} catch (Throwable t) {
Expand All @@ -633,7 +633,7 @@ public List<String> getGroupUtilizers(String groupName) throws EntException {
}

@Override
public List getResourceUtilizers(String resourceId) throws EntException {
public List<String> getResourceUtilizers(String resourceId) throws EntException {
try {
return this.getContentDAO().getResourceUtilizers(resourceId);
} catch (Throwable t) {
Expand All @@ -642,7 +642,7 @@ public List getResourceUtilizers(String resourceId) throws EntException {
}

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

@SuppressWarnings("rawtypes")
@Override
public List getCategoryUtilizersForReloadReferences(String categoryCode) {
public List<String> getCategoryUtilizersForReloadReferences(String categoryCode) {
List<String> contentIdToReload = new ArrayList<>();
try {
Set<String> contents = this.getContentUpdaterService().getContentsId(categoryCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
/**
* Basic interface for the services whose handled elements may have references to contents.
* @author E.Santoboni
* @param <T>
*/
public interface ContentUtilizer {
public interface ContentUtilizer<T> {

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ private void fillAbstractResourceAttribute(AttributeInterface attribute, EntityA
if (AbstractResourceAttribute.class.isAssignableFrom(attribute.getClass())) {
AbstractResourceAttribute resourceAttribute = (AbstractResourceAttribute) attribute;
for (Entry<String, Object> resourceEntry : attributeDto.getValues().entrySet()) {
@SuppressWarnings("unchecked")
Map<String, Object> resourceMap = (Map<String, Object>) resourceEntry.getValue();
this.setResourceAttribute(resourceAttribute, resourceMap, resourceEntry.getKey());
}
Expand All @@ -312,6 +313,7 @@ private void setResourceAttribute(AbstractResourceAttribute resourceAttribute, M
resourceInterface.setId(resourceId);
resourceInterface.setCorrelationCode(correlationCode);
resourceAttribute.setResource(resourceInterface, langCode);
@SuppressWarnings("unchecked")
Map<String, Object> values = (Map<String, Object>) resource.get("metadata");
if (values != null) {
Map<String, String> metadata = values.entrySet().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
AttributeInterface attribute = this.getAttribute();
if (attribute instanceof ITextAttribute) {
String text = this.getFormFieldValues().get(this.getFormFieldNames()[0]);
filter = new EntitySearchFilter(attribute.getName(), true, text, true);
filter = new EntitySearchFilter<String>(attribute.getName(), true, text, true);
if (attribute.isMultilingual()) {
filter.setLangCode(this.getCurrentLang().getCode());
}
Expand All @@ -252,7 +252,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
String end = this.getFormFieldValues().get(this.getFormFieldNames()[1]);
Date startDate = DateConverter.parseDate(start, this.getDateFormat());
Date endDate = DateConverter.parseDate(end, this.getDateFormat());
filter = new EntitySearchFilter(attribute.getName(), true, startDate, endDate);
filter = new EntitySearchFilter<Date>(attribute.getName(), true, startDate, endDate);
} else if (attribute instanceof BooleanAttribute) {
String value = this.getFormFieldValues().get(this.getFormFieldNames()[0]);
String ignore = this.getFormFieldValues().get(this.getFormFieldNames()[1]);
Expand All @@ -263,7 +263,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
filter = new EntitySearchFilter(attribute.getName(), true);
filter.setNullOption(true);
} else {
filter = new EntitySearchFilter(attribute.getName(), true, value, false);
filter = new EntitySearchFilter<String>(attribute.getName(), true, value, false);
}
} else if (attribute instanceof NumberAttribute) {
String start = this.getFormFieldValues().get(this.getFormFieldNames()[0]);
Expand All @@ -278,7 +278,7 @@ public EntitySearchFilter getEntityFilter() throws EntException {
Integer endNumberInt = Integer.parseInt(end);
endNumber = new BigDecimal(endNumberInt);
} catch (Throwable t) {}
filter = new EntitySearchFilter(attribute.getName(), true, startNumber, endNumber);
filter = new EntitySearchFilter<BigDecimal>(attribute.getName(), true, startNumber, endNumber);
}
} catch (Throwable t) {
_logger.error("Error extracting entity search filters", t);
Expand Down Expand Up @@ -308,45 +308,31 @@ public SearchEngineFilter extractFilter() {
if (!this.isAttributeFilter()) {
if (this.getKey().equals(KEY_FULLTEXT) && !StringUtils.isEmpty(value0)) {
//String[] fieldsSuffix = {"", "_option"};
filter = new SearchEngineFilter(this.getCurrentLang().getCode(), value0, this.getOption(value1));
filter = new SearchEngineFilter<>(this.getCurrentLang().getCode(), value0, this.getOption(value1));
} else if (this.getKey().equals(KEY_CATEGORY) && !StringUtils.isEmpty(value0)) {
filter = new SearchEngineFilter(IIndexerDAO.CONTENT_CATEGORY_FIELD_NAME, value0, SearchEngineFilter.TextSearchOption.EXACT);
filter = new SearchEngineFilter<>(IIndexerDAO.CONTENT_CATEGORY_FIELD_NAME, value0, SearchEngineFilter.TextSearchOption.EXACT);
}
} else {
AttributeInterface attribute = this.getAttribute();
if (attribute instanceof ITextAttribute && !StringUtils.isEmpty(value0)) {
filter = new SearchEngineFilter(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
filter = new SearchEngineFilter<>(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
//String[] fieldsSuffix = {"_textFieldName"};
} else if (attribute instanceof DateAttribute &&
(!StringUtils.isEmpty(value0) || !StringUtils.isEmpty(value1))) {
Date big0 = null;
try {
big0 = DateConverter.parseDate(value0, this.getDateFormat());
} catch (Exception e) {}
Date big1 = null;
try {
big1 = DateConverter.parseDate(value1, this.getDateFormat());
} catch (Exception e) {}
Date big0 = DateConverter.parseDate(value0, this.getDateFormat());
Date big1 = DateConverter.parseDate(value1, this.getDateFormat());
//String[] fieldsSuffix = {"_dateStartFieldName", "_dateEndFieldName"};
filter = new SearchEngineFilter(this.getIndexFieldName(), big0, big1);
filter = new SearchEngineFilter<>(this.getIndexFieldName(), big0, big1);
} else if (attribute instanceof BooleanAttribute &&
(!StringUtils.isEmpty(value0) && !StringUtils.isEmpty(value1))) {
filter = new SearchEngineFilter(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
filter = new SearchEngineFilter<>(this.getIndexFieldName(), value0, SearchEngineFilter.TextSearchOption.EXACT);
//String[] fieldsSuffix = {"_booleanFieldName", "_booleanFieldName_ignore", "_booleanFieldName_control"};
} else if (attribute instanceof NumberAttribute &&
(!StringUtils.isEmpty(value0) || !StringUtils.isEmpty(value1))) {
//String[] fieldsSuffix = {"_numberStartFieldName", "_numberEndFieldName"};
BigDecimal big0 = null;
try {
big0 = new BigDecimal(value0);
} catch (Exception e) {
}
BigDecimal big1 = null;
try {
big1 = new BigDecimal(value1);
} catch (Exception e) {
}
filter = new SearchEngineFilter(this.getIndexFieldName(), big0, big1);
BigDecimal big0 = new BigDecimal(value0);
BigDecimal big1 = new BigDecimal(value1);
filter = new SearchEngineFilter<>(this.getIndexFieldName(), big0, big1);
}
}
return filter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
*
* @author W.Ambu - E.Santoboni
*/
public class ResourceManager extends AbstractService implements IResourceManager, GroupUtilizer, CategoryUtilizer,
RefreshableBeanTenantAware {
public class ResourceManager extends AbstractService
implements IResourceManager, GroupUtilizer<String>, CategoryUtilizer<String, String>, RefreshableBeanTenantAware {

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

Expand Down Expand Up @@ -603,7 +603,7 @@ public List<String> getGroupUtilizers(String groupName) throws EntException {
}

@Override
public List getCategoryUtilizers(String categoryCode) throws EntException {
public List<String> getCategoryUtilizers(String categoryCode) throws EntException {
List<String> resourcesId = null;
try {
resourcesId = this.getResourceDAO().searchResourcesId(null, null, null, categoryCode, null);
Expand Down Expand Up @@ -643,7 +643,7 @@ public void reloadCategoryReferences(String categoryCode) throws EntException {
}

@Override
public List getCategoryUtilizersForReloadReferences(String categoryCode) throws EntException {
public List<String> getCategoryUtilizersForReloadReferences(String categoryCode) throws EntException {
List<String> resourcesId = null;
try {
resourcesId = this.getCategoryUtilizers(categoryCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
* Interfaccia base per i servizi, i cui elementi gestiti,
* possono presentare delle referenziazione con delle risorse.
* @author E.Santoboni
* @param <T>
*/
public interface ResourceUtilizer {
public interface ResourceUtilizer<T> {

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.InputStream;
import org.entando.entando.ent.exception.EntResourceNotFoundException;
import org.entando.entando.ent.exception.EntResourceNotFoundRuntimeException;
import org.entando.entando.ent.exception.EntRuntimeException;
import org.entando.entando.ent.util.EntLogging.EntLogFactory;
import org.entando.entando.ent.util.EntLogging.EntLogger;

Expand Down Expand Up @@ -60,7 +61,7 @@ public InputStream getResourceStream() {
throw new EntResourceNotFoundRuntimeException(ERROR_ON_EXTRACTING_RESOURCE_STREAM, e);
} catch (Throwable t) {
logger.error(ERROR_ON_EXTRACTING_RESOURCE_STREAM, t);
throw new RuntimeException(ERROR_ON_EXTRACTING_RESOURCE_STREAM, t);
throw new EntRuntimeException(ERROR_ON_EXTRACTING_RESOURCE_STREAM, t);
}
}

Expand Down Expand Up @@ -119,4 +120,4 @@ String getNewInstanceFileName(String masterFileName) throws Throwable {

return baseName;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.entando.entando.ent.exception.EntException;
import org.entando.entando.ent.exception.EntResourceNotFoundException;
import org.entando.entando.ent.exception.EntResourceNotFoundRuntimeException;
import org.entando.entando.ent.exception.EntRuntimeException;
import org.entando.entando.ent.util.EntLogging.EntLogFactory;
import org.entando.entando.ent.util.EntLogging.EntLogger;
import org.im4java.core.ConvertCmd;
Expand Down Expand Up @@ -81,7 +82,7 @@ public InputStream getResourceStream(int size, String langCode) {
throw new EntResourceNotFoundRuntimeException(ERROR_ON_EXTRACTING_FILE, e);
} catch (Throwable t) {
logger.error(ERROR_ON_EXTRACTING_FILE, t);
throw new RuntimeException(ERROR_ON_EXTRACTING_FILE, t);
throw new EntRuntimeException(ERROR_ON_EXTRACTING_FILE, t);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public interface ResourceDataBean {
*
* @return La lista dei metadati della risorsa.
*/
public Map getMetadata();
public Map<String, String> getMetadata();

public void setMetadata(Map<String,String> metadata);

Expand Down
Loading
Loading