Skip to content
Permalink
Browse files

Merge branch 'appng-1.20.x'

  • Loading branch information...
appng-buildmaster committed Sep 24, 2019
2 parents 2fb30bc + 9c5366c commit 0a2f421824c59d2899442a910088010826ad769e
Showing with 271 additions and 192 deletions.
  1. +2 −2 README.adoc
  2. +1 −1 appng-api/pom.xml
  3. +30 −9 appng-api/src/main/java/org/appng/api/support/ElementHelper.java
  4. +1 −1 appng-application-assembly/pom.xml
  5. +1 −1 appng-application-bom/pom.xml
  6. +1 −1 appng-application-camunda/pom.xml
  7. +1 −1 appng-application-parent/pom.xml
  8. +1 −1 appng-application/pom.xml
  9. +1 −1 appng-appngizer-jaxb/pom.xml
  10. +1 −1 appng-appngizer-maven-plugin/pom.xml
  11. +1 −1 appng-appngizer/pom.xml
  12. +1 −1 appng-archetype-application/pom.xml
  13. +1 −1 appng-archetype-application/readme.txt
  14. +1 −1 appng-archetype-application/src/main/resources/archetype-resources/pom.xml
  15. +42 −42 ...c/main/resources/archetype-resources/src/test/resources/xml/PersonActionTest-testCreatePerson.xml
  16. +47 −47 ...src/main/resources/archetype-resources/src/test/resources/xml/PersonActionTest-testEditPerson.xml
  17. +1 −1 appng-camunda/pom.xml
  18. +1 −1 appng-cli/pom.xml
  19. +1 −1 appng-core/pom.xml
  20. +3 −1 appng-core/src/main/java/org/appng/core/controller/PlatformConfig.java
  21. +22 −9 appng-core/src/main/java/org/appng/core/controller/handler/GuiHandler.java
  22. +4 −1 appng-core/src/main/java/org/appng/core/domain/DatabaseConnection.java
  23. +14 −2 appng-core/src/main/java/org/appng/core/domain/PlatformEventListener.java
  24. +55 −38 appng-core/src/main/java/org/appng/core/service/InitializerService.java
  25. +1 −0 appng-core/src/test/java/org/appng/core/domain/DatabaseTypeTest.java
  26. +1 −1 appng-documentation/pom.xml
  27. +4 −4 appng-documentation/src/main/asciidoc/listing/dependencies.txt
  28. +1 −1 appng-forms/pom.xml
  29. +1 −1 appng-formtags/pom.xml
  30. +1 −1 appng-mail/pom.xml
  31. +1 −1 appng-maven-plugin/pom.xml
  32. +1 −1 appng-persistence/pom.xml
  33. +3 −3 appng-persistence/src/main/java/org/appng/persistence/dialect/MySqlTextDialect.java
  34. +1 −1 appng-rest-api/pom.xml
  35. +1 −1 appng-search/pom.xml
  36. +1 −1 appng-standalone/pom.xml
  37. +1 −1 appng-taglib/pom.xml
  38. +1 −1 appng-template-assembly/pom.xml
  39. +2 −2 appng-template-parent/pom.xml
  40. +1 −1 appng-testsupport/pom.xml
  41. +1 −1 appng-tools/pom.xml
  42. +1 −1 appng-upngizr/README.adoc
  43. +1 −1 appng-upngizr/pom.xml
  44. +1 −1 appng-xmlapi/pom.xml
  45. +10 −0 changelog.txt
  46. +1 −1 pom.xml
@@ -1,6 +1,6 @@
image::https://www.aiticon.com/assets/images/appng_logo_760px.jpg[]
:snapshot: 1.20.2-SNAPSHOT
:stable: 1.20.1
:snapshot: 1.20.3-SNAPSHOT
:stable: 1.20.2
:current: {stable}
ifdef::env-github[]
:caution-caption: :fire:
@@ -11,7 +11,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -75,12 +75,10 @@
import lombok.extern.slf4j.Slf4j;

/**
*
* Utility class offering methods for proper initialization of {@link Linkpanel}s, {@link Link}s, {@link Navigation}/
* {@link NavigationItem}s, {@link BeanOption}s, {@link Param}s etc.
*
* @author Matthias Müller
*
*/
@Slf4j
public class ElementHelper {
@@ -214,7 +212,7 @@ public void initNavigation(ApplicationRequest applicationRequest, Path pathInfo,
* Builds {@link Options} from the given list of {@link BeanOption}s, without evaluation of parameter placeholders.
*
* @param beanOptions
* some {@link BeanOption}s
* some {@link BeanOption}s
* @return the {@link Options}
* @see #initOptions(List)
*/
@@ -238,7 +236,7 @@ Options getOptions(List<BeanOption> beanOptions) {
* Performs parameter-replacement for the given {@link BeanOption}s
*
* @param beanOptions
* some {@link BeanOption}s
* some {@link BeanOption}s
*/
void initOptions(List<BeanOption> beanOptions) {
if (null != beanOptions) {
@@ -380,10 +378,10 @@ void addTemplates(ApplicationConfigProvider applicationConfigProvider, Config co
executionParameters.put(param, postParam);
} else {
if (!existingValue.equals(postParam)) {
String message = "the parameter '" + param
+ "' is ambiguous, since it's a execution parameter for " + reference + " (value: '"
+ existingValue + "') and also POST-parameter (value: '" + postParam
+ "'). Avoid such overlapping parameters!";
String message = String.format(
"the parameter '%s' is ambiguous, since it's a execution parameter for '%s' (value: '%s') "
+ "and also POST-parameter (value: '%s''). Avoid such overlapping parameters!",
param, reference, existingValue, postParam);
LOGGER.warn(message);
// TODO APPNG-442
// throwing ProcessingException may be too aggressive here
@@ -397,7 +395,16 @@ void addTemplates(ApplicationConfigProvider applicationConfigProvider, Config co
return executionParameters;
}

static Messages addMessages(Environment environment, Messages messages) {
/**
* Adds some messages to the current session.
*
* @param environment
* the current {@link Environment}
* @param messages
* the {@link Messages} to add
* @return the messages for the current session
*/
public static Messages addMessages(Environment environment, Messages messages) {
Messages messagesFromSession = environment.getAttribute(SESSION, Session.Environment.MESSAGES);
if (messages.getMessageList().size() > 0) {
if (null == messagesFromSession) {
@@ -412,6 +419,13 @@ static Messages addMessages(Environment environment, Messages messages) {
return messagesFromSession;
}

/**
* Removes the messages from the current session.
*
* @param environment
* the current {@link Environment}
* @return the messages removed from the current session, if any
*/
public Messages removeMessages(Environment environment) {
Messages messages = environment.removeAttribute(SESSION, Session.Environment.MESSAGES);
if (LOGGER.isDebugEnabled() && null != messages) {
@@ -420,6 +434,13 @@ public Messages removeMessages(Environment environment) {
return messages;
}

/**
* Returns the messages for the current session.
*
* @param environment
* the current {@link Environment}
* @return the messages for the current session, if any
*/
public Messages getMessages(Environment environment) {
Messages messages = environment.getAttribute(SESSION, Session.Environment.MESSAGES);
if (LOGGER.isDebugEnabled() && null != messages) {
@@ -8,7 +8,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -5,7 +5,7 @@
<artifactId>appng-application-bom</artifactId>
<packaging>pom</packaging>
<name>appNG application BOM</name>
<version>1.20.1</version>
<version>1.20.2</version>
<description>the bill of materials for an appNG application, defining all provided dependencies</description>
<organization>
<name>aiticon GmbH</name>
@@ -10,7 +10,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.appng</groupId>
<artifactId>appng-application-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<packaging>pom</packaging>
<name>appNG application parent</name>
<description>Parent pom for appNG applications</description>
@@ -10,7 +10,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -9,7 +9,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -14,7 +14,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -9,7 +9,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -8,6 +8,6 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
</parent>
</project>
@@ -1,2 +1,2 @@
Usage:
mvn archetype:generate -DgroupId=mygroupid -DartifactId=myartifactid -DarchetypeGroupId=org.appng -DarchetypeArtifactId=appng-archetype-application -DarchetypeVersion=1.20.1 -DinteractiveMode=false
mvn archetype:generate -DgroupId=mygroupid -DartifactId=myartifactid -DarchetypeGroupId=org.appng -DarchetypeArtifactId=appng-archetype-application -DarchetypeVersion=1.20.2 -DinteractiveMode=false
@@ -9,7 +9,7 @@

<properties>
<outFolder>target</outFolder>
<appNG.version>1.20.1</appNG.version>
<appNG.version>1.20.2</appNG.version>
<displayName>myapplication</displayName>
<longDescription>enter long description here</longDescription>
<timestamp>${maven.build.timestamp}</timestamp>
@@ -1,45 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action xmlns="http://www.appng.org/schema/platform" id="createPerson" eventId="personEvent" async="false">
<config>
<title id="person.create">New Person</title>
<params>
<param name="form_action">createPerson</param>
</params>
<meta-data bindClass="${package}.Person">
<field name="lastname" type="text" binding="lastname">
<label id="lastname">Lastname</label>
<validation>
<notNull>
<message ref="lastname" class="ERROR">Field must not be empty</message>
</notNull>
</validation>
</field>
<field name="name" type="text" binding="name">
<label id="name">Name</label>
<validation>
<notNull>
<message ref="name" class="ERROR">Field must not be empty</message>
</notNull>
</validation>
</field>
</meta-data>
</config>
<condition expression="${dollar}{'createPerson' eq form_action}"/>
<messages>
<message ref="createPerson" class="OK">Person has been created!</message>
</messages>
<datasource id="newPerson"/>
<data>
<result>
<field name="lastname" type="text">
<value></value>
</field>
<field name="name" type="text">
<value></value>
</field>
</result>
</data>
<bean id="personAction">
<option name="action" id="create"/>
</bean>
<config>
<title id="person.create">New Person</title>
<params>
<param name="form_action">createPerson</param>
</params>
<meta-data bindClass="${package}.Person">
<field name="lastname" type="text" binding="lastname">
<label id="lastname">Lastname</label>
<validation>
<notNull>
<message ref="lastname" class="ERROR" code="{validation.notNull}">Field must not be empty</message>
</notNull>
</validation>
</field>
<field name="name" type="text" binding="name">
<label id="name">Name</label>
<validation>
<notNull>
<message ref="name" class="ERROR" code="{validation.notNull}">Field must not be empty</message>
</notNull>
</validation>
</field>
</meta-data>
</config>
<condition expression="${dollar}{'createPerson' eq form_action}" />
<messages>
<message ref="createPerson" class="OK">Person has been created!</message>
</messages>
<datasource id="newPerson" />
<data>
<result>
<field name="lastname" type="text">
<value></value>
</field>
<field name="name" type="text">
<value></value>
</field>
</result>
</data>
<bean id="personAction">
<option name="action" id="create" />
</bean>
</action>
@@ -1,50 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action xmlns="http://www.appng.org/schema/platform" id="editPerson" eventId="personEvent" async="false">
<config>
<title id="person.edit" params="${hash}{name},${hash}{lastname}">Edit Person: Luke the Duke Skywalker</title>
<params>
<param name="id">1</param>
<param name="form_action">editPerson</param>
</params>
<meta-data bindClass="${package}.Person">
<field name="lastname" type="text" binding="lastname">
<label id="lastname">Lastname</label>
<validation>
<notNull>
<message ref="lastname" class="ERROR">Field must not be empty</message>
</notNull>
</validation>
</field>
<field name="name" type="text" binding="name">
<label id="name">Name</label>
<validation>
<notNull>
<message ref="name" class="ERROR">Field must not be empty</message>
</notNull>
</validation>
</field>
</meta-data>
</config>
<condition expression="${dollar}{not empty id and 'editPerson' eq form_action}"/>
<messages>
<message ref="editPerson" class="OK">Person has been edited!</message>
</messages>
<datasource id="person">
<params>
<param name="id">1</param>
</params>
</datasource>
<data>
<result>
<field name="lastname" type="text">
<value>Skywalker</value>
</field>
<field name="name" type="text">
<value>Luke the Duke</value>
</field>
</result>
</data>
<bean id="personAction">
<option name="action" person="1" id="edit"/>
</bean>
<config>
<title id="person.edit" params="${hash}{name},${hash}{lastname}">Edit Person: Luke the Duke Skywalker</title>
<params>
<param name="id">1</param>
<param name="form_action">editPerson</param>
</params>
<meta-data bindClass="${package}.Person">
<field name="lastname" type="text" binding="lastname">
<label id="lastname">Lastname</label>
<validation>
<notNull>
<message ref="lastname" class="ERROR" code="{validation.notNull}">Field must not be empty</message>
</notNull>
</validation>
</field>
<field name="name" type="text" binding="name">
<label id="name">Name</label>
<validation>
<notNull>
<message ref="name" class="ERROR" code="{validation.notNull}">Field must not be empty</message>
</notNull>
</validation>
</field>
</meta-data>
</config>
<condition expression="${dollar}{not empty id and 'editPerson' eq form_action}" />
<messages>
<message ref="editPerson" class="OK">Person has been edited!</message>
</messages>
<datasource id="person">
<params>
<param name="id">1</param>
</params>
</datasource>
<data>
<result>
<field name="lastname" type="text">
<value>Skywalker</value>
</field>
<field name="name" type="text">
<value>Luke the Duke</value>
</field>
</result>
</data>
<bean id="personAction">
<option name="action" person="1" id="edit" />
</bean>
</action>
@@ -11,7 +11,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.20.1</version>
<version>1.20.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

0 comments on commit 0a2f421

Please sign in to comment.
You can’t perform that action at this time.