From 96fc17ab79cb4a6d8b90fb399f36a36c86471743 Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Mon, 7 Oct 2019 14:33:05 +0200 Subject: [PATCH 1/9] Add Nalu Elemento plugin --- nalu-plugin-elemento/.gitignore | 222 ++++++++++++++++++ nalu-plugin-elemento/pom.xml | 163 +++++++++++++ .../client/DefaultElemental2Logger.java | 35 +++ .../elemento/client/NaluPluginElemento.java | 141 +++++++++++ .../elemento/NaluPluginElemento.gwt.xml | 34 +++ pom.xml | 2 + 6 files changed, 597 insertions(+) create mode 100644 nalu-plugin-elemento/.gitignore create mode 100644 nalu-plugin-elemento/pom.xml create mode 100644 nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java create mode 100644 nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java create mode 100644 nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml diff --git a/nalu-plugin-elemento/.gitignore b/nalu-plugin-elemento/.gitignore new file mode 100644 index 000000000..ff1fa0599 --- /dev/null +++ b/nalu-plugin-elemento/.gitignore @@ -0,0 +1,222 @@ +# Created by .ignore support plugin (hsz.mobi) +### GWT template +*.class + +# gwt caches and compiled units # +war/gwt_bree/ +gwt-unitCache/ + +# boilerplate generated classes # +.apt_generated/ + +# more caches and things from deploy # +war/WEB-INF/deploy/ +war/WEB-INF/classes/ + +#compilation logs +.gwt/ + +#gwt junit compilation files +www-test/ + +#old GWT (1.5) created this dir +.gwt-tmp/ +### Java template +# Compiled class file + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +### Gradle template +.gradle +/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk +### Example user template template +### Example user template + +# IntelliJ project files +.idea +out +gen### Eclipse template + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet +### AppEngine template +# Google App Engine generated folder +appengine-generated/ +### Clojure template +/lib/ +/classes/ +/target/ +/checkouts/ +.lein-deps-sum +.lein-repl-history +.lein-plugins/ +.lein-failures +.nrepl-port +.cpcache/ +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests diff --git a/nalu-plugin-elemento/pom.xml b/nalu-plugin-elemento/pom.xml new file mode 100644 index 000000000..2254d84e5 --- /dev/null +++ b/nalu-plugin-elemento/pom.xml @@ -0,0 +1,163 @@ + + + + + + 4.0.0 + + + com.github.nalukit + nalu-parent + 1.3.3 + + + nalu-plugin-elemento + jar + Nalu's Elemento Plugin + + 2018 - 2019 + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + Frank Hossfeld + frankhossfeld + hossfeld@hossfeld-solutions.de + Hossfeld Solutions GmbH + + Java Developer + + + + + + scm:git@github.com:nalukit/nalu.git + scm:git:git@github.com:nalukit/nalu.git + scm:git:https://github.com/nalukit/nalu + + + + GitHub + https://github.com/nalukit/nalu/issues + + + + + + + + + + + + + + com.github.nalukit + nalu + ${project.version} + + + com.github.nalukit + nalu-plugin-core-web + ${project.version} + + + com.google.elemental2 + elemental2-core + ${elemental2.version} + + + com.google.elemental2 + elemental2-dom + ${elemental2.version} + + + org.jboss.gwt.elemento + elemento-core + ${elemento.version} + + + + + + + + + src/main/java + + **/nalu/** + + + + src/main/resources + + **/nalu/** + **/*.gwt.xml + **/*.html + **/public/** + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + ${maven.compiler.source} + ${maven.compiler.target} + true + true + 128m + 1024m + ${project.build.sourceEncoding} + + -Xlint:all + + + + + + + + + + + + + + + diff --git a/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java new file mode 100644 index 000000000..50f85b3a9 --- /dev/null +++ b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.github.nalukit.nalu.plugin.elemento.client; + +import com.github.nalukit.nalu.plugin.core.web.client.AbstractLogger; +import com.github.nalukit.nalu.plugin.core.web.client.NaluPluginCoreWeb; +import elemental2.dom.DomGlobal; + +public class DefaultElemental2Logger + extends AbstractLogger { + + static final String INDENT = ".."; + + public void log(String message, + int depth) { + if (NaluPluginCoreWeb.isSuperDevMode()) { + DomGlobal.window.console.log(createLog(message, + depth)); + } + } + +} diff --git a/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java new file mode 100644 index 000000000..7ce0cd65f --- /dev/null +++ b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.plugin.elemento.client; + +import com.github.nalukit.nalu.client.internal.PropertyFactory; +import com.github.nalukit.nalu.client.internal.route.ShellConfiguration; +import com.github.nalukit.nalu.client.plugin.IsNaluProcessorPlugin; +import com.github.nalukit.nalu.plugin.core.web.client.NaluPluginCoreWeb; +import com.github.nalukit.nalu.plugin.core.web.client.model.NaluStartModel; +import elemental2.core.Global; +import elemental2.dom.DomGlobal; +import elemental2.dom.Element; +import elemental2.dom.HTMLElement; +import org.jboss.gwt.elemento.core.IsElement; + +import java.util.Map; + +public class NaluPluginElemento + implements IsNaluProcessorPlugin { + + private NaluStartModel naluStartModel; + + /* RouteChangeHandler - to be used directly */ + /* in case Nalu does not have history support */ + private RouteChangeHandler routeChangeHandler; + + public NaluPluginElemento() { + super(); + } + + @Override + public void alert(String message) { + DomGlobal.window.alert(message); + } + + @Override + public boolean attach(String selector, + Object content) { + Element selectorElement = DomGlobal.document.querySelector("#" + selector); + if (selectorElement == null) { + return false; + } else { + if (content instanceof Iterable) { + Iterable elements = (Iterable) content; + for (Object element : elements) { + if (element instanceof IsElement) { + selectorElement.appendChild(((IsElement) element).element()); + } else if (element instanceof HTMLElement) { + selectorElement.appendChild(((HTMLElement) element)); + } + } + } else if (content instanceof IsElement) { + selectorElement.appendChild(((IsElement) content).element()); + } else if (content instanceof HTMLElement) { + selectorElement.appendChild(((HTMLElement) content)); + } + return true; + } + } + + @Override + public boolean confirm(String message) { + return DomGlobal.window.confirm(message); + } + + @Override + public String getStartRoute() { + return this.naluStartModel.getStartRoute(); + } + + @Override + public Map getQueryParameters() { + return this.naluStartModel.getQueryParameters(); + } + + @Override + public void register(RouteChangeHandler handler) { + if (PropertyFactory.get() + .hasHistory()) { + if (PropertyFactory.get() + .isUsingHash()) { + NaluPluginCoreWeb.addOnHashChangeHandler(handler); + } else { + NaluPluginCoreWeb.addPopStateHandler(handler, + PropertyFactory.get() + .getContextPath()); + } + } else { + this.routeChangeHandler = handler; + } + } + + @Override + public void remove(String selector) { + Element selectorElement = DomGlobal.document.querySelector("#" + selector); + if (selectorElement != null) { + if (selectorElement.childNodes.length > 0) { + for (int i = selectorElement.childNodes.asList() + .size() - 1; i > -1; i--) { + selectorElement.removeChild(selectorElement.childNodes.asList() + .get(i)); + } + } + } + } + + @Override + public void route(String newRoute, + boolean replace) { + NaluPluginCoreWeb.route(newRoute, + replace, + this.routeChangeHandler); + } + + @Override + public void initialize(ShellConfiguration shellConfiguration) { + // Sets the context path inside the PropertyFactory + NaluPluginCoreWeb.getContextPath(shellConfiguration); + this.naluStartModel = NaluPluginCoreWeb.getNaluStartModel(); + } + + @Override + public String decode(String route) { + return Global.decodeURI(route); + } + +} diff --git a/nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml b/nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml new file mode 100644 index 000000000..af9fe815f --- /dev/null +++ b/nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index ffa91dd93..37e8888f9 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,7 @@ nalu-processor nalu-plugin-core-web nalu-plugin-elemental2 + nalu-plugin-elemento nalu-plugin-gwt nalu-plugin-gwt-processor @@ -97,6 +98,7 @@ 1.8 1.0.0-RC1 + 0.9.1 0.12 1.6 From 32e3aac42a00b1a3387edc9d2a919a32aa66ce59 Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Thu, 17 Oct 2019 08:50:48 +0200 Subject: [PATCH 2/9] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e62faecda..6faf7dd68 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,17 @@ If the project uses a widget set based on Elemental2, Elemento or Domino-UI, use LATEST ``` -(This plugin is ready to use with J2CL / GWT 3) + +For Elemento there's a dedicated plugin which supports `org.jboss.gwt.elemento.core.IsElement` as widget type: +```XML + + com.github.nalukit + nalu-plugin-elemento + LATEST + +``` + +(These plugins are ready to use with J2CL / GWT 3) If the project uses a widget set based on GWT 2.8.2 or newer, use the **Nalu-Plugin-GWT** by adding the following lines to your pom: From 9abd473bf4df77002c211f07fc7e4e481f73a0d0 Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Mon, 7 Oct 2019 14:33:05 +0200 Subject: [PATCH 3/9] Add Nalu Elemento plugin --- nalu-plugin-elemento/.gitignore | 222 ++++++++++++++++++ nalu-plugin-elemento/pom.xml | 163 +++++++++++++ .../client/DefaultElemental2Logger.java | 35 +++ .../elemento/client/NaluPluginElemento.java | 141 +++++++++++ .../elemento/NaluPluginElemento.gwt.xml | 34 +++ pom.xml | 2 + 6 files changed, 597 insertions(+) create mode 100644 nalu-plugin-elemento/.gitignore create mode 100644 nalu-plugin-elemento/pom.xml create mode 100644 nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java create mode 100644 nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java create mode 100644 nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml diff --git a/nalu-plugin-elemento/.gitignore b/nalu-plugin-elemento/.gitignore new file mode 100644 index 000000000..ff1fa0599 --- /dev/null +++ b/nalu-plugin-elemento/.gitignore @@ -0,0 +1,222 @@ +# Created by .ignore support plugin (hsz.mobi) +### GWT template +*.class + +# gwt caches and compiled units # +war/gwt_bree/ +gwt-unitCache/ + +# boilerplate generated classes # +.apt_generated/ + +# more caches and things from deploy # +war/WEB-INF/deploy/ +war/WEB-INF/classes/ + +#compilation logs +.gwt/ + +#gwt junit compilation files +www-test/ + +#old GWT (1.5) created this dir +.gwt-tmp/ +### Java template +# Compiled class file + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +### Gradle template +.gradle +/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk +### Example user template template +### Example user template + +# IntelliJ project files +.idea +out +gen### Eclipse template + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet +### AppEngine template +# Google App Engine generated folder +appengine-generated/ +### Clojure template +/lib/ +/classes/ +/target/ +/checkouts/ +.lein-deps-sum +.lein-repl-history +.lein-plugins/ +.lein-failures +.nrepl-port +.cpcache/ +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests diff --git a/nalu-plugin-elemento/pom.xml b/nalu-plugin-elemento/pom.xml new file mode 100644 index 000000000..2254d84e5 --- /dev/null +++ b/nalu-plugin-elemento/pom.xml @@ -0,0 +1,163 @@ + + + + + + 4.0.0 + + + com.github.nalukit + nalu-parent + 1.3.3 + + + nalu-plugin-elemento + jar + Nalu's Elemento Plugin + + 2018 - 2019 + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + Frank Hossfeld + frankhossfeld + hossfeld@hossfeld-solutions.de + Hossfeld Solutions GmbH + + Java Developer + + + + + + scm:git@github.com:nalukit/nalu.git + scm:git:git@github.com:nalukit/nalu.git + scm:git:https://github.com/nalukit/nalu + + + + GitHub + https://github.com/nalukit/nalu/issues + + + + + + + + + + + + + + com.github.nalukit + nalu + ${project.version} + + + com.github.nalukit + nalu-plugin-core-web + ${project.version} + + + com.google.elemental2 + elemental2-core + ${elemental2.version} + + + com.google.elemental2 + elemental2-dom + ${elemental2.version} + + + org.jboss.gwt.elemento + elemento-core + ${elemento.version} + + + + + + + + + src/main/java + + **/nalu/** + + + + src/main/resources + + **/nalu/** + **/*.gwt.xml + **/*.html + **/public/** + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + ${maven.compiler.source} + ${maven.compiler.target} + true + true + 128m + 1024m + ${project.build.sourceEncoding} + + -Xlint:all + + + + + + + + + + + + + + + diff --git a/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java new file mode 100644 index 000000000..50f85b3a9 --- /dev/null +++ b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.github.nalukit.nalu.plugin.elemento.client; + +import com.github.nalukit.nalu.plugin.core.web.client.AbstractLogger; +import com.github.nalukit.nalu.plugin.core.web.client.NaluPluginCoreWeb; +import elemental2.dom.DomGlobal; + +public class DefaultElemental2Logger + extends AbstractLogger { + + static final String INDENT = ".."; + + public void log(String message, + int depth) { + if (NaluPluginCoreWeb.isSuperDevMode()) { + DomGlobal.window.console.log(createLog(message, + depth)); + } + } + +} diff --git a/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java new file mode 100644 index 000000000..7ce0cd65f --- /dev/null +++ b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/NaluPluginElemento.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.plugin.elemento.client; + +import com.github.nalukit.nalu.client.internal.PropertyFactory; +import com.github.nalukit.nalu.client.internal.route.ShellConfiguration; +import com.github.nalukit.nalu.client.plugin.IsNaluProcessorPlugin; +import com.github.nalukit.nalu.plugin.core.web.client.NaluPluginCoreWeb; +import com.github.nalukit.nalu.plugin.core.web.client.model.NaluStartModel; +import elemental2.core.Global; +import elemental2.dom.DomGlobal; +import elemental2.dom.Element; +import elemental2.dom.HTMLElement; +import org.jboss.gwt.elemento.core.IsElement; + +import java.util.Map; + +public class NaluPluginElemento + implements IsNaluProcessorPlugin { + + private NaluStartModel naluStartModel; + + /* RouteChangeHandler - to be used directly */ + /* in case Nalu does not have history support */ + private RouteChangeHandler routeChangeHandler; + + public NaluPluginElemento() { + super(); + } + + @Override + public void alert(String message) { + DomGlobal.window.alert(message); + } + + @Override + public boolean attach(String selector, + Object content) { + Element selectorElement = DomGlobal.document.querySelector("#" + selector); + if (selectorElement == null) { + return false; + } else { + if (content instanceof Iterable) { + Iterable elements = (Iterable) content; + for (Object element : elements) { + if (element instanceof IsElement) { + selectorElement.appendChild(((IsElement) element).element()); + } else if (element instanceof HTMLElement) { + selectorElement.appendChild(((HTMLElement) element)); + } + } + } else if (content instanceof IsElement) { + selectorElement.appendChild(((IsElement) content).element()); + } else if (content instanceof HTMLElement) { + selectorElement.appendChild(((HTMLElement) content)); + } + return true; + } + } + + @Override + public boolean confirm(String message) { + return DomGlobal.window.confirm(message); + } + + @Override + public String getStartRoute() { + return this.naluStartModel.getStartRoute(); + } + + @Override + public Map getQueryParameters() { + return this.naluStartModel.getQueryParameters(); + } + + @Override + public void register(RouteChangeHandler handler) { + if (PropertyFactory.get() + .hasHistory()) { + if (PropertyFactory.get() + .isUsingHash()) { + NaluPluginCoreWeb.addOnHashChangeHandler(handler); + } else { + NaluPluginCoreWeb.addPopStateHandler(handler, + PropertyFactory.get() + .getContextPath()); + } + } else { + this.routeChangeHandler = handler; + } + } + + @Override + public void remove(String selector) { + Element selectorElement = DomGlobal.document.querySelector("#" + selector); + if (selectorElement != null) { + if (selectorElement.childNodes.length > 0) { + for (int i = selectorElement.childNodes.asList() + .size() - 1; i > -1; i--) { + selectorElement.removeChild(selectorElement.childNodes.asList() + .get(i)); + } + } + } + } + + @Override + public void route(String newRoute, + boolean replace) { + NaluPluginCoreWeb.route(newRoute, + replace, + this.routeChangeHandler); + } + + @Override + public void initialize(ShellConfiguration shellConfiguration) { + // Sets the context path inside the PropertyFactory + NaluPluginCoreWeb.getContextPath(shellConfiguration); + this.naluStartModel = NaluPluginCoreWeb.getNaluStartModel(); + } + + @Override + public String decode(String route) { + return Global.decodeURI(route); + } + +} diff --git a/nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml b/nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml new file mode 100644 index 000000000..af9fe815f --- /dev/null +++ b/nalu-plugin-elemento/src/main/resources/com/github/nalukit/nalu/plugin/elemento/NaluPluginElemento.gwt.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 48ce881ed..e7f2bebdd 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,7 @@ nalu-processor nalu-plugin-core-web nalu-plugin-elemental2 + nalu-plugin-elemento nalu-plugin-gwt nalu-plugin-gwt-processor @@ -97,6 +98,7 @@ 1.8 1.0.0-RC1 + 0.9.1 0.12 1.6 From 946837807d31bd83d430314bd34b4887557a7895 Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Thu, 17 Oct 2019 08:50:48 +0200 Subject: [PATCH 4/9] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e62faecda..6faf7dd68 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,17 @@ If the project uses a widget set based on Elemental2, Elemento or Domino-UI, use LATEST ``` -(This plugin is ready to use with J2CL / GWT 3) + +For Elemento there's a dedicated plugin which supports `org.jboss.gwt.elemento.core.IsElement` as widget type: +```XML + + com.github.nalukit + nalu-plugin-elemento + LATEST + +``` + +(These plugins are ready to use with J2CL / GWT 3) If the project uses a widget set based on GWT 2.8.2 or newer, use the **Nalu-Plugin-GWT** by adding the following lines to your pom: From 86b3667adbddc04d361f2b63cc0663ccfdb414f8 Mon Sep 17 00:00:00 2001 From: Harald Pehl Date: Thu, 17 Oct 2019 09:00:23 +0200 Subject: [PATCH 5/9] Rename logger --- ...{DefaultElemental2Logger.java => DefaultElementoLogger.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/{DefaultElemental2Logger.java => DefaultElementoLogger.java} (96%) diff --git a/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElementoLogger.java similarity index 96% rename from nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java rename to nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElementoLogger.java index 50f85b3a9..d97a68e81 100644 --- a/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElemental2Logger.java +++ b/nalu-plugin-elemento/src/main/java/com/github/nalukit/nalu/plugin/elemento/client/DefaultElementoLogger.java @@ -19,7 +19,7 @@ import com.github.nalukit.nalu.plugin.core.web.client.NaluPluginCoreWeb; import elemental2.dom.DomGlobal; -public class DefaultElemental2Logger +public class DefaultElementoLogger extends AbstractLogger { static final String INDENT = ".."; From 9d69f7ae3bf44fe0747c8499a3c4005cbaa09b88 Mon Sep 17 00:00:00 2001 From: Frank Hossfeld Date: Fri, 18 Oct 2019 10:18:53 +0200 Subject: [PATCH 6/9] moded to version 1.3.5-SNAPSHOT & update docs --- README.md | 3 ++- nalu-plugin-core-web/pom.xml | 2 +- nalu-plugin-elemental2/pom.xml | 2 +- nalu-plugin-elemento/pom.xml | 2 +- nalu-plugin-gwt-processor/pom.xml | 2 +- .../nalukit/nalu/processor/NaluPluginGwtProcessor.java | 2 +- nalu-plugin-gwt/pom.xml | 2 +- nalu-processor/pom.xml | 4 +--- .../com/github/nalukit/nalu/processor/NaluProcessor.java | 2 +- .../github/nalukit/nalu/processor/ProcessorConstants.java | 6 ++---- ...plicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java | 2 +- .../ApplicationAnnotationOkWithLoaderImpl.java | 4 ++-- ...plicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java | 2 +- .../ApplicationAnnotationOkWithoutLoaderImpl.java | 2 +- .../MyApplicationImpl.java | 2 +- .../ApplicationWithComposite01Impl.java | 2 +- .../ApplicationWithComposite02Impl.java | 2 +- .../ApplicationWithComposite03Impl.java | 2 +- .../GenerateWithIsComponentCreatorImpl.java | 2 +- .../GenerateWithoutIsComponentCreatorImpl.java | 2 +- .../applicationWithTracker/ApplicationWithTrackerImpl.java | 4 ++-- nalu/pom.xml | 2 +- nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java | 2 +- .../test/java/com/github/nalukit/nalu/client/NaluTest.java | 2 +- .../client/NaluSimpleApplicationContext.java | 2 +- .../client/NaluSimpleApplicationContext.java | 2 +- pom.xml | 4 ++-- 27 files changed, 32 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 6faf7dd68..0549faf9d 100644 --- a/README.md +++ b/README.md @@ -120,8 +120,9 @@ For Elemento there's a dedicated plugin which supports `org.jboss.gwt.elemento.c LATEST ``` +The **nalu-plugin-elemento** can also be used with Domino-ui. -(These plugins are ready to use with J2CL / GWT 3) +**(These plugins are ready to use with J2CL / GWT 3)** If the project uses a widget set based on GWT 2.8.2 or newer, use the **Nalu-Plugin-GWT** by adding the following lines to your pom: diff --git a/nalu-plugin-core-web/pom.xml b/nalu-plugin-core-web/pom.xml index 4cf3e917d..bb07bdb96 100644 --- a/nalu-plugin-core-web/pom.xml +++ b/nalu-plugin-core-web/pom.xml @@ -23,7 +23,7 @@ com.github.nalukit nalu-parent - 1.3.4 + 1.3.5-SNAPSHOT nalu-plugin-core-web diff --git a/nalu-plugin-elemental2/pom.xml b/nalu-plugin-elemental2/pom.xml index b855d1350..b77107f46 100644 --- a/nalu-plugin-elemental2/pom.xml +++ b/nalu-plugin-elemental2/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.4 + 1.3.5-SNAPSHOT nalu-plugin-elemental2 diff --git a/nalu-plugin-elemento/pom.xml b/nalu-plugin-elemento/pom.xml index 2254d84e5..136eb630f 100644 --- a/nalu-plugin-elemento/pom.xml +++ b/nalu-plugin-elemento/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.3 + 1.3.5-SNAPSHOT nalu-plugin-elemento diff --git a/nalu-plugin-gwt-processor/pom.xml b/nalu-plugin-gwt-processor/pom.xml index d44aa60f8..627848462 100644 --- a/nalu-plugin-gwt-processor/pom.xml +++ b/nalu-plugin-gwt-processor/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.4 + 1.3.5-SNAPSHOT nalu-plugin-gwt-processor diff --git a/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java b/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java index 8e33e94f6..31a309672 100644 --- a/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java +++ b/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java @@ -60,7 +60,7 @@ public synchronized void init(ProcessingEnvironment processingEnv) { this.stopwatch = Stopwatch.createStarted(); setUp(); this.processorUtils.createNoteMessage("Nalu-Plugin-GWT-Processor started ..."); - this.processorUtils.createNoteMessage("Nalu-Plugin-GWT-Processor version >>1.3.4<<"); + this.processorUtils.createNoteMessage("Nalu-Plugin-GWT-Processor version >>1.3.5-SNAPSHOT<<"); } @Override diff --git a/nalu-plugin-gwt/pom.xml b/nalu-plugin-gwt/pom.xml index 8af03756d..f687df0d1 100644 --- a/nalu-plugin-gwt/pom.xml +++ b/nalu-plugin-gwt/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.4 + 1.3.5-SNAPSHOT nalu-plugin-gwt diff --git a/nalu-processor/pom.xml b/nalu-processor/pom.xml index e568e3977..050a038ea 100644 --- a/nalu-processor/pom.xml +++ b/nalu-processor/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.4 + 1.3.5-SNAPSHOT nalu-processor @@ -69,8 +69,6 @@ 0.10 1.0-rc6 - 0.8.0 - 2.8.5 1.11.1 1.0 diff --git a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java index 138639491..05b8a7c43 100644 --- a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java +++ b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java @@ -514,7 +514,7 @@ private void store(MetaModel model) } private String createRelativeFileName() { - return ProcessorConstants.META_INF + "/" + ProcessorConstants.NALU_REACT_FOLDER_NAME + "/" + NaluProcessor.APPLICATION_PROPERTIES; + return ProcessorConstants.META_INF + "/" + ProcessorConstants.NALU_FOLDER_NAME + "/" + NaluProcessor.APPLICATION_PROPERTIES; } } diff --git a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java index a60c8134e..2edc940a1 100644 --- a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java +++ b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java @@ -23,12 +23,10 @@ public class ProcessorConstants { public final static String META_DATA = "MetaData"; public final static String META_INF = "META-INF"; - public final static String NALU_REACT_FOLDER_NAME = "nalu-route"; + public final static String NALU_FOLDER_NAME = "nalu-route"; public final static String PARAMETER_DELIMITER = "_pPp_"; - public final static String TYPE_DELIMITER = "_tTt_"; - public final static String PROPERTIES_POSTFIX = ".properties"; public final static String CREATOR_IMPL = "CreatorImpl"; public final static String PLUGIN_IMPL = "PluginImpl"; - public final static String PROCESSOR_VERSION = "1.3.4"; + public final static String PROCESSOR_VERSION = "1.3.5-SNAPSHOT"; public final static String BUILD_TIME = new SimpleDateFormat("yyyy.MM.dd-HH:mm:ss").format(new Date(System.currentTimeMillis())); } diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java index 2fc44692a..5d346baa4 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java @@ -25,7 +25,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java index a0499ca5e..f4a17d2e7 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java @@ -14,7 +14,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.4<< at >>2019.08.24-11:05:47<< */ + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.08.24-11:05:47<< */ public final class ApplicationAnnotationOkWithLoaderImpl extends AbstractApplication implements ApplicationAnnotationOkWithLoader { public ApplicationAnnotationOkWithLoaderImpl() { super(); @@ -26,7 +26,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java index 9608fadc7..c1972e14e 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java @@ -25,7 +25,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java index 944bacf61..16c4bada9 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java @@ -24,7 +24,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java index 28bc30994..3348b3edb 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java @@ -25,7 +25,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java index 3759fd93e..ee0945e6e 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java @@ -27,7 +27,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java index 031a2e9db..fe0a76c2a 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java @@ -28,7 +28,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java index 5e2987fb1..11bc77004 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java @@ -28,7 +28,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java index 6794cffe0..e8116f4ab 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java @@ -24,7 +24,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java index 9164aa294..14d6cf5c4 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java @@ -24,7 +24,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java index fa1a1e212..b067616d3 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java @@ -15,7 +15,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.4<< at >>2019.08.24-11:32:39<< */ + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.08.24-11:32:39<< */ public final class ApplicationWithTrackerImpl extends AbstractApplication implements ApplicationWithTracker { public ApplicationWithTrackerImpl() { super(); @@ -27,7 +27,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.4<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu/pom.xml b/nalu/pom.xml index bf43ba538..1ff2fe9d9 100644 --- a/nalu/pom.xml +++ b/nalu/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.4 + 1.3.5-SNAPSHOT nalu diff --git a/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java b/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java index c537d8e55..74f876608 100644 --- a/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java +++ b/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java @@ -22,7 +22,7 @@ public class Nalu { public static String getVersion() { - return "1.3.4"; + return "1.3.5-SNAPSHOT"; } public static boolean hasHistory() { diff --git a/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java b/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java index 60b4e148b..04f485086 100644 --- a/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java +++ b/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java @@ -8,7 +8,7 @@ public class NaluTest { @Test void getVersion() { - Assertions.assertEquals("1.3.4", + Assertions.assertEquals("1.3.5-SNAPSHOT", Nalu.getVersion()); } diff --git a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java index 41c780d28..a9e495f25 100644 --- a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java +++ b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java @@ -31,7 +31,7 @@ public class NaluSimpleApplicationContext private String searchCity; public NaluSimpleApplicationContext() { - this.version = "1.3.4"; + this.version = "1.3.5-SNAPSHOT"; } public String getVersion() { diff --git a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java index 705fb05d6..974260ad9 100644 --- a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java +++ b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java @@ -31,7 +31,7 @@ public class NaluSimpleApplicationContext private String searchCity; public NaluSimpleApplicationContext() { - this.version = "1.3.4"; + this.version = "1.3.5-SNAPSHOT"; } public String getVersion() { diff --git a/pom.xml b/pom.xml index e7f2bebdd..21b97434a 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ com.github.nalukit nalu-parent - 1.3.4 + 1.3.5-SNAPSHOT pom nalu-parent @@ -98,7 +98,7 @@ 1.8 1.0.0-RC1 - 0.9.1 + 0.9.3 0.12 1.6 From 44d772d4de4ff2b1f3131208cd4576d2267dfe6d Mon Sep 17 00:00:00 2001 From: Frank Hossfeld Date: Wed, 23 Oct 2019 12:27:12 +0200 Subject: [PATCH 7/9] #100 - Problem using the same composite conditional over two composite routes --- .../generator/ControllerGenerator.java | 59 +++++- .../nalu/processor/test/ApplicationTest.java | 108 ++++++++++ .../ApplicationWithComposite02Impl.java | 8 +- .../ApplicationWithComposite03Impl.java | 8 +- .../ApplicationWithComposite04.java | 28 +++ .../ApplicationWithComposite04Impl.java | 166 +++++++++++++++ .../ApplicationWithComposite05.java | 28 +++ .../ApplicationWithComposite05Impl.java | 163 +++++++++++++++ .../ApplicationWithComposite06.java | 28 +++ .../ApplicationWithComposite06Impl.java | 182 ++++++++++++++++ .../ApplicationWithComposite07.java | 28 +++ .../ApplicationWithComposite07Impl.java | 197 ++++++++++++++++++ .../Component04.java | 33 +++ .../CompositeCondition01.java | 16 ++ .../CompositeCondition02.java | 16 ++ .../ControllerWithComposite04.java | 51 +++++ .../IComponent04.java | 29 +++ .../composite/CompositeComponent03.java | 33 +++ .../composite/CompositeComponent04.java | 33 +++ .../composite/CompositeController03.java | 37 ++++ .../composite/CompositeController04.java | 37 ++++ .../composite/ICompositeComponent03.java | 29 +++ .../composite/ICompositeComponent04.java | 29 +++ .../Component05.java | 33 +++ .../CompositeCondition01.java | 16 ++ .../ControllerWithComposite05.java | 51 +++++ .../IComponent05.java | 29 +++ .../composite/CompositeComponent03.java | 33 +++ .../composite/CompositeComponent04.java | 33 +++ .../composite/CompositeController03.java | 37 ++++ .../composite/CompositeController04.java | 37 ++++ .../composite/ICompositeComponent03.java | 29 +++ .../composite/ICompositeComponent04.java | 29 +++ .../Component05.java | 33 +++ .../Component06.java | 33 +++ .../CompositeCondition01.java | 16 ++ .../ControllerWithComposite05.java | 51 +++++ .../ControllerWithComposite06.java | 51 +++++ .../IComponent05.java | 29 +++ .../IComponent06.java | 29 +++ .../composite/CompositeComponent03.java | 33 +++ .../composite/CompositeComponent04.java | 33 +++ .../composite/CompositeController03.java | 37 ++++ .../composite/CompositeController04.java | 37 ++++ .../composite/ICompositeComponent03.java | 29 +++ .../composite/ICompositeComponent04.java | 29 +++ .../Component05.java | 33 +++ .../Component06.java | 33 +++ .../CompositeCondition01.java | 16 ++ .../CompositeCondition02.java | 16 ++ .../ControllerWithComposite05.java | 56 +++++ .../ControllerWithComposite06.java | 55 +++++ .../IComponent05.java | 29 +++ .../IComponent06.java | 29 +++ .../composite/CompositeComponent03.java | 33 +++ .../composite/CompositeComponent04.java | 33 +++ .../composite/CompositeComponent05.java | 33 +++ .../composite/CompositeController03.java | 37 ++++ .../composite/CompositeController04.java | 37 ++++ .../composite/CompositeController05.java | 37 ++++ .../composite/ICompositeComponent03.java | 29 +++ .../composite/ICompositeComponent04.java | 29 +++ .../composite/ICompositeComponent05.java | 29 +++ 63 files changed, 2663 insertions(+), 14 deletions(-) create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/Component04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition01.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition02.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/ControllerWithComposite04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/IComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/Component05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/CompositeCondition01.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/ControllerWithComposite05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/IComponent05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component06.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/CompositeCondition01.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite06.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent06.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component06.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition01.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition02.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite06.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent06.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController05.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent03.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent04.java create mode 100644 nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent05.java diff --git a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/generator/ControllerGenerator.java b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/generator/ControllerGenerator.java index af259da14..3c396b35c 100644 --- a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/generator/ControllerGenerator.java +++ b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/generator/ControllerGenerator.java @@ -22,6 +22,7 @@ import com.github.nalukit.nalu.client.internal.route.RouteConfig; import com.github.nalukit.nalu.processor.ProcessorConstants; import com.github.nalukit.nalu.processor.model.MetaModel; +import com.github.nalukit.nalu.processor.model.intern.ClassNameModel; import com.github.nalukit.nalu.processor.model.intern.ControllerModel; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.MethodSpec; @@ -30,7 +31,9 @@ import javax.lang.model.element.Modifier; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.IntStream; public class ControllerGenerator { @@ -39,6 +42,8 @@ public class ControllerGenerator { private TypeSpec.Builder typeSpec; + private Map variableCounterMap; + @SuppressWarnings("unused") private ControllerGenerator() { } @@ -46,6 +51,8 @@ private ControllerGenerator() { private ControllerGenerator(Builder builder) { this.metaModel = builder.metaModel; this.typeSpec = builder.typeSpec; + + this.variableCounterMap = new HashMap<>(); } public static Builder builder() { @@ -109,22 +116,31 @@ private void generateLoadControllers() { controllerCompositeModel.getComposite() .getSimpleName()); } else { - if (!generatedConditionClassNames.contains(controllerCompositeModel.getCondition() - .getClassName())) { + String conditionVariableName; + if (generatedConditionClassNames.contains(controllerCompositeModel.getCondition() + .getClassName())) { + conditionVariableName = this.setFirstCharacterToLowerCase(controllerCompositeModel.getCondition() + .getSimpleName()) + + this.getNameWithVariableCount(controllerCompositeModel.getCondition(), + false); + } else { + conditionVariableName = this.setFirstCharacterToLowerCase(controllerCompositeModel.getCondition() + .getSimpleName()) + + this.getNameWithVariableCount(controllerCompositeModel.getCondition(), + true); + loadComponentsMethodBuilder.addStatement("$T $L = new $T()", ClassName.get(controllerCompositeModel.getCondition() .getPackage(), controllerCompositeModel.getCondition() .getSimpleName()), - this.setFirstCharacterToLowerCase(controllerCompositeModel.getCondition() - .getSimpleName()), + conditionVariableName, ClassName.get(controllerCompositeModel.getCondition() .getPackage(), controllerCompositeModel.getCondition() .getSimpleName())) .addStatement("$L.setContext(super.context)", - this.setFirstCharacterToLowerCase(controllerCompositeModel.getCondition() - .getSimpleName())); + conditionVariableName); // remember generated condition to avoid creating the same class again! generatedConditionClassNames.add(controllerCompositeModel.getCondition() .getClassName()); @@ -141,8 +157,7 @@ private void generateLoadControllers() { "." + controllerCompositeModel.getComposite() .getSimpleName(), - this.setFirstCharacterToLowerCase(controllerCompositeModel.getCondition() - .getSimpleName())); + conditionVariableName); } }); } @@ -237,6 +252,34 @@ private String setFirstCharacterToLowerCase(String className) { .toLowerCase() + className.substring(1); } + /** + * Created a String with a number at the end to get unique condition + * variable names + * + * @param classNameModel the condition class name + * @return uniques string with number + */ + private String getNameWithVariableCount(ClassNameModel classNameModel, + boolean createNew) { + if (createNew) { + // new condition class! + if (this.variableCounterMap.get(classNameModel.getClassName()) == null) { + this.variableCounterMap.put(classNameModel.getClassName(), + 1); + return "_1"; + } + // already used condition class + Integer counter = this.variableCounterMap.get(classNameModel.getClassName()); + Integer newCounter = counter + 1; + this.variableCounterMap.put(classNameModel.getClassName(), + newCounter); + return "_" + newCounter; + } else { + Integer count = this.variableCounterMap.get(classNameModel.getClassName()); + return "_" + count; + } + } + public static final class Builder { MetaModel metaModel; diff --git a/nalu-processor/src/test/java/com/github/nalukit/nalu/processor/test/ApplicationTest.java b/nalu-processor/src/test/java/com/github/nalukit/nalu/processor/test/ApplicationTest.java index 9e6777a18..40186309b 100644 --- a/nalu-processor/src/test/java/com/github/nalukit/nalu/processor/test/ApplicationTest.java +++ b/nalu-processor/src/test/java/com/github/nalukit/nalu/processor/test/ApplicationTest.java @@ -24,6 +24,7 @@ import javax.tools.JavaFileObject; import java.util.ArrayList; +import java.util.Arrays; import static com.google.testing.compile.Compiler.javac; @@ -248,6 +249,7 @@ void testApplicationWithComposite03() { add(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite03/Component03.java")); add(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite03/composite/CompositeController03.java")); add(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite03/composite/ICompositeComponent03.java")); + add(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite03/CompositeCondition03.java")); add(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite03/composite/CompositeComponent03.java")); add(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03.java")); @@ -260,4 +262,110 @@ void testApplicationWithComposite03() { .hasSourceEquivalentTo(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java")); } + @Test + void testApplicationWithTwoCompositeAndDifferentConditions() { + Compilation compilation = javac().withProcessors(new NaluProcessor()) + .compile(Arrays.asList(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/ControllerWithComposite04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/MockContext.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/MockShell.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/IComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/Component04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition01.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition02.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04.java"))); + CompilationSubject.assertThat(compilation) + .succeeded(); + CompilationSubject.assertThat(compilation) + .generatedSourceFile("com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl") + .hasSourceEquivalentTo(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java")); + } + + @Test + void testApplicationWithTwoCompositeAndSameConditions() { + Compilation compilation = javac().withProcessors(new NaluProcessor()) + .compile(Arrays.asList(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/ControllerWithComposite05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/MockContext.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/MockShell.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/IComponent05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/Component05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/CompositeCondition01.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05.java"))); + CompilationSubject.assertThat(compilation) + .succeeded(); + CompilationSubject.assertThat(compilation) + .generatedSourceFile("com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl") + .hasSourceEquivalentTo(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java")); + } + + @Test + void testApplicationWithTwoControllersAndTwoCompositeAndSameConditions_1() { + Compilation compilation = javac().withProcessors(new NaluProcessor()) + .compile(Arrays.asList(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite06.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/MockContext.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/MockShell.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/CompositeCondition01.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent06.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component06.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06.java") + + )); + CompilationSubject.assertThat(compilation) + .succeeded(); + CompilationSubject.assertThat(compilation) + .generatedSourceFile("com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl") + .hasSourceEquivalentTo(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java")); + } + + @Test + void testApplicationWithTwoControllersAndTwoCompositeAndSameConditions_2() { + Compilation compilation = javac().withProcessors(new NaluProcessor()) + .compile(Arrays.asList(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite06.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/MockContext.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/MockShell.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition01.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent06.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component06.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent03.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent04.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent05.java"), + JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07.java") + + )); + CompilationSubject.assertThat(compilation) + .succeeded(); + CompilationSubject.assertThat(compilation) + .generatedSourceFile("com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl") + .hasSourceEquivalentTo(JavaFileObjects.forResource("com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java")); + } + } diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java index fe0a76c2a..007153c66 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java @@ -17,6 +17,8 @@ import java.lang.StringBuilder; import java.util.Arrays; +/** + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:16:08<< */ public final class ApplicationWithComposite02Impl extends AbstractApplication implements ApplicationWithComposite02 { public ApplicationWithComposite02Impl() { super(); @@ -71,9 +73,9 @@ public void loadComponents() { // create ControllerCreator for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02 ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02CreatorImpl(router, context, eventBus)); // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02 - CompositeCondition02 compositeCondition02 = new CompositeCondition02(); - compositeCondition02.setContext(super.context); - ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.composite.CompositeController02", compositeCondition02); + CompositeCondition02 compositeCondition02_1 = new CompositeCondition02(); + compositeCondition02_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.ControllerWithComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite02.composite.CompositeController02", compositeCondition02_1); } @Override diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java index 11bc77004..a1002d19a 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java @@ -17,6 +17,8 @@ import java.lang.StringBuilder; import java.util.Arrays; +/** + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:17:09<< */ public final class ApplicationWithComposite03Impl extends AbstractApplication implements ApplicationWithComposite03 { public ApplicationWithComposite03Impl() { super(); @@ -72,9 +74,9 @@ public void loadComponents() { ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.ControllerWithComposite03", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.ControllerWithComposite03CreatorImpl(router, context, eventBus)); // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.ControllerWithComposite03 ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.ControllerWithComposite03", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.composite.CompositeController01", super.alwaysLoadComposite); - CompositeCondition03 compositeCondition03 = new CompositeCondition03(); - compositeCondition03.setContext(super.context); - ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.ControllerWithComposite03", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.composite.CompositeController03", compositeCondition03); + CompositeCondition03 compositeCondition03_1 = new CompositeCondition03(); + compositeCondition03_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.ControllerWithComposite03", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite03.composite.CompositeController03", compositeCondition03_1); } @Override diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04.java new file mode 100644 index 000000000..251b21154 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite04; + +import com.github.nalukit.nalu.client.application.IsApplication; +import com.github.nalukit.nalu.client.application.annotation.Application; +import com.github.nalukit.nalu.processor.common.MockContext; + +@Application(startRoute = "/mockShell/route04", + context = MockContext.class, + routeError = "/mockShell/route04") +public interface ApplicationWithComposite04 + extends IsApplication { +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java new file mode 100644 index 000000000..b48037159 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java @@ -0,0 +1,166 @@ +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite04; + +import com.github.nalukit.nalu.client.application.IsApplicationLoader; +import com.github.nalukit.nalu.client.internal.ClientLogger; +import com.github.nalukit.nalu.client.internal.CompositeControllerReference; +import com.github.nalukit.nalu.client.internal.application.AbstractApplication; +import com.github.nalukit.nalu.client.internal.application.CompositeFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerCompositeConditionFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerFactory; +import com.github.nalukit.nalu.client.internal.application.ShellFactory; +import com.github.nalukit.nalu.client.internal.route.RouteConfig; +import com.github.nalukit.nalu.client.internal.route.ShellConfig; +import com.github.nalukit.nalu.client.tracker.IsTracker; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.CompositeCondition01; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.CompositeCondition02; +import java.lang.Override; +import java.lang.StringBuilder; +import java.util.Arrays; + +/** + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:19:16<< */ +public final class ApplicationWithComposite04Impl extends AbstractApplication implements ApplicationWithComposite04 { + public ApplicationWithComposite04Impl() { + super(); + super.context = new com.github.nalukit.nalu.processor.common.MockContext(); + } + + @Override + public void logProcessorVersion() { + ClientLogger.get().logDetailed("", 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + StringBuilder sb01 = new StringBuilder(); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + ClientLogger.get().logDetailed(sb01.toString(), 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + ClientLogger.get().logDetailed("", 0); + } + + @Override + public void loadDebugConfiguration() { + } + + @Override + public IsTracker loadTrackerConfiguration() { + return null; + } + + @Override + public void loadShells() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load shell references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.shellConfiguration.getShells().add(new ShellConfig("/mockShell", "com.github.nalukit.nalu.processor.common.MockShell")); + sb01 = new StringBuilder(); + sb01.append("register shell >>/mockShell<< with class >>com.github.nalukit.nalu.processor.common.MockShell<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadShellFactory() { + // create ShellCreator for: com.github.nalukit.nalu.processor.common.MockShell + ShellFactory.get().registerShell("com.github.nalukit.nalu.processor.common.MockShell", new com.github.nalukit.nalu.processor.common.MockShellCreatorImpl(router, context, eventBus)); + } + + @Override + public void loadCompositeController() { + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController03 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController03", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController03CreatorImpl(router, context, eventBus)); + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController04 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController04", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController04CreatorImpl(router, context, eventBus)); + } + + @Override + public void loadComponents() { + // create ControllerCreator for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04 + ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04CreatorImpl(router, context, eventBus)); + // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04 + CompositeCondition01 compositeCondition01_1 = new CompositeCondition01(); + compositeCondition01_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController03", compositeCondition01_1); + CompositeCondition02 compositeCondition02_1 = new CompositeCondition02(); + compositeCondition02_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController04", compositeCondition02_1); + } + + @Override + public void loadRoutes() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load routes"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route04/*", Arrays.asList(new String[]{"parameter04"}), "selector04", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04")); + sb01 = new StringBuilder(); + sb01.append("register route >>/mockShell/route04/*<< with parameter >>parameter04<< for selector >>selector04<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPopUpControllerFactory() { + } + + @Override + public void loadFilters() { + } + + @Override + public void loadHandlers() { + } + + @Override + public void loadCompositeReferences() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load composite references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04", "testComposite03", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController03", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite03<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04", "testComposite04", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController04", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite04<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.ControllerWithComposite04<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPlugins() { + StringBuilder sb01 = new StringBuilder(); + } + + @Override + public IsApplicationLoader getApplicationLoader() { + return null; + } + + @Override + public void loadDefaultRoutes() { + StringBuilder sb01 = new StringBuilder(); + this.startRoute = "/mockShell/route04"; + sb01.append("found startRoute >>/mockShell/route04<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + sb01 = new StringBuilder(); + this.errorRoute = "/mockShell/route04"; + sb01.append("found errorRoute >>/mockShell/route04<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + } + + @Override + public boolean hasHistory() { + return true; + } + + @Override + public boolean isUsingHash() { + return true; + } + + @Override + public boolean isUsingColonForParametersInUrl() { + return false; + } + + @Override + public boolean isStayOnSide() { + return false; + } +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05.java new file mode 100644 index 000000000..d4b62e449 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite05; + +import com.github.nalukit.nalu.client.application.IsApplication; +import com.github.nalukit.nalu.client.application.annotation.Application; +import com.github.nalukit.nalu.processor.common.MockContext; + +@Application(startRoute = "/mockShell/route05", + context = MockContext.class, + routeError = "/mockShell/route05") +public interface ApplicationWithComposite05 + extends IsApplication { +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java new file mode 100644 index 000000000..ccc710da1 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java @@ -0,0 +1,163 @@ +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite05; + +import com.github.nalukit.nalu.client.application.IsApplicationLoader; +import com.github.nalukit.nalu.client.internal.ClientLogger; +import com.github.nalukit.nalu.client.internal.CompositeControllerReference; +import com.github.nalukit.nalu.client.internal.application.AbstractApplication; +import com.github.nalukit.nalu.client.internal.application.CompositeFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerCompositeConditionFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerFactory; +import com.github.nalukit.nalu.client.internal.application.ShellFactory; +import com.github.nalukit.nalu.client.internal.route.RouteConfig; +import com.github.nalukit.nalu.client.internal.route.ShellConfig; +import com.github.nalukit.nalu.client.tracker.IsTracker; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.CompositeCondition01; +import java.lang.Override; +import java.lang.StringBuilder; +import java.util.Arrays; + +/** + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:20:16<< */ +public final class ApplicationWithComposite05Impl extends AbstractApplication implements ApplicationWithComposite05 { + public ApplicationWithComposite05Impl() { + super(); + super.context = new com.github.nalukit.nalu.processor.common.MockContext(); + } + + @Override + public void logProcessorVersion() { + ClientLogger.get().logDetailed("", 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + StringBuilder sb01 = new StringBuilder(); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + ClientLogger.get().logDetailed(sb01.toString(), 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + ClientLogger.get().logDetailed("", 0); + } + + @Override + public void loadDebugConfiguration() { + } + + @Override + public IsTracker loadTrackerConfiguration() { + return null; + } + + @Override + public void loadShells() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load shell references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.shellConfiguration.getShells().add(new ShellConfig("/mockShell", "com.github.nalukit.nalu.processor.common.MockShell")); + sb01 = new StringBuilder(); + sb01.append("register shell >>/mockShell<< with class >>com.github.nalukit.nalu.processor.common.MockShell<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadShellFactory() { + // create ShellCreator for: com.github.nalukit.nalu.processor.common.MockShell + ShellFactory.get().registerShell("com.github.nalukit.nalu.processor.common.MockShell", new com.github.nalukit.nalu.processor.common.MockShellCreatorImpl(router, context, eventBus)); + } + + @Override + public void loadCompositeController() { + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController03 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController03", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController03CreatorImpl(router, context, eventBus)); + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController04 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController04", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController04CreatorImpl(router, context, eventBus)); + } + + @Override + public void loadComponents() { + // create ControllerCreator for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05 + ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05CreatorImpl(router, context, eventBus)); + // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05 + CompositeCondition01 compositeCondition01_1 = new CompositeCondition01(); + compositeCondition01_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController03", compositeCondition01_1); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController04", compositeCondition01_1); + } + + @Override + public void loadRoutes() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load routes"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route05/*", Arrays.asList(new String[]{"parameter05"}), "selector05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05")); + sb01 = new StringBuilder(); + sb01.append("register route >>/mockShell/route05/*<< with parameter >>parameter05<< for selector >>selector05<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPopUpControllerFactory() { + } + + @Override + public void loadFilters() { + } + + @Override + public void loadHandlers() { + } + + @Override + public void loadCompositeReferences() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load composite references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05", "testComposite01", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController03", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite01<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05", "testComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController04", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite02<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.ControllerWithComposite05<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPlugins() { + StringBuilder sb01 = new StringBuilder(); + } + + @Override + public IsApplicationLoader getApplicationLoader() { + return null; + } + + @Override + public void loadDefaultRoutes() { + StringBuilder sb01 = new StringBuilder(); + this.startRoute = "/mockShell/route05"; + sb01.append("found startRoute >>/mockShell/route05<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + sb01 = new StringBuilder(); + this.errorRoute = "/mockShell/route05"; + sb01.append("found errorRoute >>/mockShell/route05<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + } + + @Override + public boolean hasHistory() { + return true; + } + + @Override + public boolean isUsingHash() { + return true; + } + + @Override + public boolean isUsingColonForParametersInUrl() { + return false; + } + + @Override + public boolean isStayOnSide() { + return false; + } +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06.java new file mode 100644 index 000000000..780627f13 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite06; + +import com.github.nalukit.nalu.client.application.IsApplication; +import com.github.nalukit.nalu.client.application.annotation.Application; +import com.github.nalukit.nalu.processor.common.MockContext; + +@Application(startRoute = "/mockShell/route06", + context = MockContext.class, + routeError = "/mockShell/route06") +public interface ApplicationWithComposite06 + extends IsApplication { +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java new file mode 100644 index 000000000..8a4622edd --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java @@ -0,0 +1,182 @@ +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite06; + +import com.github.nalukit.nalu.client.application.IsApplicationLoader; +import com.github.nalukit.nalu.client.internal.ClientLogger; +import com.github.nalukit.nalu.client.internal.CompositeControllerReference; +import com.github.nalukit.nalu.client.internal.application.AbstractApplication; +import com.github.nalukit.nalu.client.internal.application.CompositeFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerCompositeConditionFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerFactory; +import com.github.nalukit.nalu.client.internal.application.ShellFactory; +import com.github.nalukit.nalu.client.internal.route.RouteConfig; +import com.github.nalukit.nalu.client.internal.route.ShellConfig; +import com.github.nalukit.nalu.client.tracker.IsTracker; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.CompositeCondition01; +import java.lang.Override; +import java.lang.StringBuilder; +import java.util.Arrays; + +/** + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:20:50<< */ +public final class ApplicationWithComposite06Impl extends AbstractApplication implements ApplicationWithComposite06 { + public ApplicationWithComposite06Impl() { + super(); + super.context = new com.github.nalukit.nalu.processor.common.MockContext(); + } + + @Override + public void logProcessorVersion() { + ClientLogger.get().logDetailed("", 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + StringBuilder sb01 = new StringBuilder(); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + ClientLogger.get().logDetailed(sb01.toString(), 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + ClientLogger.get().logDetailed("", 0); + } + + @Override + public void loadDebugConfiguration() { + } + + @Override + public IsTracker loadTrackerConfiguration() { + return null; + } + + @Override + public void loadShells() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load shell references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.shellConfiguration.getShells().add(new ShellConfig("/mockShell", "com.github.nalukit.nalu.processor.common.MockShell")); + sb01 = new StringBuilder(); + sb01.append("register shell >>/mockShell<< with class >>com.github.nalukit.nalu.processor.common.MockShell<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadShellFactory() { + // create ShellCreator for: com.github.nalukit.nalu.processor.common.MockShell + ShellFactory.get().registerShell("com.github.nalukit.nalu.processor.common.MockShell", new com.github.nalukit.nalu.processor.common.MockShellCreatorImpl(router, context, eventBus)); + } + + @Override + public void loadCompositeController() { + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03CreatorImpl(router, context, eventBus)); + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04CreatorImpl(router, context, eventBus)); + } + + @Override + public void loadComponents() { + // create ControllerCreator for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05 + ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05CreatorImpl(router, context, eventBus)); + // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05 + CompositeCondition01 compositeCondition01_1 = new CompositeCondition01(); + compositeCondition01_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03", compositeCondition01_1); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04", compositeCondition01_1); + // create ControllerCreator for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06 + ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06CreatorImpl(router, context, eventBus)); + // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06 + CompositeCondition01 compositeCondition01_2 = new CompositeCondition01(); + compositeCondition01_2.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03", compositeCondition01_2); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04", compositeCondition01_2); + } + + @Override + public void loadRoutes() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load routes"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route05/*", Arrays.asList(new String[]{"parameter05"}), "selector05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05")); + sb01 = new StringBuilder(); + sb01.append("register route >>/mockShell/route05/*<< with parameter >>parameter05<< for selector >>selector05<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route06/*", Arrays.asList(new String[]{"parameter06"}), "selector06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06")); + sb01 = new StringBuilder(); + sb01.append("register route >>/mockShell/route06/*<< with parameter >>parameter06<< for selector >>selector06<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPopUpControllerFactory() { + } + + @Override + public void loadFilters() { + } + + @Override + public void loadHandlers() { + } + + @Override + public void loadCompositeReferences() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load composite references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05", "testComposite01", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite01<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05", "testComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite02<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite05<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06", "testComposite01", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite01<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06", "testComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite02<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.ControllerWithComposite06<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPlugins() { + StringBuilder sb01 = new StringBuilder(); + } + + @Override + public IsApplicationLoader getApplicationLoader() { + return null; + } + + @Override + public void loadDefaultRoutes() { + StringBuilder sb01 = new StringBuilder(); + this.startRoute = "/mockShell/route06"; + sb01.append("found startRoute >>/mockShell/route06<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + sb01 = new StringBuilder(); + this.errorRoute = "/mockShell/route06"; + sb01.append("found errorRoute >>/mockShell/route06<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + } + + @Override + public boolean hasHistory() { + return true; + } + + @Override + public boolean isUsingHash() { + return true; + } + + @Override + public boolean isUsingColonForParametersInUrl() { + return false; + } + + @Override + public boolean isStayOnSide() { + return false; + } +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07.java new file mode 100644 index 000000000..59e5925ef --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite07; + +import com.github.nalukit.nalu.client.application.IsApplication; +import com.github.nalukit.nalu.client.application.annotation.Application; +import com.github.nalukit.nalu.processor.common.MockContext; + +@Application(startRoute = "/mockShell/route05", + context = MockContext.class, + routeError = "/mockShell/route05") +public interface ApplicationWithComposite07 + extends IsApplication { +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java new file mode 100644 index 000000000..58ec5726c --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java @@ -0,0 +1,197 @@ +package com.github.nalukit.nalu.processor.common.application.applicationWithComposite07; + +import com.github.nalukit.nalu.client.application.IsApplicationLoader; +import com.github.nalukit.nalu.client.internal.ClientLogger; +import com.github.nalukit.nalu.client.internal.CompositeControllerReference; +import com.github.nalukit.nalu.client.internal.application.AbstractApplication; +import com.github.nalukit.nalu.client.internal.application.CompositeFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerCompositeConditionFactory; +import com.github.nalukit.nalu.client.internal.application.ControllerFactory; +import com.github.nalukit.nalu.client.internal.application.ShellFactory; +import com.github.nalukit.nalu.client.internal.route.RouteConfig; +import com.github.nalukit.nalu.client.internal.route.ShellConfig; +import com.github.nalukit.nalu.client.tracker.IsTracker; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.CompositeCondition01; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.CompositeCondition02; +import java.lang.Override; +import java.lang.StringBuilder; +import java.util.Arrays; + +/** + * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:21:57<< */ +public final class ApplicationWithComposite07Impl extends AbstractApplication implements ApplicationWithComposite07 { + public ApplicationWithComposite07Impl() { + super(); + super.context = new com.github.nalukit.nalu.processor.common.MockContext(); + } + + @Override + public void logProcessorVersion() { + ClientLogger.get().logDetailed("", 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + StringBuilder sb01 = new StringBuilder(); + sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + ClientLogger.get().logDetailed(sb01.toString(), 0); + ClientLogger.get().logDetailed("=================================================================================", 0); + ClientLogger.get().logDetailed("", 0); + } + + @Override + public void loadDebugConfiguration() { + } + + @Override + public IsTracker loadTrackerConfiguration() { + return null; + } + + @Override + public void loadShells() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load shell references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.shellConfiguration.getShells().add(new ShellConfig("/mockShell", "com.github.nalukit.nalu.processor.common.MockShell")); + sb01 = new StringBuilder(); + sb01.append("register shell >>/mockShell<< with class >>com.github.nalukit.nalu.processor.common.MockShell<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadShellFactory() { + // create ShellCreator for: com.github.nalukit.nalu.processor.common.MockShell + ShellFactory.get().registerShell("com.github.nalukit.nalu.processor.common.MockShell", new com.github.nalukit.nalu.processor.common.MockShellCreatorImpl(router, context, eventBus)); + } + + @Override + public void loadCompositeController() { + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03CreatorImpl(router, context, eventBus)); + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04CreatorImpl(router, context, eventBus)); + // create Composite for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController05 + CompositeFactory.get().registerComposite("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController05", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController05CreatorImpl(router, context, eventBus)); + } + + @Override + public void loadComponents() { + // create ControllerCreator for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05 + ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05CreatorImpl(router, context, eventBus)); + // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05 + CompositeCondition01 compositeCondition01_1 = new CompositeCondition01(); + compositeCondition01_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03", compositeCondition01_1); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04", compositeCondition01_1); + CompositeCondition02 compositeCondition02_1 = new CompositeCondition02(); + compositeCondition02_1.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController05", compositeCondition02_1); + // create ControllerCreator for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06 + ControllerFactory.get().registerController("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06", new com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06CreatorImpl(router, context, eventBus)); + // register conditions of composites for: com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06 + CompositeCondition01 compositeCondition01_2 = new CompositeCondition01(); + compositeCondition01_2.setContext(super.context); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03", compositeCondition01_2); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04", compositeCondition01_2); + ControllerCompositeConditionFactory.get().registerCondition("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03", super.alwaysLoadComposite); + } + + @Override + public void loadRoutes() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load routes"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route05/*", Arrays.asList(new String[]{"parameter05"}), "selector05", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05")); + sb01 = new StringBuilder(); + sb01.append("register route >>/mockShell/route05/*<< with parameter >>parameter05<< for selector >>selector05<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + super.routerConfiguration.getRouters().add(new RouteConfig("/mockShell/route06/*", Arrays.asList(new String[]{"parameter06"}), "selector06", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06")); + sb01 = new StringBuilder(); + sb01.append("register route >>/mockShell/route06/*<< with parameter >>parameter06<< for selector >>selector06<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPopUpControllerFactory() { + } + + @Override + public void loadFilters() { + } + + @Override + public void loadHandlers() { + } + + @Override + public void loadCompositeReferences() { + StringBuilder sb01 = new StringBuilder(); + sb01.append("load composite references"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05", "testComposite01", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite01<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05", "testComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite02<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05", "testComposite03", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController05", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite03<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite05<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06", "testComposite01", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite01<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06", "testComposite02", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite02<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + this.compositeControllerReferences.add(new CompositeControllerReference("com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06", "testComposite03", "com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03", "selector", false)); + sb01 = new StringBuilder(); + sb01.append("register composite >>testComposite03<< for controller >>com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.ControllerWithComposite06<< in selector >>selector<<"); + ClientLogger.get().logDetailed(sb01.toString(), 3); + } + + @Override + public void loadPlugins() { + StringBuilder sb01 = new StringBuilder(); + } + + @Override + public IsApplicationLoader getApplicationLoader() { + return null; + } + + @Override + public void loadDefaultRoutes() { + StringBuilder sb01 = new StringBuilder(); + this.startRoute = "/mockShell/route05"; + sb01.append("found startRoute >>/mockShell/route05<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + sb01 = new StringBuilder(); + this.errorRoute = "/mockShell/route05"; + sb01.append("found errorRoute >>/mockShell/route05<<"); + ClientLogger.get().logDetailed(sb01.toString(), 2); + } + + @Override + public boolean hasHistory() { + return true; + } + + @Override + public boolean isUsingHash() { + return true; + } + + @Override + public boolean isUsingColonForParametersInUrl() { + return false; + } + + @Override + public boolean isStayOnSide() { + return false; + } +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/Component04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/Component04.java new file mode 100644 index 000000000..50669219b --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/Component04.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04; + +import com.github.nalukit.nalu.client.component.AbstractComponent; + +public class Component04 + extends AbstractComponent + implements IComponent04 { + + public Component04() { + } + + @Override + public void render() { + initElement("Component04"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition01.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition01.java new file mode 100644 index 000000000..fe77875e4 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition01.java @@ -0,0 +1,16 @@ +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04; + +import com.github.nalukit.nalu.client.component.AbstractComponent; +import com.github.nalukit.nalu.client.component.AbstractCompositeCondition; +import com.github.nalukit.nalu.processor.common.MockContext; + +public class CompositeCondition01 + extends AbstractCompositeCondition { + + @Override + public boolean loadComposite(String route, + String... params) { + return true; + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition02.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition02.java new file mode 100644 index 000000000..078bf06cd --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/CompositeCondition02.java @@ -0,0 +1,16 @@ +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04; + +import com.github.nalukit.nalu.client.component.AbstractComponent; +import com.github.nalukit.nalu.client.component.AbstractCompositeCondition; +import com.github.nalukit.nalu.processor.common.MockContext; + +public class CompositeCondition02 + extends AbstractCompositeCondition { + + @Override + public boolean loadComposite(String route, + String... params) { + return true; + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/ControllerWithComposite04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/ControllerWithComposite04.java new file mode 100644 index 000000000..cbdc5b743 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/ControllerWithComposite04.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04; + +import com.github.nalukit.nalu.client.component.AbstractComponentController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.Composite; +import com.github.nalukit.nalu.client.component.annotation.Composites; +import com.github.nalukit.nalu.client.component.annotation.Controller; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController03; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite.CompositeController04; + +@Controller(route = "/mockShell/route04/:parameter04", + selector = "selector04", + component = Component04.class, + componentInterface = IComponent04.class) +@Composites({ @Composite(name = "testComposite03", + compositeController = CompositeController03.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite04", + compositeController = CompositeController04.class, + selector = "selector", + condition = CompositeCondition02.class) }) +public class ControllerWithComposite04 + extends AbstractComponentController + implements IComponent04.Controller { + + public ControllerWithComposite04() { + } + + @AcceptParameter("parameter04") + public void setParameter04(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/IComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/IComponent04.java new file mode 100644 index 000000000..fad78b033 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/IComponent04.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04; + +import com.github.nalukit.nalu.client.component.IsComponent; + +public interface IComponent04 + extends IsComponent { + + interface Controller + extends IsComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent03.java new file mode 100644 index 000000000..4d7623677 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent03.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent03 + extends AbstractCompositeComponent + implements ICompositeComponent03 { + + public CompositeComponent03() { + } + + @Override + public void render() { + initElement("CompositeComponent03"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent04.java new file mode 100644 index 000000000..3dcf6ce3c --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeComponent04.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent04 + extends AbstractCompositeComponent + implements ICompositeComponent04 { + + public CompositeComponent04() { + } + + @Override + public void render() { + initElement("CompositeComponent04"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController03.java new file mode 100644 index 000000000..2eaddda50 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController03.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent03.class, + componentInterface = ICompositeComponent03.class) +public class CompositeController03 + extends AbstractCompositeController + implements ICompositeComponent03.Controller { + + public CompositeController03() { + } + + @AcceptParameter("parameter03") + public void setParameter03(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController04.java new file mode 100644 index 000000000..270404e0d --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/CompositeController04.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent04.class, + componentInterface = ICompositeComponent04.class) +public class CompositeController04 + extends AbstractCompositeController + implements ICompositeComponent04.Controller { + + public CompositeController04() { + } + + @AcceptParameter("parameter04") + public void setParameter04(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent03.java new file mode 100644 index 000000000..b11590b5f --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent03.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent03 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent04.java new file mode 100644 index 000000000..6afbe603e --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite04/composite/ICompositeComponent04.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite04.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent04 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/Component05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/Component05.java new file mode 100644 index 000000000..34d1bacd6 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/Component05.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05; + +import com.github.nalukit.nalu.client.component.AbstractComponent; + +public class Component05 + extends AbstractComponent + implements IComponent05 { + + public Component05() { + } + + @Override + public void render() { + initElement("Component05"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/CompositeCondition01.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/CompositeCondition01.java new file mode 100644 index 000000000..fa54569ff --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/CompositeCondition01.java @@ -0,0 +1,16 @@ +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05; + +import com.github.nalukit.nalu.client.component.AbstractComponent; +import com.github.nalukit.nalu.client.component.AbstractCompositeCondition; +import com.github.nalukit.nalu.processor.common.MockContext; + +public class CompositeCondition01 + extends AbstractCompositeCondition { + + @Override + public boolean loadComposite(String route, + String... params) { + return true; + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/ControllerWithComposite05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/ControllerWithComposite05.java new file mode 100644 index 000000000..1f1ff0786 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/ControllerWithComposite05.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05; + +import com.github.nalukit.nalu.client.component.AbstractComponentController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.Composite; +import com.github.nalukit.nalu.client.component.annotation.Composites; +import com.github.nalukit.nalu.client.component.annotation.Controller; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController03; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite.CompositeController04; + +@Controller(route = "/mockShell/route05/:parameter05", + selector = "selector05", + component = Component05.class, + componentInterface = IComponent05.class) +@Composites({ @Composite(name = "testComposite01", + compositeController = CompositeController03.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite02", + compositeController = CompositeController04.class, + selector = "selector", + condition = CompositeCondition01.class) }) +public class ControllerWithComposite05 + extends AbstractComponentController + implements IComponent05.Controller { + + public ControllerWithComposite05() { + } + + @AcceptParameter("parameter05") + public void setParameter05(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/IComponent05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/IComponent05.java new file mode 100644 index 000000000..62c25c53b --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/IComponent05.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05; + +import com.github.nalukit.nalu.client.component.IsComponent; + +public interface IComponent05 + extends IsComponent { + + interface Controller + extends IsComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent03.java new file mode 100644 index 000000000..2107d2395 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent03.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent03 + extends AbstractCompositeComponent + implements ICompositeComponent03 { + + public CompositeComponent03() { + } + + @Override + public void render() { + initElement("CompositeComponent03"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent04.java new file mode 100644 index 000000000..8dbcb3ddd --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeComponent04.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent04 + extends AbstractCompositeComponent + implements ICompositeComponent04 { + + public CompositeComponent04() { + } + + @Override + public void render() { + initElement("CompositeComponent04"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController03.java new file mode 100644 index 000000000..fdc2e7840 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController03.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent03.class, + componentInterface = ICompositeComponent03.class) +public class CompositeController03 + extends AbstractCompositeController + implements ICompositeComponent03.Controller { + + public CompositeController03() { + } + + @AcceptParameter("parameter03") + public void setParameter03(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController04.java new file mode 100644 index 000000000..632598c52 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/CompositeController04.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent04.class, + componentInterface = ICompositeComponent04.class) +public class CompositeController04 + extends AbstractCompositeController + implements ICompositeComponent04.Controller { + + public CompositeController04() { + } + + @AcceptParameter("parameter04") + public void setParameter04(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent03.java new file mode 100644 index 000000000..0a73853e7 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent03.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent03 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent04.java new file mode 100644 index 000000000..65e766342 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite05/composite/ICompositeComponent04.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite05.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent04 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component05.java new file mode 100644 index 000000000..d33abba45 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component05.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06; + +import com.github.nalukit.nalu.client.component.AbstractComponent; + +public class Component05 + extends AbstractComponent + implements IComponent05 { + + public Component05() { + } + + @Override + public void render() { + initElement("Component05"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component06.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component06.java new file mode 100644 index 000000000..ea7b71089 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/Component06.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06; + +import com.github.nalukit.nalu.client.component.AbstractComponent; + +public class Component06 + extends AbstractComponent + implements IComponent06 { + + public Component06() { + } + + @Override + public void render() { + initElement("Component06"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/CompositeCondition01.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/CompositeCondition01.java new file mode 100644 index 000000000..9499f3894 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/CompositeCondition01.java @@ -0,0 +1,16 @@ +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06; + +import com.github.nalukit.nalu.client.component.AbstractComponent; +import com.github.nalukit.nalu.client.component.AbstractCompositeCondition; +import com.github.nalukit.nalu.processor.common.MockContext; + +public class CompositeCondition01 + extends AbstractCompositeCondition { + + @Override + public boolean loadComposite(String route, + String... params) { + return true; + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite05.java new file mode 100644 index 000000000..d60fcdcad --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite05.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06; + +import com.github.nalukit.nalu.client.component.AbstractComponentController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.Composite; +import com.github.nalukit.nalu.client.component.annotation.Composites; +import com.github.nalukit.nalu.client.component.annotation.Controller; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04; + +@Controller(route = "/mockShell/route05/:parameter05", + selector = "selector05", + component = Component05.class, + componentInterface = IComponent05.class) +@Composites({ @Composite(name = "testComposite01", + compositeController = CompositeController03.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite02", + compositeController = CompositeController04.class, + selector = "selector", + condition = CompositeCondition01.class) }) +public class ControllerWithComposite05 + extends AbstractComponentController + implements IComponent05.Controller { + + public ControllerWithComposite05() { + } + + @AcceptParameter("parameter05") + public void setParameter05(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite06.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite06.java new file mode 100644 index 000000000..c30a3e63b --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/ControllerWithComposite06.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06; + +import com.github.nalukit.nalu.client.component.AbstractComponentController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.Composite; +import com.github.nalukit.nalu.client.component.annotation.Composites; +import com.github.nalukit.nalu.client.component.annotation.Controller; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController03; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite.CompositeController04; + +@Controller(route = "/mockShell/route06/:parameter06", + selector = "selector06", + component = Component06.class, + componentInterface = IComponent06.class) +@Composites({ @Composite(name = "testComposite01", + compositeController = CompositeController03.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite02", + compositeController = CompositeController04.class, + selector = "selector", + condition = CompositeCondition01.class) }) +public class ControllerWithComposite06 + extends AbstractComponentController + implements IComponent06.Controller { + + public ControllerWithComposite06() { + } + + @AcceptParameter("parameter06") + public void setParameter06(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent05.java new file mode 100644 index 000000000..fcfcb0f6f --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent05.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06; + +import com.github.nalukit.nalu.client.component.IsComponent; + +public interface IComponent05 + extends IsComponent { + + interface Controller + extends IsComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent06.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent06.java new file mode 100644 index 000000000..f16ef6756 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/IComponent06.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06; + +import com.github.nalukit.nalu.client.component.IsComponent; + +public interface IComponent06 + extends IsComponent { + + interface Controller + extends IsComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent03.java new file mode 100644 index 000000000..1dd2059ec --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent03.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent03 + extends AbstractCompositeComponent + implements ICompositeComponent03 { + + public CompositeComponent03() { + } + + @Override + public void render() { + initElement("CompositeComponent03"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent04.java new file mode 100644 index 000000000..cb946d33e --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeComponent04.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent04 + extends AbstractCompositeComponent + implements ICompositeComponent04 { + + public CompositeComponent04() { + } + + @Override + public void render() { + initElement("CompositeComponent04"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController03.java new file mode 100644 index 000000000..61d176a6e --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController03.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent03.class, + componentInterface = ICompositeComponent03.class) +public class CompositeController03 + extends AbstractCompositeController + implements ICompositeComponent03.Controller { + + public CompositeController03() { + } + + @AcceptParameter("parameter03") + public void setParameter03(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController04.java new file mode 100644 index 000000000..52124d411 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/CompositeController04.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent04.class, + componentInterface = ICompositeComponent04.class) +public class CompositeController04 + extends AbstractCompositeController + implements ICompositeComponent04.Controller { + + public CompositeController04() { + } + + @AcceptParameter("parameter04") + public void setParameter04(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent03.java new file mode 100644 index 000000000..5fca06c48 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent03.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent03 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent04.java new file mode 100644 index 000000000..579bb734f --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite06/composite/ICompositeComponent04.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite06.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent04 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component05.java new file mode 100644 index 000000000..a91825fb4 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component05.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.AbstractComponent; + +public class Component05 + extends AbstractComponent + implements IComponent05 { + + public Component05() { + } + + @Override + public void render() { + initElement("Component05"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component06.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component06.java new file mode 100644 index 000000000..033ba44a4 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/Component06.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.AbstractComponent; + +public class Component06 + extends AbstractComponent + implements IComponent06 { + + public Component06() { + } + + @Override + public void render() { + initElement("Component06"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition01.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition01.java new file mode 100644 index 000000000..8fae40f24 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition01.java @@ -0,0 +1,16 @@ +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.AbstractComponent; +import com.github.nalukit.nalu.client.component.AbstractCompositeCondition; +import com.github.nalukit.nalu.processor.common.MockContext; + +public class CompositeCondition01 + extends AbstractCompositeCondition { + + @Override + public boolean loadComposite(String route, + String... params) { + return true; + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition02.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition02.java new file mode 100644 index 000000000..f42e83416 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/CompositeCondition02.java @@ -0,0 +1,16 @@ +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.AbstractComponent; +import com.github.nalukit.nalu.client.component.AbstractCompositeCondition; +import com.github.nalukit.nalu.processor.common.MockContext; + +public class CompositeCondition02 + extends AbstractCompositeCondition { + + @Override + public boolean loadComposite(String route, + String... params) { + return true; + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite05.java new file mode 100644 index 000000000..d632bd282 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite05.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.AbstractComponentController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.Composite; +import com.github.nalukit.nalu.client.component.annotation.Composites; +import com.github.nalukit.nalu.client.component.annotation.Controller; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController05; + +@Controller(route = "/mockShell/route05/:parameter05", + selector = "selector05", + component = Component05.class, + componentInterface = IComponent05.class) +@Composites({ @Composite(name = "testComposite01", + compositeController = CompositeController03.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite02", + compositeController = CompositeController04.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite03", + compositeController = CompositeController05.class, + selector = "selector", + condition = CompositeCondition02.class) }) +public class ControllerWithComposite05 + extends AbstractComponentController + implements IComponent05.Controller { + + public ControllerWithComposite05() { + } + + @AcceptParameter("parameter05") + public void setParameter05(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite06.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite06.java new file mode 100644 index 000000000..722ceb861 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/ControllerWithComposite06.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.AbstractComponentController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.Composite; +import com.github.nalukit.nalu.client.component.annotation.Composites; +import com.github.nalukit.nalu.client.component.annotation.Controller; +import com.github.nalukit.nalu.processor.common.MockContext; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController03; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController04; +import com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite.CompositeController05; + +@Controller(route = "/mockShell/route06/:parameter06", + selector = "selector06", + component = Component06.class, + componentInterface = IComponent06.class) +@Composites({ @Composite(name = "testComposite01", + compositeController = CompositeController03.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite02", + compositeController = CompositeController04.class, + selector = "selector", + condition = CompositeCondition01.class), + @Composite(name = "testComposite03", + compositeController = CompositeController03.class, + selector = "selector") }) +public class ControllerWithComposite06 + extends AbstractComponentController + implements IComponent06.Controller { + + public ControllerWithComposite06() { + } + + @AcceptParameter("parameter06") + public void setParameter06(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent05.java new file mode 100644 index 000000000..04c87bf29 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent05.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.IsComponent; + +public interface IComponent05 + extends IsComponent { + + interface Controller + extends IsComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent06.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent06.java new file mode 100644 index 000000000..c90ebae40 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/IComponent06.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07; + +import com.github.nalukit.nalu.client.component.IsComponent; + +public interface IComponent06 + extends IsComponent { + + interface Controller + extends IsComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent03.java new file mode 100644 index 000000000..585a87f8f --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent03.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent03 + extends AbstractCompositeComponent + implements ICompositeComponent03 { + + public CompositeComponent03() { + } + + @Override + public void render() { + initElement("CompositeComponent03"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent04.java new file mode 100644 index 000000000..178416b41 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent04.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent04 + extends AbstractCompositeComponent + implements ICompositeComponent04 { + + public CompositeComponent04() { + } + + @Override + public void render() { + initElement("CompositeComponent04"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent05.java new file mode 100644 index 000000000..0bcb3837b --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeComponent05.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeComponent; + +public class CompositeComponent05 + extends AbstractCompositeComponent + implements ICompositeComponent05 { + + public CompositeComponent05() { + } + + @Override + public void render() { + initElement("CompositeComponent05"); + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController03.java new file mode 100644 index 000000000..948704a7d --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController03.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent03.class, + componentInterface = ICompositeComponent03.class) +public class CompositeController03 + extends AbstractCompositeController + implements ICompositeComponent03.Controller { + + public CompositeController03() { + } + + @AcceptParameter("parameter03") + public void setParameter03(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController04.java new file mode 100644 index 000000000..b1f3e33bb --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController04.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent04.class, + componentInterface = ICompositeComponent04.class) +public class CompositeController04 + extends AbstractCompositeController + implements ICompositeComponent04.Controller { + + public CompositeController04() { + } + + @AcceptParameter("parameter04") + public void setParameter04(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController05.java new file mode 100644 index 000000000..ae85b3cb1 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/CompositeController05.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.AbstractCompositeController; +import com.github.nalukit.nalu.client.component.annotation.AcceptParameter; +import com.github.nalukit.nalu.client.component.annotation.CompositeController; +import com.github.nalukit.nalu.processor.common.MockContext; + +@CompositeController(component = CompositeComponent05.class, + componentInterface = ICompositeComponent05.class) +public class CompositeController05 + extends AbstractCompositeController + implements ICompositeComponent05.Controller { + + public CompositeController05() { + } + + @AcceptParameter("parameter05") + public void setParameter05(String parameter) { + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent03.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent03.java new file mode 100644 index 000000000..ecc872840 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent03.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent03 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent04.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent04.java new file mode 100644 index 000000000..cbf991bd8 --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent04.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent04 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent05.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent05.java new file mode 100644 index 000000000..a55e03fbb --- /dev/null +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/ui/controllerWithComposite07/composite/ICompositeComponent05.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 - 2019 - Frank Hossfeld + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.github.nalukit.nalu.processor.common.ui.controllerWithComposite07.composite; + +import com.github.nalukit.nalu.client.component.IsCompositeComponent; + +public interface ICompositeComponent05 + extends IsCompositeComponent { + + interface Controller + extends IsCompositeComponent.Controller { + + } + +} From 746dbbb919de91a532b76be51d1faba504ef5c1b Mon Sep 17 00:00:00 2001 From: Frank Hossfeld Date: Thu, 31 Oct 2019 17:13:08 +0100 Subject: [PATCH 8/9] #104 - Same RouteConfig added every time a Controller is modified - Done --- .../nalukit/nalu/processor/NaluProcessor.java | 76 +++++++++++++++++-- 1 file changed, 69 insertions(+), 7 deletions(-) diff --git a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java index 05b8a7c43..a29424f70 100644 --- a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java +++ b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/NaluProcessor.java @@ -48,10 +48,7 @@ import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.Set; +import java.util.*; import static java.util.Objects.isNull; import static java.util.stream.Collectors.toSet; @@ -111,8 +108,8 @@ public boolean process(Set annotations, this.store(metaModel); } this.processorUtils.createNoteMessage("Nalu-Processor finished ... processing takes: " + - this.stopwatch.stop() - .toString()); + this.stopwatch.stop() + .toString()); } else { if (annotations.size() > 0) { for (TypeElement annotation : annotations) { @@ -188,6 +185,21 @@ private void handlePopUpControllerAnnotation(RoundEnvironment roundEnv) .generate(); popUpControllerModels.add(popUpControllerModel); } + // check, if the one of the popUpController in the list is already + // added to the the meta model + // + // in case it is, remove it. + popUpControllerModels.forEach(model -> { + Optional optional = this.metaModel.getPopUpControllers() + .stream() + .filter(s -> model.getController() + .getClassName() + .equals(s.getController() + .getClassName())) + .findFirst(); + optional.ifPresent(optionalPopUpControllerModel -> this.metaModel.getPopUpControllers() + .remove(optionalPopUpControllerModel)); + }); // save data in metaModel this.metaModel.getPopUpControllers() .addAll(popUpControllerModels); @@ -277,6 +289,21 @@ private void handleShellAnnotation(RoundEnvironment roundEnv) .generate(); shellsModels.add(shellModel); } + // check, if the one of the shell in the list is already + // added to the the meta model + // + // in case it is, remove it. + shellsModels.forEach(model -> { + Optional optional = this.metaModel.getShells() + .stream() + .filter(s -> model.getShell() + .getClassName() + .equals(s.getShell() + .getClassName())) + .findFirst(); + optional.ifPresent(optionalShellModel -> this.metaModel.getShells() + .remove(optionalShellModel)); + }); // save handler data in metaModel this.metaModel.getShells() .addAll(shellsModels); @@ -342,8 +369,19 @@ private void handleControllerAnnotation(RoundEnvironment roundEnv) .controllerModel(controllerModel) .build() .generate(); + // check, if the controller is already + // added to the the meta model // - + // in case it is, remove it. + final String controllerClassname = controllerModel.getController() + .getClassName(); + Optional optional = this.metaModel.getControllers() + .stream() + .filter(s -> controllerClassname.equals(s.getController() + .getClassName())) + .findFirst(); + optional.ifPresent(optionalControllerModel -> this.metaModel.getControllers() + .remove(optionalControllerModel)); // save controller data in metaModel this.metaModel.getControllers() .add(controllerModel); @@ -367,6 +405,17 @@ private void handleHandlerAnnotation(RoundEnvironment roundEnv) .handlerElement(handlerElement) .build() .scan(); + // check, if the handler is already + // added to the the meta model + // + // in case it is, remove it. + final String handlerClassname = handlerModel.getClassName(); + Optional optional = this.metaModel.getHandlers() + .stream() + .filter(s -> handlerClassname.equals(s.getClassName())) + .findFirst(); + optional.ifPresent(optionalHandler -> this.metaModel.getHandlers() + .remove(optionalHandler)); // save handler data in metaModel this.metaModel.getHandlers() .add(handlerModel); @@ -389,6 +438,19 @@ private void handleFiltersAnnotation(RoundEnvironment roundEnv) .filtersElement(filtersElement) .build() .scan(roundEnv); + // check, if the one of the shell in the list is already + // added to the the meta model + // + // in case it is, remove it. + filterModels.forEach(model -> { + Optional optional = this.metaModel.getFilters() + .stream() + .filter(s -> model.getClassName() + .equals(s.getClassName())) + .findFirst(); + optional.ifPresent(optionalFilter -> this.metaModel.getFilters() + .remove(optionalFilter)); + }); // save filter data in metaModel this.metaModel.getFilters() .addAll(filterModels); From 6d9487bfb4bf3d3f17d15b0988c230c3e37c773a Mon Sep 17 00:00:00 2001 From: Frank Hossfeld Date: Tue, 5 Nov 2019 21:13:52 +0100 Subject: [PATCH 9/9] update version to 1.3.5 --- nalu-plugin-core-web/pom.xml | 2 +- nalu-plugin-elemental2/pom.xml | 2 +- nalu-plugin-elemento/pom.xml | 2 +- nalu-plugin-gwt-processor/pom.xml | 2 +- .../github/nalukit/nalu/processor/NaluPluginGwtProcessor.java | 2 +- nalu-plugin-gwt/pom.xml | 2 +- nalu-processor/pom.xml | 2 +- .../com/github/nalukit/nalu/processor/ProcessorConstants.java | 2 +- ...ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java | 2 +- .../ApplicationAnnotationOkWithLoaderImpl.java | 4 ++-- ...ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java | 2 +- .../ApplicationAnnotationOkWithoutLoaderImpl.java | 2 +- .../MyApplicationImpl.java | 2 +- .../ApplicationWithComposite01Impl.java | 2 +- .../ApplicationWithComposite02Impl.java | 4 ++-- .../ApplicationWithComposite03Impl.java | 4 ++-- .../ApplicationWithComposite04Impl.java | 4 ++-- .../ApplicationWithComposite05Impl.java | 4 ++-- .../ApplicationWithComposite06Impl.java | 4 ++-- .../ApplicationWithComposite07Impl.java | 4 ++-- .../GenerateWithIsComponentCreatorImpl.java | 2 +- .../GenerateWithoutIsComponentCreatorImpl.java | 2 +- .../applicationWithTracker/ApplicationWithTrackerImpl.java | 4 ++-- nalu/pom.xml | 2 +- nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java | 2 +- .../test/java/com/github/nalukit/nalu/client/NaluTest.java | 2 +- .../client/NaluSimpleApplicationContext.java | 2 +- .../client/NaluSimpleApplicationContext.java | 2 +- pom.xml | 2 +- 29 files changed, 37 insertions(+), 37 deletions(-) diff --git a/nalu-plugin-core-web/pom.xml b/nalu-plugin-core-web/pom.xml index bb07bdb96..1f57e9c3c 100644 --- a/nalu-plugin-core-web/pom.xml +++ b/nalu-plugin-core-web/pom.xml @@ -23,7 +23,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 nalu-plugin-core-web diff --git a/nalu-plugin-elemental2/pom.xml b/nalu-plugin-elemental2/pom.xml index b77107f46..1fb0cbb01 100644 --- a/nalu-plugin-elemental2/pom.xml +++ b/nalu-plugin-elemental2/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 nalu-plugin-elemental2 diff --git a/nalu-plugin-elemento/pom.xml b/nalu-plugin-elemento/pom.xml index 136eb630f..dfb46c3da 100644 --- a/nalu-plugin-elemento/pom.xml +++ b/nalu-plugin-elemento/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 nalu-plugin-elemento diff --git a/nalu-plugin-gwt-processor/pom.xml b/nalu-plugin-gwt-processor/pom.xml index 627848462..763e4f97e 100644 --- a/nalu-plugin-gwt-processor/pom.xml +++ b/nalu-plugin-gwt-processor/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 nalu-plugin-gwt-processor diff --git a/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java b/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java index 31a309672..013d5bba5 100644 --- a/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java +++ b/nalu-plugin-gwt-processor/src/main/java/com/github/nalukit/nalu/processor/NaluPluginGwtProcessor.java @@ -60,7 +60,7 @@ public synchronized void init(ProcessingEnvironment processingEnv) { this.stopwatch = Stopwatch.createStarted(); setUp(); this.processorUtils.createNoteMessage("Nalu-Plugin-GWT-Processor started ..."); - this.processorUtils.createNoteMessage("Nalu-Plugin-GWT-Processor version >>1.3.5-SNAPSHOT<<"); + this.processorUtils.createNoteMessage("Nalu-Plugin-GWT-Processor version >>1.3.5<<"); } @Override diff --git a/nalu-plugin-gwt/pom.xml b/nalu-plugin-gwt/pom.xml index f687df0d1..02a8403c8 100644 --- a/nalu-plugin-gwt/pom.xml +++ b/nalu-plugin-gwt/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 nalu-plugin-gwt diff --git a/nalu-processor/pom.xml b/nalu-processor/pom.xml index 050a038ea..9bf7aed89 100644 --- a/nalu-processor/pom.xml +++ b/nalu-processor/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 nalu-processor diff --git a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java index 2edc940a1..045d9b92b 100644 --- a/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java +++ b/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/ProcessorConstants.java @@ -27,6 +27,6 @@ public class ProcessorConstants { public final static String PARAMETER_DELIMITER = "_pPp_"; public final static String CREATOR_IMPL = "CreatorImpl"; public final static String PLUGIN_IMPL = "PluginImpl"; - public final static String PROCESSOR_VERSION = "1.3.5-SNAPSHOT"; + public final static String PROCESSOR_VERSION = "1.3.5"; public final static String BUILD_TIME = new SimpleDateFormat("yyyy.MM.dd-HH:mm:ss").format(new Date(System.currentTimeMillis())); } diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java index 5d346baa4..eeb9e7829 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java @@ -25,7 +25,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java index f4a17d2e7..5127645e5 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoader/ApplicationAnnotationOkWithLoaderImpl.java @@ -14,7 +14,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.08.24-11:05:47<< */ + * Build with Nalu version >>1.3.5<< at >>2019.08.24-11:05:47<< */ public final class ApplicationAnnotationOkWithLoaderImpl extends AbstractApplication implements ApplicationAnnotationOkWithLoader { public ApplicationAnnotationOkWithLoaderImpl() { super(); @@ -26,7 +26,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java index c1972e14e..40abd1281 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java @@ -25,7 +25,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java index 16c4bada9..c807d81e9 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoader/ApplicationAnnotationOkWithoutLoaderImpl.java @@ -24,7 +24,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java index 3348b3edb..021a4efd1 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationAnnotationOkWithoutLoaderAsInnerInterface/MyApplicationImpl.java @@ -25,7 +25,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java index ee0945e6e..52009081e 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite01/ApplicationWithComposite01Impl.java @@ -27,7 +27,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java index 007153c66..ea225a595 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite02/ApplicationWithComposite02Impl.java @@ -18,7 +18,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:16:08<< */ + * Build with Nalu version >>1.3.5<< at >>2019.10.23-12:16:08<< */ public final class ApplicationWithComposite02Impl extends AbstractApplication implements ApplicationWithComposite02 { public ApplicationWithComposite02Impl() { super(); @@ -30,7 +30,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java index a1002d19a..8531b7f7a 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite03/ApplicationWithComposite03Impl.java @@ -18,7 +18,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:17:09<< */ + * Build with Nalu version >>1.3.5<< at >>2019.10.23-12:17:09<< */ public final class ApplicationWithComposite03Impl extends AbstractApplication implements ApplicationWithComposite03 { public ApplicationWithComposite03Impl() { super(); @@ -30,7 +30,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java index b48037159..134ec6093 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite04/ApplicationWithComposite04Impl.java @@ -19,7 +19,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:19:16<< */ + * Build with Nalu version >>1.3.5<< at >>2019.10.23-12:19:16<< */ public final class ApplicationWithComposite04Impl extends AbstractApplication implements ApplicationWithComposite04 { public ApplicationWithComposite04Impl() { super(); @@ -31,7 +31,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java index ccc710da1..5599fb6e1 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite05/ApplicationWithComposite05Impl.java @@ -18,7 +18,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:20:16<< */ + * Build with Nalu version >>1.3.5<< at >>2019.10.23-12:20:16<< */ public final class ApplicationWithComposite05Impl extends AbstractApplication implements ApplicationWithComposite05 { public ApplicationWithComposite05Impl() { super(); @@ -30,7 +30,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java index 8a4622edd..aff168ba3 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite06/ApplicationWithComposite06Impl.java @@ -18,7 +18,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:20:50<< */ + * Build with Nalu version >>1.3.5<< at >>2019.10.23-12:20:50<< */ public final class ApplicationWithComposite06Impl extends AbstractApplication implements ApplicationWithComposite06 { public ApplicationWithComposite06Impl() { super(); @@ -30,7 +30,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java index 58ec5726c..e77a8e485 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/common/application/applicationWithComposite07/ApplicationWithComposite07Impl.java @@ -19,7 +19,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.10.23-12:21:57<< */ + * Build with Nalu version >>1.3.5<< at >>2019.10.23-12:21:57<< */ public final class ApplicationWithComposite07Impl extends AbstractApplication implements ApplicationWithComposite07 { public ApplicationWithComposite07Impl() { super(); @@ -31,7 +31,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java index e8116f4ab..8ba16de6c 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithIsComponentCreator/GenerateWithIsComponentCreatorImpl.java @@ -24,7 +24,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java index 14d6cf5c4..7f35b0ba6 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controller/generateWithoutIsComponentCreator/GenerateWithoutIsComponentCreatorImpl.java @@ -24,7 +24,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java index b067616d3..fcc0a2d51 100644 --- a/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java +++ b/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/tracker/applicationWithTracker/ApplicationWithTrackerImpl.java @@ -15,7 +15,7 @@ import java.util.Arrays; /** - * Build with Nalu version >>1.3.5-SNAPSHOT<< at >>2019.08.24-11:32:39<< */ + * Build with Nalu version >>1.3.5<< at >>2019.08.24-11:32:39<< */ public final class ApplicationWithTrackerImpl extends AbstractApplication implements ApplicationWithTracker { public ApplicationWithTrackerImpl() { super(); @@ -27,7 +27,7 @@ public void logProcessorVersion() { ClientLogger.get().logDetailed("", 0); ClientLogger.get().logDetailed("=================================================================================", 0); StringBuilder sb01 = new StringBuilder(); - sb01.append("Nalu processor version >>1.3.5-SNAPSHOT<< used to generate this source"); + sb01.append("Nalu processor version >>1.3.5<< used to generate this source"); ClientLogger.get().logDetailed(sb01.toString(), 0); ClientLogger.get().logDetailed("=================================================================================", 0); ClientLogger.get().logDetailed("", 0); diff --git a/nalu/pom.xml b/nalu/pom.xml index 1ff2fe9d9..7d83ddc0c 100644 --- a/nalu/pom.xml +++ b/nalu/pom.xml @@ -25,7 +25,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 nalu diff --git a/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java b/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java index 74f876608..27cd08752 100644 --- a/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java +++ b/nalu/src/main/java/com/github/nalukit/nalu/client/Nalu.java @@ -22,7 +22,7 @@ public class Nalu { public static String getVersion() { - return "1.3.5-SNAPSHOT"; + return "1.3.5"; } public static boolean hasHistory() { diff --git a/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java b/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java index 04f485086..dd55b6d46 100644 --- a/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java +++ b/nalu/src/test/java/com/github/nalukit/nalu/client/NaluTest.java @@ -8,7 +8,7 @@ public class NaluTest { @Test void getVersion() { - Assertions.assertEquals("1.3.5-SNAPSHOT", + Assertions.assertEquals("1.3.5", Nalu.getVersion()); } diff --git a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java index a9e495f25..b9fa5439a 100644 --- a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java +++ b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication01/client/NaluSimpleApplicationContext.java @@ -31,7 +31,7 @@ public class NaluSimpleApplicationContext private String searchCity; public NaluSimpleApplicationContext() { - this.version = "1.3.5-SNAPSHOT"; + this.version = "1.3.5"; } public String getVersion() { diff --git a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java index 974260ad9..483d06e70 100644 --- a/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java +++ b/nalu/src/test/java/com/github/nalukit/nalu/simpleapplication02/client/NaluSimpleApplicationContext.java @@ -31,7 +31,7 @@ public class NaluSimpleApplicationContext private String searchCity; public NaluSimpleApplicationContext() { - this.version = "1.3.5-SNAPSHOT"; + this.version = "1.3.5"; } public String getVersion() { diff --git a/pom.xml b/pom.xml index 21b97434a..ef7a02f91 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ com.github.nalukit nalu-parent - 1.3.5-SNAPSHOT + 1.3.5 pom nalu-parent