Skip to content
Permalink
Browse files

Merge branch 'appng-1.19.x'

  • Loading branch information...
appng-buildmaster committed Jun 27, 2019
2 parents cc61fb5 + 4c4424b commit aae02de842968f826f515ace52d9fce952d9e103
Showing with 3,263 additions and 165 deletions.
  1. +2 −2 README.adoc
  2. +1 −1 appng-api/pom.xml
  3. +46 −0 appng-api/src/main/java/org/appng/api/RequestUtil.java
  4. +1 −1 appng-application-assembly/pom.xml
  5. +15 −15 appng-application-bom/pom.xml
  6. +1 −1 appng-application-camunda/pom.xml
  7. +2 −2 appng-application-parent/pom.xml
  8. +1 −1 appng-application/pom.xml
  9. +29 −1 appng-appngizer-jaxb/pom.xml
  10. +435 −0 appng-appngizer-jaxb/src/main/java/org/appng/appngizer/client/AppNGizer.java
  11. +477 −0 appng-appngizer-jaxb/src/main/java/org/appng/appngizer/client/AppNGizerClient.java
  12. +121 −0 appng-appngizer-jaxb/src/test/java/org/appng/appngizer/client/AppNGizerTest.java
  13. +262 −0 appng-appngizer-jaxb/src/test/resources/config/platform.json
  14. +238 −0 appng-appngizer-jaxb/src/test/resources/config/platform.yaml
  15. +733 −0 appng-appngizer-jaxb/src/test/resources/config/site.json
  16. +649 −0 appng-appngizer-jaxb/src/test/resources/config/site.yaml
  17. +6 −0 appng-appngizer-jaxb/src/test/resources/log4j.properties
  18. +1 −1 appng-appngizer-maven-plugin/pom.xml
  19. +1 −1 appng-appngizer/pom.xml
  20. +1 −1 appng-appngizer/src/main/asciidoc/parts/subject.adoc
  21. +2 −2 appng-appngizer/src/main/asciidoc/xml/subject-create.xml
  22. +1 −0 appng-appngizer/src/test/resources/xml/site-create.xml
  23. +1 −0 appng-appngizer/src/test/resources/xml/site-create2.xml
  24. +2 −2 appng-appngizer/src/test/resources/xml/site-property-list.xml
  25. +1 −0 appng-appngizer/src/test/resources/xml/site-update.xml
  26. +1 −1 appng-archetype-application/pom.xml
  27. +1 −1 appng-archetype-application/readme.txt
  28. +1 −1 appng-archetype-application/src/main/resources/archetype-resources/pom.xml
  29. +1 −1 appng-camunda/pom.xml
  30. +1 −1 appng-cli/pom.xml
  31. +1 −1 appng-core/pom.xml
  32. +16 −44 appng-core/src/main/java/org/appng/core/controller/Controller.java
  33. +5 −1 appng-core/src/main/java/org/appng/core/controller/Session.java
  34. +26 −15 appng-core/src/main/java/org/appng/core/controller/SessionListener.java
  35. +5 −0 appng-core/src/main/java/org/appng/core/controller/filter/PageCacheFilter.java
  36. +15 −3 appng-core/src/main/java/org/appng/core/controller/handler/ServiceRequestHandler.java
  37. +18 −4 appng-core/src/main/java/org/appng/core/model/AbstractRequestProcessor.java
  38. +3 −1 appng-core/src/main/java/org/appng/core/service/InitializerService.java
  39. +10 −8 appng-core/src/main/java/org/appng/core/service/LdapService.java
  40. +2 −2 appng-core/src/main/java/org/appng/core/service/PropertySupport.java
  41. +22 −1 appng-core/src/test/java/org/appng/core/controller/filter/PageCacheFilterTest.java
  42. +37 −9 appng-core/src/test/java/org/appng/core/controller/handler/ServiceRequestHandlerTest.java
  43. +2 −2 appng-core/src/test/resources/META-INF/persistence.xml
  44. +19 −4 appng-core/src/test/resources/WEB-INF/conf/ehcache.xml
  45. +2 −2 appng-core/src/test/resources/log4j.properties
  46. +1 −1 appng-documentation/pom.xml
  47. +4 −4 appng-documentation/src/main/asciidoc/listing/dependencies.txt
  48. +1 −1 appng-forms/pom.xml
  49. +1 −1 appng-formtags/pom.xml
  50. +1 −1 appng-mail/pom.xml
  51. +1 −1 appng-maven-plugin/pom.xml
  52. +1 −1 appng-persistence/pom.xml
  53. +1 −1 appng-rest-api/pom.xml
  54. +1 −1 appng-search/pom.xml
  55. +1 −1 appng-standalone/pom.xml
  56. +1 −1 appng-taglib/pom.xml
  57. +4 −4 appng-taglib/src/main/java/org/appng/taglib/MultiSiteSupport.java
  58. +1 −1 appng-template-assembly/pom.xml
  59. +2 −2 appng-template-parent/pom.xml
  60. +1 −1 appng-testsupport/pom.xml
  61. +1 −1 appng-tools/pom.xml
  62. +1 −1 appng-upngizr/README.adoc
  63. +1 −1 appng-upngizr/pom.xml
  64. +1 −1 appng-xmlapi/pom.xml
  65. +15 −2 changelog.txt
  66. +5 −4 pom.xml
@@ -1,6 +1,6 @@
image::https://www.aiticon.com/assets/images/appng_logo_760px.jpg[]
:snapshot: 1.19.1-SNAPSHOT
:stable: 1.19.0
:snapshot: 1.20.0-SNAPSHOT
:stable: 1.19.1
:current: {stable}
ifdef::env-github[]
:caution-caption: :fire:
@@ -11,7 +11,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -24,6 +24,7 @@

import org.appng.api.model.Properties;
import org.appng.api.model.Site;
import org.appng.api.model.Site.SiteState;

import lombok.extern.slf4j.Slf4j;

@@ -103,6 +104,51 @@ public static Site getSiteByName(Environment env, String name) {
return site;
}

/**
* Retrieves a {@link Site} by its name, waiting up to
* {@code Platform.Property#MAX_WAIT_TIME} milliseconds until it's state is {@code SiteState#STARTED}.
*
* @param env the current {@link Environment}
* @param name the name of the {@link Site}
* @return the {@link Site}, if any
*
* @see #getSiteByName(Environment, String)
* @see Site#hasState(SiteState...)
*/
public static Site waitForSite(Environment env, String name) {
Site site = getSiteByName(env, name);
if (null == site || site.hasState(SiteState.STARTED)) {
return site;
}

long waited = 0;
Properties platformProperties = env.getAttribute(Scope.PLATFORM, Platform.Environment.PLATFORM_CONFIG);
int waitTime = platformProperties.getInteger(Platform.Property.WAIT_TIME, 1000);
int maxWaitTime = platformProperties.getInteger(Platform.Property.MAX_WAIT_TIME, 30000);

while (waited < maxWaitTime
&& (site = getSiteByName(env, name)).hasState(SiteState.STOPPING, SiteState.STOPPED)) {
try {
Thread.sleep(waitTime);
waited += waitTime;
} catch (InterruptedException e) {
LOGGER.error("error while waiting for site to be started", e);
}
LOGGER.info("site '{}' is currently in state {}, waited {}ms", site, site.getState(), waited);
}

while (waited < maxWaitTime && (site = getSiteByName(env, name)).hasState(SiteState.STARTING)) {
try {
Thread.sleep(waitTime);
waited += waitTime;
} catch (InterruptedException e) {
LOGGER.error("error while waiting for site to be started", e);
}
LOGGER.info("site '{}' is currently being started, waited {}ms", site, waited);
}
return getSiteByName(env, name);
}

private static Map<String, Site> getSiteMap(Environment env) {
Map<String, Site> siteMap = env.getAttribute(Scope.PLATFORM, Platform.Environment.SITES);
return Collections.unmodifiableMap(siteMap);
@@ -8,7 +8,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.19.0</version>
<version>1.19.1</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.19.0</version>
<version>1.19.1</version>
<description>the bill of materials for an appNG application, defining all provided dependencies</description>
<organization>
<name>aiticon GmbH</name>
@@ -874,85 +874,85 @@
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-api</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-rest-api</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-camunda</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-cli</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-core</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-forms</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-formtags</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-mail</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-persistence</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-rest-api</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-search</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-taglib</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-tools</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.appng</groupId>
<artifactId>appng-xmlapi</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -10,7 +10,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.19.0</version>
<version>1.19.1</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.19.0</version>
<version>1.19.1</version>
<packaging>pom</packaging>
<name>appNG application parent</name>
<description>Parent pom for appNG applications</description>
@@ -113,7 +113,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<version>3.0.0-M3</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
@@ -10,7 +10,7 @@
<parent>
<groupId>org.appng</groupId>
<artifactId>appng-parent</artifactId>
<version>1.19.0</version>
<version>1.19.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

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

@@ -59,4 +59,32 @@
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jacksonVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit aae02de

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