diff --git a/cms-api/pom.xml b/cms-api/pom.xml index d261de82..209ea7a9 100644 --- a/cms-api/pom.xml +++ b/cms-api/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-api jar diff --git a/cms-api/src/main/java/com/condation/cms/api/module/CMSRequestContext.java b/cms-api/src/main/java/com/condation/cms/api/module/CMSRequestContext.java index ac3a596e..1b8167dd 100644 --- a/cms-api/src/main/java/com/condation/cms/api/module/CMSRequestContext.java +++ b/cms-api/src/main/java/com/condation/cms/api/module/CMSRequestContext.java @@ -34,40 +34,39 @@ * @author t.marx */ @RequiredArgsConstructor -public class CMSRequestContext extends FeatureContainer implements ModuleRequestContext { +public class CMSRequestContext extends RequestContext implements ModuleRequestContext { - private final RequestContext requestContext; + private final RequestContext delegate; @Override public void close() throws Exception { - if (requestContext == null) { - return; + if (delegate != null) { + delegate.close(); } - requestContext.close(); } @Override public T get(Class featureClass) { - if (requestContext == null) { + if (delegate == null) { return null; } - return requestContext.get(featureClass); + return delegate.get(featureClass); } @Override public void add(Class featureClass, T feature) { - if (requestContext == null) { + if (delegate == null) { return; } - requestContext.add(featureClass, feature); + delegate.add(featureClass, feature); } @Override public boolean has(Class featureClass) { - if (requestContext == null) { + if (delegate == null) { return false; } - return requestContext.has(featureClass); + return delegate.has(featureClass); } diff --git a/cms-auth/pom.xml b/cms-auth/pom.xml index 0f494c07..ca8b9f02 100644 --- a/cms-auth/pom.xml +++ b/cms-auth/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-auth jar diff --git a/cms-content/pom.xml b/cms-content/pom.xml index 4c7dea15..b406ccb2 100644 --- a/cms-content/pom.xml +++ b/cms-content/pom.xml @@ -6,7 +6,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-content jar diff --git a/cms-content/src/main/java/com/condation/cms/content/shortcodes/ShortCodes.java b/cms-content/src/main/java/com/condation/cms/content/shortcodes/ShortCodes.java index 754e8964..03022dd9 100644 --- a/cms-content/src/main/java/com/condation/cms/content/shortcodes/ShortCodes.java +++ b/cms-content/src/main/java/com/condation/cms/content/shortcodes/ShortCodes.java @@ -72,9 +72,9 @@ public String execute (String name, Map parameters, RequestConte try { Parameter params; if (parameters != null) { - params = new Parameter(parameters); + params = new Parameter(parameters, requestContext); } else { - params = new Parameter(); + params = new Parameter(requestContext); } return tagMap.get(name).apply(params); } catch (Exception e) { diff --git a/cms-core/pom.xml b/cms-core/pom.xml index 24379378..7ada7c6c 100644 --- a/cms-core/pom.xml +++ b/cms-core/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-core jar diff --git a/cms-extensions/pom.xml b/cms-extensions/pom.xml index 8b17b8cc..a1ad63d4 100644 --- a/cms-extensions/pom.xml +++ b/cms-extensions/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-extensions jar diff --git a/cms-filesystem/pom.xml b/cms-filesystem/pom.xml index e53a28ed..089a3565 100644 --- a/cms-filesystem/pom.xml +++ b/cms-filesystem/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-filesystem jar diff --git a/cms-git/pom.xml b/cms-git/pom.xml index 1439ecfc..f3f40c3d 100644 --- a/cms-git/pom.xml +++ b/cms-git/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-git jar diff --git a/cms-media/pom.xml b/cms-media/pom.xml index 35d2a79a..f17da8f8 100644 --- a/cms-media/pom.xml +++ b/cms-media/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-media jar diff --git a/cms-server/nbactions-dist.xml b/cms-server/nbactions-dist.xml index faa399eb..3e7e8910 100644 --- a/cms-server/nbactions-dist.xml +++ b/cms-server/nbactions-dist.xml @@ -12,9 +12,10 @@ ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} - server start -Dcms.home=../test-server/ + server start com.condation.cms.cli.CMSCli java + C:\entwicklung\workspaces\tma\cms\cms-server\test-server @@ -29,10 +30,11 @@ -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} - server start -Dcms.home=../test-server/ + server start com.condation.cms.cli.CMSCli java true + C:\entwicklung\workspaces\tma\cms\cms-server\test-server @@ -49,22 +51,8 @@ ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} com.condation.cms.cli.CMSCli java - server start -Dcms.home=../test-server/ - - - - CUSTOM-Stop project - Stop project - - process-classes - org.codehaus.mojo:exec-maven-plugin:3.1.0:exec - - - - ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} - stop - com.condation.cms.cli.CMSCli - java + server start + C:\entwicklung\workspaces\tma\cms\cms-server\test-server diff --git a/cms-server/pom.xml b/cms-server/pom.xml index e8297ebc..c128450a 100644 --- a/cms-server/pom.xml +++ b/cms-server/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-server jar diff --git a/cms-server/src/main/java/com/condation/cms/server/handler/cache/CacheHandler.java b/cms-server/src/main/java/com/condation/cms/server/handler/cache/CacheHandler.java index 07d0788e..ba8163e8 100644 --- a/cms-server/src/main/java/com/condation/cms/server/handler/cache/CacheHandler.java +++ b/cms-server/src/main/java/com/condation/cms/server/handler/cache/CacheHandler.java @@ -34,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.eclipse.jetty.http.HttpFields; import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.io.Content; import org.eclipse.jetty.server.Handler; diff --git a/cms-templates/pom.xml b/cms-templates/pom.xml index 9de30a7c..c9027696 100644 --- a/cms-templates/pom.xml +++ b/cms-templates/pom.xml @@ -7,7 +7,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-templates diff --git a/cms-templates/src/main/java/com/condation/cms/templates/DynamicConfiguration.java b/cms-templates/src/main/java/com/condation/cms/templates/DynamicConfiguration.java index 6c33d40f..bca613a7 100644 --- a/cms-templates/src/main/java/com/condation/cms/templates/DynamicConfiguration.java +++ b/cms-templates/src/main/java/com/condation/cms/templates/DynamicConfiguration.java @@ -22,7 +22,6 @@ * #L% */ import com.condation.cms.api.request.RequestContext; -import com.condation.cms.content.shortcodes.ShortCodes; import com.condation.cms.templates.components.TemplateComponents; import com.condation.cms.templates.tags.component.EndComponentTag; import com.condation.cms.templates.tags.component.ComponentTag; diff --git a/cms-templates/src/main/java/com/condation/cms/templates/utils/ParameterUtil.java b/cms-templates/src/main/java/com/condation/cms/templates/utils/ParameterUtil.java index 3ee45fa4..e5a97957 100644 --- a/cms-templates/src/main/java/com/condation/cms/templates/utils/ParameterUtil.java +++ b/cms-templates/src/main/java/com/condation/cms/templates/utils/ParameterUtil.java @@ -21,8 +21,6 @@ * . * #L% */ - -import com.condation.cms.templates.renderer.Renderer; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -36,6 +34,7 @@ * @author t.marx */ public class ParameterUtil { + public static Map parseAndEvaluate(String input, JexlContext jexlContext, JexlEngine engine) { Map resultMap = new HashMap<>(); @@ -48,22 +47,29 @@ public static Map parseAndEvaluate(String input, JexlContext jex String key = token.substring(0, equalsIndex).trim(); // Schlüssel extrahieren String value = token.substring(equalsIndex + 1).trim(); // Wert extrahieren + boolean isVariable = true; // Anführungszeichen entfernen, falls vorhanden if (value.startsWith("\"") && value.endsWith("\"")) { value = value.substring(1, value.length() - 1); + isVariable = false; } - // Wert mit JEXL evaluieren - Object evaluatedValue; - try { - JexlExpression expression = engine.createExpression(value); - evaluatedValue = expression.evaluate(jexlContext); - } catch (Exception e) { - // Falls der Wert keine JEXL-Expression ist, einfach als String speichern - evaluatedValue = value; + if (isVariable) { + // Wert mit JEXL evaluieren + Object evaluatedValue; + try { + JexlExpression expression = engine.createExpression(value); + evaluatedValue = expression.evaluate(jexlContext); + } catch (Exception e) { + // Falls der Wert keine JEXL-Expression ist, einfach als String speichern + evaluatedValue = value; + } + + resultMap.put(key, evaluatedValue); + } else { + resultMap.put(key, value); } - resultMap.put(key, evaluatedValue); } } diff --git a/cms-test/pom.xml b/cms-test/pom.xml index 4eb6202a..e9ce3b95 100644 --- a/cms-test/pom.xml +++ b/cms-test/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 cms-test jar diff --git a/distribution/build.xml b/distribution/build.xml index 5da2c03e..067c2601 100644 --- a/distribution/build.xml +++ b/distribution/build.xml @@ -1,6 +1,6 @@ - 7.6.3 + 7.6.4 diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index e670121f..b141decc 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 integration-tests jar diff --git a/modules/example-module/pom.xml b/modules/example-module/pom.xml index 099c6beb..d0fd6e8f 100644 --- a/modules/example-module/pom.xml +++ b/modules/example-module/pom.xml @@ -4,7 +4,7 @@ com.condation.cms.modules cms-modules - 7.6.3 + 7.6.4 example-module jar diff --git a/modules/pom.xml b/modules/pom.xml index 0032e1be..d35aa121 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 7.6.3 + 7.6.4 com.condation.cms.modules cms-modules diff --git a/modules/system-modules/pom.xml b/modules/system-modules/pom.xml index 878c5db9..c9fb1a26 100644 --- a/modules/system-modules/pom.xml +++ b/modules/system-modules/pom.xml @@ -4,7 +4,7 @@ com.condation.cms.modules cms-modules - 7.6.3 + 7.6.4 cms-system-modules jar diff --git a/pom.xml b/pom.xml index 39d0115c..4a8d3432 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.condation.cms cms-parent - 7.6.3 + 7.6.4 pom UTF-8 diff --git a/test-server/hosts/demo/modules_data/example-module/configuration.properties b/test-server/hosts/demo/modules_data/example-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo/modules_data/markedj-module/configuration.properties b/test-server/hosts/demo/modules_data/markedj-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo/modules_data/search-module/configuration.properties b/test-server/hosts/demo/modules_data/search-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo/modules_data/seo-module/configuration.properties b/test-server/hosts/demo/modules_data/seo-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo/modules_data/thymeleaf-module/configuration.properties b/test-server/hosts/demo/modules_data/thymeleaf-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo2/modules_data/example-module/configuration.properties b/test-server/hosts/demo2/modules_data/example-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo2/modules_data/markedjs-module/configuration.properties b/test-server/hosts/demo2/modules_data/markedjs-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo2/modules_data/pebble-module/configuration.properties b/test-server/hosts/demo2/modules_data/pebble-module/configuration.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/test-server/hosts/demo2/modules_data/thymeleaf-module/configuration.properties b/test-server/hosts/demo2/modules_data/thymeleaf-module/configuration.properties deleted file mode 100644 index e69de29b..00000000