You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by ni...@apache.org on 2016/12/17 10:28:52 UTC
[76/81] [abbrv] zest-java git commit: ZEST-195, ZEST-201 ;
Rename of everything else from zest to polygene.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
new file mode 100644
index 0000000..3261944
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
@@ -0,0 +1,36 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+dependencies {
+ compile project( ":model" )
+ compile project( ":rest" )
+
+ compile "org.apache.polygene.core:org.apache.polygene.core.spi:$polygeneVersion"
+ compile "org.apache.polygene.core:org.apache.polygene.core.bootstrap:$polygeneVersion"
+
+
+ compile "org.apache.polygene.library:org.apache.polygene.library.fileconfig:$polygeneVersion"
+<% if( hasFeature( 'rest api' ) ) { %>
+ compile "org.apache.polygene.library:org.apache.polygene.library.restlet:$polygeneVersion"
+<% } %>
+ compile "org.apache.polygene.extension:org.apache.polygene.extension.entitystore-<%= polygene.entitystore.toLowerCase() %>:$polygeneVersion"
+ compile "org.apache.polygene.extension:org.apache.polygene.extension.indexing-<%= polygene.indexing.toLowerCase() %>:$polygeneVersion"
+ compile "org.apache.polygene.extension:org.apache.polygene.extension.valueserialization-<%= polygene.serialization.toLowerCase() %>:$polygeneVersion"
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl
new file mode 100644
index 0000000..7f75b20
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-model.tmpl
@@ -0,0 +1,23 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+
+// dependencies {
+// compile "org.restlet.jee:org.restlet:2.3.4"
+// }
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl
new file mode 100644
index 0000000..5c389c2
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-rest.tmpl
@@ -0,0 +1,27 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+
+dependencies {
+ compile project( ":model" )
+
+ compile "org.apache.polygene.core:org.apache.polygene.core.api:$polygeneVersion"
+ compile "org.apache.polygene.library:org.apache.polygene.library.restlet:$polygeneVersion"
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl
new file mode 100644
index 0000000..c1960ba
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-root.tmpl
@@ -0,0 +1,46 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+
+version = 1.0
+
+rootProject.ext {
+ polygeneVersion = 0
+}
+
+allprojects() {
+ apply plugin: 'java'
+ apply plugin: 'maven'
+
+ defaultTasks 'assemble'
+
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ maven { name 'restlet-repo'; url 'http://maven.restlet.org/' }
+<% if( polygene.entitystore == 'Jdbm' ) { -%>
+ maven { name 'clojure-repo'; url 'http://clojars.org/repo/' }
+<% } -%>
+ }
+
+ dependencies {
+ compile "org.apache.polygene.core:org.apache.polygene.core.api:$polygeneVersion"
+ testCompile "org.apache.polygene.core:org.apache.polygene.core.testsupport:$polygeneVersion"
+ }
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.jar_
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.jar_ b/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.jar_
new file mode 100644
index 0000000..0087cd3
Binary files /dev/null and b/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.jar_ differ
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.properties_
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.properties_ b/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.properties_
new file mode 100644
index 0000000..731cb78
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-wrapper.properties_
@@ -0,0 +1,24 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradlew-bat.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradlew-bat.tmpl b/tools/generator-polygene/app/templates/buildtool/gradlew-bat.tmpl
new file mode 100644
index 0000000..3d06f18
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/gradlew-bat.tmpl
@@ -0,0 +1,109 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/gradlew.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradlew.tmpl b/tools/generator-polygene/app/templates/buildtool/gradlew.tmpl
new file mode 100755
index 0000000..11c35cc
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/gradlew.tmpl
@@ -0,0 +1,183 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/app/templates/buildtool/settings.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/settings.tmpl b/tools/generator-polygene/app/templates/buildtool/settings.tmpl
new file mode 100644
index 0000000..3016193
--- /dev/null
+++ b/tools/generator-polygene/app/templates/buildtool/settings.tmpl
@@ -0,0 +1,41 @@
+<%#
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ *
+-%>
+include 'app',
+ 'bootstrap',
+ 'model',
+ 'rest'
+
+rootProject.name = '<%= polygene.entitystore %>'
+
+validateProject(rootProject, "")
+
+def validateProject(project, parentName)
+{
+ assert project.projectDir.isDirectory()
+ if( new File("$project.projectDir/src/main/java").exists() )
+ {
+ assert project.buildFile.isFile()
+ }
+ if( parentName.length() > 0 )
+ println "Project: " + project.name
+ project.children.each { child ->
+ validateProject(child, project.name)
+ }
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-polygene/package.json
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/package.json b/tools/generator-polygene/package.json
new file mode 100644
index 0000000..25e2d02
--- /dev/null
+++ b/tools/generator-polygene/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "generator-polygene",
+ "version": "0.1.0",
+ "description": "",
+ "files": [
+ "app"
+ ],
+ "keywords": [
+ "yeoman-generator"
+ ],
+ "dependencies": {
+ "yeoman-generator": "^0.24.1"
+ }
+}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/index.js
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/index.js b/tools/generator-zest/app/index.js
deleted file mode 100644
index 73f44e6..0000000
--- a/tools/generator-zest/app/index.js
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- *
- */
-
-var generators = require( 'yeoman-generator' );
-
-var polygene = {};
-
-module.exports = generators.Base.extend(
- {
- // The name `constructor` is important here
- constructor: function ()
- {
- // Calling the super constructor is important so our generator is correctly set up
- generators.Base.apply( this, arguments );
-
- // this.option( 'coffee' ); // This method adds support for a `--coffee` flag
- },
-
- method1: function ()
- {
- console.log( 'method 1 just ran' );
- },
- method2: function ()
- {
- console.log( 'method 2 just ran' );
- },
- prompting: function ()
- {
- return this.prompt(
- [
- {
- type: 'input',
- name: 'name',
- message: 'Your project name',
- default: firstUpper( this.appname )
- },
- {
- type: 'input',
- name: 'packagename',
- message: 'Java package name',
- default: this.appname // Default to current folder name
- },
- {
- type: 'list',
- name: 'entitystore',
- choices: [
- 'File',
- 'Geode',
- 'Hazelcast',
- 'JClouds',
- 'Jdbm',
- 'LevelDB',
- 'Memory',
- 'MongoDB',
- 'Preferences',
- 'Redis',
- 'Riak',
- 'MySQL',
- 'PostgresSQL',
- 'SQLite',
- 'H2SQL',
- 'DerbySQL'
- ],
- message: 'Which entity store do you want to use?'
- },
- {
- type: 'list',
- name: 'indexing',
- choices: [
- 'Rdf',
- 'ElasticSearch',
- 'Solr',
- 'SQL'
- ],
- message: 'Which caching system do you want to use?'
- },
- {
- type: 'list',
- name: 'caching',
- choices: [
- 'none',
- 'memcache',
- 'ehcache'
- ],
- message: 'Which serialization system do you want to use?'
- },
- {
- type: 'list',
- name: 'serialization',
- choices: [
- 'Jackson',
- 'Stax',
- 'OrgJson'
- ],
- message: 'Which indexing system do you want to use?'
- },
- {
- type: 'checkbox',
- name: 'features',
- choices: [
- 'rest api',
- // 'reindexer',
- // 'metrics',
- // 'jmx',
- // 'version migration',
- 'sample (heroes) web application'
- ],
- message: 'Other features?'
- }
- ]
- ).then( function ( answers )
- {
- this.log( 'app name', answers.name );
- this.log( 'Entity Stores:', answers.entitystore );
- this.log( 'Indexing:', answers.indexing );
- this.log( 'Caching:', answers.caching );
- this.log( 'Serialization:', answers.serialization );
- this.log( 'Features:', answers.features );
- polygene = answers;
- polygene.javaPackageDir = polygene.packagename.replace( '.', '/' );
- polygene.singletonApp = false;
- if( hasFeature( 'sample (heroes) web application' ) )
- {
- polygene.features.push( 'rest api' );
- }
- }.bind( this )
- );
- },
-
- writing: function ()
- {
- copyPolygeneBootstrap( this, "config", "ConfigurationLayer", !polygene.singeltonApp );
- copyPolygeneBootstrap( this, "infrastructure", "InfrastructureLayer", !polygene.singeltonApp );
- copyPolygeneBootstrap( this, "domain", "DomainLayer", !polygene.singeltonApp );
- copyPolygeneBootstrap( this, "connectivity", "ConnectivityLayer", !polygene.singeltonApp );
-
- copyPolygeneBootstrap( this, "config", "ConfigModule", true );
-
- copyPolygeneBootstrap( this, "infrastructure", "FileConfigurationModule", true );
-
- copyEntityStore( this, polygene.entitystore );
-
- copyPolygeneBootstrap( this, "infrastructure", "RdfIndexingModule", hasIndexing( 'Rdf' ) );
- copyPolygeneBootstrap( this, "infrastructure", "ElasticSearchIndexingModule", hasIndexing( 'Elasticsearch' ) );
- copyPolygeneBootstrap( this, "infrastructure", "SolrIndexingModule", hasIndexing( 'Solr' ) );
- copyPolygeneBootstrap( this, "infrastructure", "SqlIndexingModule", hasIndexing( 'Sql' ) );
-
- copyPolygeneBootstrap( this, "infrastructure", "NoCachingModule", hasCaching( 'none' ) );
- copyPolygeneBootstrap( this, "infrastructure", "MemcacheCachingModule", hasCaching( 'Memcache' ) );
- copyPolygeneBootstrap( this, "infrastructure", "EhCacheCachingModule", hasCaching( 'Ehcache' ) );
-
- copyPolygeneBootstrap( this, "infrastructure", "JacksonSerializationModule", hasSerialization( 'Jackson' ) );
- copyPolygeneBootstrap( this, "infrastructure", "StaxSerializationModule", hasSerialization( 'Stax' ) );
- copyPolygeneBootstrap( this, "infrastructure", "OrgJsonSerializationModule", hasSerialization( 'Orgjson' ) );
-
- copyPolygeneBootstrap( this, "connectivity", "RestApiModule", hasFeature( 'rest api' ) );
- copyPolygeneBootstrap( this, "infrastructure", "ReindexerModule", hasFeature( 'reindexer' ) );
- copyPolygeneBootstrap( this, "infrastructure", "MetricsModule", hasFeature( 'metrics' ) );
- copyPolygeneBootstrap( this, "infrastructure", "JmxModule", hasFeature( 'jmx' ) );
- copyPolygeneBootstrap( this, "infrastructure", "MigrationModule", hasFeature( 'version migration' ) );
-
- copyPolygeneBootstrap( this, "domain", "CrudModule", true );
- copyHeroesSampleApp( this );
- copyPolygeneDomain( this, "security", "RestApiModule", "SecurityRepository", hasFeature( 'rest api' ) );
-
- copyRestFeature( this, hasFeature( 'rest api' ) );
-
- copyTemplate( this, 'buildtool/gradle-app.tmpl', 'app/build.gradle' );
- copyTemplate( this, 'buildtool/gradle-bootstrap.tmpl', 'bootstrap/build.gradle' );
- copyTemplate( this, 'buildtool/gradle-model.tmpl', 'model/build.gradle' );
- copyTemplate( this, 'buildtool/gradle-rest.tmpl', 'rest/build.gradle' );
- copyTemplate( this, 'buildtool/gradle-root.tmpl', 'build.gradle' );
- copyTemplate( this, 'buildtool/settings.tmpl', 'settings.gradle' );
- copyTemplate( this, 'buildtool/gradlew.tmpl', 'gradlew' );
- copyTemplate( this, 'buildtool/gradlew-bat.tmpl', 'gradlew.bat' );
- this.fs.copy( this.templatePath( 'buildtool/gradle-wrapper.jar_' ), this.destinationPath( 'gradle/wrapper/gradle-wrapper.jar' ) );
- this.fs.copy( this.templatePath( 'buildtool/gradle-wrapper.properties_' ), this.destinationPath( 'gradle/wrapper/gradle-wrapper.properties' ) );
- }
- }
-);
-
-function copyPolygeneBootstrap( ctx, layer, moduleName, condition )
-{
- if( condition )
- {
- copyTemplate( ctx,
- moduleName + '/bootstrap.tmpl',
- 'bootstrap/src/main/java/' + polygene.javaPackageDir + '/bootstrap/' + layer + '/' + moduleName + '.java' );
- }
-}
-
-function copyEntityStore( ctx, entityStoreName )
-{
- copyTemplate( ctx,
- 'StorageModule/bootstrap.tmpl',
- 'bootstrap/src/main/java/' + polygene.javaPackageDir + '/bootstrap/infrastructure/' + entityStoreName + 'StorageModule.java' );
-}
-
-function copyPolygeneApp( ctx, name, condition )
-{
- if( condition )
- {
- copyTemplate( ctx,
- name + '/bootstrap.tmpl',
- 'bootstrap/src/main/java/' + polygene.javaPackageDir + '/bootstrap/' + name + 'ApplicationAssembler.java' );
-
- copyTemplate( ctx,
- name + '/app.tmpl',
- 'app/src/main/java/' + polygene.javaPackageDir + '/app/' + name + '.java' );
-
- copyTemplate( ctx,
- name + '/webapp/',
- 'app/src/main/webapp/' );
- }
-}
-
-function copyPolygeneDomain( ctx, model, module, clazz, condition )
-{
- if( condition )
- {
- copyTemplate( ctx,
- module + '/' + clazz + '.tmpl',
- 'model/src/main/java/' + polygene.javaPackageDir + '/model/' + model + '/' + clazz + '.java' );
- }
-}
-
-function copyRestFeature( ctx, condition )
-{
- if( condition )
- {
- copyPolygeneBootstrap( ctx, "domain", "SecurityModule", true );
-
- copyTemplate( ctx,
- 'RestApiModule/SimpleEnroler.tmpl',
- 'rest/src/main/java/' + polygene.javaPackageDir + '/rest/security/SimpleEnroler.java' );
-
- copyTemplate( ctx,
- 'RestApiModule/SimpleVerifier.tmpl',
- 'rest/src/main/java/' + polygene.javaPackageDir + '/rest/security/SimpleVerifier.java' );
-
- copyTemplate( ctx,
- 'RestApiModule/HardcodedSecurityRepositoryMixin.tmpl',
- 'model/src/main/java/' + polygene.javaPackageDir + '/model/security/HardcodedSecurityRepositoryMixin.java' );
- }
-}
-
-function copyHeroesSampleApp( ctx )
-{
- copyPolygeneDomain( ctx, "heroes", "Heroes", "Hero", hasFeature( 'sample (heroes) web application' ) );
- copyPolygeneApp( ctx, "Heroes", hasFeature( 'sample (heroes) web application' ) );
- copyTemplate( ctx,
- 'Heroes/web.tmpl',
- 'app/src/main/webapp/WEB-INF/web.xml' );
-}
-
-function copyTemplate( ctx, from, to )
-{
- ctx.fs.copyTpl(
- ctx.templatePath( from ),
- ctx.destinationPath( to ),
- {
- packageName: polygene.packagename,
- hasFeature: hasFeature,
- hasEntityStore: hasEntityStore,
- hasIndexing: hasIndexing,
- hasCaching: hasCaching,
- polygene: polygene
- }
- );
-}
-
-function hasEntityStore( esType )
-{
- return polygene.entitystore === esType;
-}
-
-function hasIndexing( indexingType )
-{
- return polygene.indexing === indexingType;
-}
-
-function hasCaching( cachingType )
-{
- return polygene.caching === cachingType;
-}
-
-function hasSerialization( serializer )
-{
- return polygene.serialization === serializer;
-}
-
-function hasFeature( feature )
-{
- return polygene.features.indexOf( feature ) >= 0;
-}
-
-function firstUpper( text )
-{
- return text.charAt( 0 ).toUpperCase() + text.substring( 1 );
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/ConfigModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/ConfigModule/bootstrap.tmpl b/tools/generator-zest/app/templates/ConfigModule/bootstrap.tmpl
deleted file mode 100644
index b152d3a..0000000
--- a/tools/generator-zest/app/templates/ConfigModule/bootstrap.tmpl
+++ /dev/null
@@ -1,41 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.bootstrap.config;
-
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.valueserialization.jackson.JacksonValueSerializationAssembler;
-
-public class ConfigModule
- implements ModuleAssembler
-{
- @Override
- public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
- throws AssemblyException
- {
- module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
- new JacksonValueSerializationAssembler().visibleIn( Visibility.layer ).assemble( module );
- return module;
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/ConfigurationLayer/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/ConfigurationLayer/bootstrap.tmpl b/tools/generator-zest/app/templates/ConfigurationLayer/bootstrap.tmpl
deleted file mode 100644
index bb81a83..0000000
--- a/tools/generator-zest/app/templates/ConfigurationLayer/bootstrap.tmpl
+++ /dev/null
@@ -1,46 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.bootstrap.config;
-
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.layered.LayerAssembler;
-import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
-
-public class ConfigurationLayer extends LayeredLayerAssembler
- implements LayerAssembler
-{
- public static String NAME;
- private ModuleAssembly configModule;
-
- @Override
- public LayerAssembly assemble( LayerAssembly layer )
- throws AssemblyException
- {
- configModule = createModule( layer, ConfigModule.class );
- return layer;
- }
-
- public ModuleAssembly configModule()
- {
- return configModule;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/ConnectivityLayer/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/ConnectivityLayer/bootstrap.tmpl b/tools/generator-zest/app/templates/ConnectivityLayer/bootstrap.tmpl
deleted file mode 100644
index 941e77e..0000000
--- a/tools/generator-zest/app/templates/ConnectivityLayer/bootstrap.tmpl
+++ /dev/null
@@ -1,41 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.bootstrap.connectivity;
-
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.layered.LayerAssembler;
-import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
-
-public class ConnectivityLayer extends LayeredLayerAssembler
- implements LayerAssembler
-{
- public static String NAME;
-
- @Override
- public LayerAssembly assemble( LayerAssembly layer )
- throws AssemblyException
- {
-<% if( hasFeature('rest api') ) { %>
- createModule( layer, RestApiModule.class );
-<% } -%>
- return layer;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/CrudModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/CrudModule/bootstrap.tmpl b/tools/generator-zest/app/templates/CrudModule/bootstrap.tmpl
deleted file mode 100644
index 0877723..0000000
--- a/tools/generator-zest/app/templates/CrudModule/bootstrap.tmpl
+++ /dev/null
@@ -1,38 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.bootstrap.domain;
-
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.library.restlet.assembly.CrudServiceAssembler;
-
-public class CrudModule
- implements ModuleAssembler
-{
- @Override
- public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
- throws AssemblyException
- {
- new CrudServiceAssembler().assemble( module );
- return module;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/DomainLayer/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/DomainLayer/bootstrap.tmpl b/tools/generator-zest/app/templates/DomainLayer/bootstrap.tmpl
deleted file mode 100644
index 6285025..0000000
--- a/tools/generator-zest/app/templates/DomainLayer/bootstrap.tmpl
+++ /dev/null
@@ -1,46 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.bootstrap.domain;
-
-import java.util.function.Function;
-import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.layered.LayerAssembler;
-import org.apache.polygene.bootstrap.layered.LayeredLayerAssembler;
-
-public class DomainLayer extends LayeredLayerAssembler
- implements LayerAssembler
-{
- @Override
- public LayerAssembly assemble(LayerAssembly layer)
- throws AssemblyException
- {
- createModule( layer, CrudModule.class );
- createModule( layer, SecurityModule.class );
- return layer;
- }
-
- public static Function<Application, Module> typeFinder()
- {
- return application -> application.findModule( "Domain Layer", "Assets Module" );
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/FileConfigurationModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/FileConfigurationModule/bootstrap.tmpl b/tools/generator-zest/app/templates/FileConfigurationModule/bootstrap.tmpl
deleted file mode 100644
index ab2ad2c..0000000
--- a/tools/generator-zest/app/templates/FileConfigurationModule/bootstrap.tmpl
+++ /dev/null
@@ -1,41 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.bootstrap.infrastructure;
-
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.library.fileconfig.FileConfigurationAssembler;
-
-public class FileConfigurationModule
- implements ModuleAssembler
-{
- public static String NAME;
-
- @Override
- public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
- throws AssemblyException
- {
- new FileConfigurationAssembler().visibleIn( Visibility.layer ).assemble( module );
- return module;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/Hero.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/Hero.tmpl b/tools/generator-zest/app/templates/Heroes/Hero.tmpl
deleted file mode 100644
index c3c7ec9..0000000
--- a/tools/generator-zest/app/templates/Heroes/Hero.tmpl
+++ /dev/null
@@ -1,28 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.model.heroes;
-
-import org.apache.polygene.api.identity.HasIdentity;
-import org.apache.polygene.api.property.Property;
-
-public interface Hero extends HasIdentity
-{
- Property<String> name();
-}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/app.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/app.tmpl b/tools/generator-zest/app/templates/Heroes/app.tmpl
deleted file mode 100644
index 4878f81..0000000
--- a/tools/generator-zest/app/templates/Heroes/app.tmpl
+++ /dev/null
@@ -1,103 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.app;
-
-import java.lang.reflect.UndeclaredThrowableException;
-import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
-import org.apache.polygene.library.restlet.ZrestApplication;
-import org.restlet.Context;
-import org.restlet.routing.Filter;
-import org.restlet.routing.Router;
-import org.restlet.security.Enroler;
-import org.restlet.security.Verifier;
-
-import <%= packageName %>.bootstrap.HeroesApplicationAssembler;
-import <%= packageName %>.bootstrap.connectivity.ConnectivityLayer;
-import <%= packageName %>.bootstrap.connectivity.RestApiModule;
-import <%= packageName %>.model.heroes.Hero;
-import <%= packageName %>.rest.security.SimpleEnroler;
-import <%= packageName %>.rest.security.SimpleVerifier;
-
-public class Heroes extends ZrestApplication
-{
-
- public Heroes( Context context )
- throws AssemblyException
- {
- super( context );
- }
-
- @Override
- protected void addRoutes( Router router )
- {
- addResourcePath( "heroes", Hero.class, "/" );
- }
-
- @Override
- protected LayeredApplicationAssembler createApplicationAssembler( String mode )
- throws AssemblyException
- {
- if( mode != null )
- {
- return new HeroesApplicationAssembler( Application.Mode.valueOf( mode ) );
- }
- return new HeroesApplicationAssembler( Application.Mode.production );
- }
-
- @Override
- protected Verifier createVerifier()
- {
- return newObject( SimpleVerifier.class );
- }
-
- @Override
- protected Enroler createEnroler()
- {
- return newObject( SimpleEnroler.class, this );
- }
-
- @Override
- protected String getConnectivityLayer()
- {
- return ConnectivityLayer.NAME;
- }
-
- @Override
- protected String getConnectivityModule()
- {
- return RestApiModule.NAME;
- }
-
- private <T> T newObject( Class<T> type, Object... uses )
- {
- try
- {
- T instamce = type.newInstance();
- objectFactory.injectTo( instamce, uses );
- return instamce;
- }
- catch( Exception e )
- {
- throw new UndeclaredThrowableException( e );
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/bootstrap.tmpl b/tools/generator-zest/app/templates/Heroes/bootstrap.tmpl
deleted file mode 100644
index e3a9d06..0000000
--- a/tools/generator-zest/app/templates/Heroes/bootstrap.tmpl
+++ /dev/null
@@ -1,68 +0,0 @@
-<%#
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 <%= packageName %>.bootstrap;
-
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.function.Function;
-
-import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.api.structure.Module;
-
-import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.bootstrap.layered.LayeredApplicationAssembler;
-
-import <%= packageName %>.bootstrap.connectivity.ConnectivityLayer;
-import <%= packageName %>.bootstrap.domain.DomainLayer;
-import <%= packageName %>.bootstrap.config.ConfigurationLayer;
-import <%= packageName %>.bootstrap.infrastructure.InfrastructureLayer;
-
-public class HeroesApplicationAssembler extends LayeredApplicationAssembler
-{
- private static final String NAME = "Heroes";
- private static final String VERSION = "1.0.alpha";
-
- public HeroesApplicationAssembler( Application.Mode mode )
- throws AssemblyException
- {
- super( NAME, VERSION, mode );
- }
-
- @Override
- protected void assembleLayers( ApplicationAssembly assembly )
- throws AssemblyException
- {
- LayerAssembly configLayer = createLayer( ConfigurationLayer.class );
- ModuleAssembly configModule = assemblerOf( ConfigurationLayer.class ).configModule();
- LayerAssembly domainLayer = createLayer( DomainLayer.class );
- Function<Application, Module> typeFinder = DomainLayer.typeFinder();
- LayerAssembly infraLayer = new InfrastructureLayer( configModule, typeFinder ).assemble( assembly.layer( InfrastructureLayer.NAME ) );
- LayerAssembly connectivityLayer = createLayer( ConnectivityLayer.class );
- connectivityLayer.uses( domainLayer );
- domainLayer.uses( infraLayer );
- infraLayer.uses( configLayer );
- }
-}
-
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/web.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/web.tmpl b/tools/generator-zest/app/templates/Heroes/web.tmpl
deleted file mode 100644
index dda4f37..0000000
--- a/tools/generator-zest/app/templates/Heroes/web.tmpl
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<%#
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you 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.
- ~
- ~
-%>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- version="2.5">
-
- <display-name><%= polygene.name %></display-name>
-
-
- <servlet>
- <servlet-name>Restlet</servlet-name>
- <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
- <init-param>
- <param-name>org.apache.polygene.runtime.mode</param-name>
- <param-value>development</param-value>
- </init-param>
- <init-param>
- <!-- Application class name -->
- <param-name>org.restlet.application</param-name>
- <param-value><%= packageName %>.app.Heroes</param-value>
- </init-param>
- <init-param>
- <!-- Protocols to be bound to-->
- <param-name>org.restlet.clients</param-name>
- <param-value>HTTP HTTPS</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Restlet</servlet-name>
- <url-pattern>/api/1/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.css
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.css b/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.css
deleted file mode 100644
index cb651f5..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.css
+++ /dev/null
@@ -1,34 +0,0 @@
-nav a {
- padding: 5px 10px;
- text-decoration: none;
- margin-top: 10px;
- display: inline-block;
- background-color: #eee;
- border-radius: 4px;
-}
-nav a:visited, a:link {
- color: #607D8B;
-}
-nav a:hover {
- color: #039be5;
- background-color: #CFD8DC;
-}
-nav a.router-link-active {
- color: #039be5;
-}
-h1 {
- font-size: 1.2em;
- color: #999;
- margin-bottom: 0;
-}
-h2 {
- font-size: 2em;
- margin-top: 0;
- padding-top: 0;
-}
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js b/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js
deleted file mode 100644
index 18aeea4..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js
+++ /dev/null
@@ -1,41 +0,0 @@
-"use strict";
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var core_1 = require('angular2/core');
-var router_1 = require('angular2/router');
-var heroes_component_1 = require('./heroes.component');
-var hero_detail_component_1 = require('./hero-detail.component');
-var dashboard_component_1 = require('./dashboard.component');
-var hero_service_1 = require('./hero.service');
-var AppComponent = (function () {
- function AppComponent() {
- this.title = 'Tour of Heroes';
- }
- AppComponent = __decorate([
- core_1.Component({
- selector: 'my-app',
- template: "\n <h1>{{title}}</h1>\n <nav>\n <a [routerLink]=\"['Dashboard']\">Dashboard</a>\n <a [routerLink]=\"['Heroes']\">Heroes</a>\n </nav>\n <router-outlet></router-outlet>\n ",
- styleUrls: ['app/app.component.css'],
- directives: [router_1.ROUTER_DIRECTIVES],
- providers: [hero_service_1.HeroService]
- }),
- router_1.RouteConfig([
- // {path: '/', redirectTo: ['Dashboard'] },
- { path: '/dashboard', name: 'Dashboard', component: dashboard_component_1.DashboardComponent, useAsDefault: true },
- { path: '/heroes', name: 'Heroes', component: heroes_component_1.HeroesComponent },
- { path: '/detail/:id', name: 'HeroDetail', component: hero_detail_component_1.HeroDetailComponent }
- ])
- ], AppComponent);
- return AppComponent;
-}());
-exports.AppComponent = AppComponent;
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
-//# sourceMappingURL=app.component.js.map
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js.map
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js.map b/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js.map
deleted file mode 100644
index bade57d..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":[],"mappings":";;;;;;;AAAA,qBAAwB,eAAe,CAAC,CAAA;AACxC,uBAA6C,iBAAiB,CAAC,CAAA;AAC/D,iCAA8B,oBAAoB,CAAC,CAAA;AACnD,sCAAkC,yBAAyB,CAAC,CAAA;AAC5D,oCAAiC,uBAAuB,CAAC,CAAA;AACzD,6BAA0B,gBAAgB,CAAC,CAAA;AAsB3C;IAAA;QACE,UAAK,GAAG,gBAAgB,CAAC;IAC3B,CAAC;IAtBD;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,kMAOT;YACD,SAAS,EAAE,CAAC,uBAAuB,CAAC;YACpC,UAAU,EAAE,CAAC,0BAAiB,CAAC;YAC/B,SAAS,EAAE,CAAC,0BAAW,CAAC;SACzB,CAAC;QACD,oBAAW,CAAC;YACX,2CAA2C;YAC3C,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,wCAAkB,EAAE,YAAY,EAAE,IAAI,EAAC;YAC1F,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,kCAAe,EAAC;YAC7D,EAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,2CAAmB,EAAC;SAC1E,CAAC;oBAAA;IAGF,mBAAC;AAAD,CAAC,AAFD,IAEC;AAFY,oBAAY,eAExB,CAAA;AAGD;;;;EAIE"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.ts
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.ts b/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.ts
deleted file mode 100644
index 222874b..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/app.component.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import {Component} from 'angular2/core';
-import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
-import {HeroesComponent} from './heroes.component';
-import {HeroDetailComponent} from './hero-detail.component';
-import {DashboardComponent} from './dashboard.component';
-import {HeroService} from './hero.service';
-
-@Component({
- selector: 'my-app',
- template: `
- <h1>{{title}}</h1>
- <nav>
- <a [routerLink]="['Dashboard']">Dashboard</a>
- <a [routerLink]="['Heroes']">Heroes</a>
- </nav>
- <router-outlet></router-outlet>
- `,
- styleUrls: ['app/app.component.css'],
- directives: [ROUTER_DIRECTIVES],
- providers: [HeroService]
-})
-@RouteConfig([
- // {path: '/', redirectTo: ['Dashboard'] },
- {path: '/dashboard', name: 'Dashboard', component: DashboardComponent, useAsDefault: true},
- {path: '/heroes', name: 'Heroes', component: HeroesComponent},
- {path: '/detail/:id', name: 'HeroDetail', component: HeroDetailComponent}
-])
-export class AppComponent {
- title = 'Tour of Heroes';
-}
-
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.css
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.css b/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.css
deleted file mode 100644
index b9d3215..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.css
+++ /dev/null
@@ -1,67 +0,0 @@
-[class*='col-'] {
- float: left;
-}
-*, *:after, *:before {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-h3 {
- text-align: center; margin-bottom: 0;
-}
-[class*='col-'] {
- padding-right: 20px;
- padding-bottom: 20px;
-}
-[class*='col-']:last-of-type {
- padding-right: 0;
-}
-.grid {
- margin: 0;
-}
-.col-1-4 {
- width: 25%;
-}
-.module {
- padding: 20px;
- text-align: center;
- color: #eee;
- max-height: 120px;
- min-width: 120px;
- background-color: #607D8B;
- border-radius: 2px;
-}
-h4 {
- position: relative;
-}
-.module:hover {
- background-color: #EEE;
- cursor: pointer;
- color: #607d8b;
-}
-.grid-pad {
- padding: 10px 0;
-}
-.grid-pad > [class*='col-']:last-of-type {
- padding-right: 20px;
-}
-@media (max-width: 600px) {
- .module {
- font-size: 10px;
- max-height: 75px; }
-}
-@media (max-width: 1024px) {
- .grid {
- margin: 0;
- }
- .module {
- min-width: 60px;
- }
-}
-
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.html
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.html b/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.html
deleted file mode 100644
index 3fc7517..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h3>Top Heroes</h3>
-<div class="grid grid-pad">
- <div *ngFor="#hero of heroes" class="col-1-4" (click)="gotoDetail(hero)">
- <div class="module hero">
- <h4>{{hero.name}}</h4>
- </div>
- </div>
-</div>
-
-
-<!--
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
--->
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js b/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js
deleted file mode 100644
index 9c69780..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js
+++ /dev/null
@@ -1,38 +0,0 @@
-"use strict";
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var core_1 = require('angular2/core');
-var DashboardComponent = (function () {
- function DashboardComponent(_heroService, _router) {
- this._heroService = _heroService;
- this._router = _router;
- this.heroes = [];
- }
- DashboardComponent.prototype.ngOnInit = function () {
- var _this = this;
- this._heroService.getHeroes().then(function (heroes) { return _this.heroes = heroes.slice(1, 5); });
- };
- DashboardComponent.prototype.gotoDetail = function (hero) {
- var link = ['HeroDetail', { id: hero.id }];
- this._router.navigate(link);
- };
- DashboardComponent = __decorate([
- core_1.Component({
- selector: 'my-dashboard',
- templateUrl: 'app/dashboard.component.html',
- styleUrls: ['app/dashboard.component.css']
- })
- ], DashboardComponent);
- return DashboardComponent;
-}());
-exports.DashboardComponent = DashboardComponent;
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
-//# sourceMappingURL=dashboard.component.js.map
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js.map
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js.map b/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js.map
deleted file mode 100644
index 5bc16f0..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"dashboard.component.js","sourceRoot":"","sources":["dashboard.component.ts"],"names":[],"mappings":";;;;;;;AAAA,qBAAgC,eAAe,CAAC,CAAA;AAUhD;IAGE,4BAAoB,YAAyB,EAAU,OAAe;QAAlD,iBAAY,GAAZ,YAAY,CAAa;QAAU,YAAO,GAAP,OAAO,CAAQ;QAFtE,WAAM,GAAW,EAAE,CAAC;IAEsD,CAAC;IAE3E,qCAAQ,GAAR;QAAA,iBAEC;QADC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAC,CAAC,CAAC,EAA/B,CAA+B,CAAC,CAAC;IAChF,CAAC;IAED,uCAAU,GAAV,UAAW,IAAU;QACnB,IAAI,IAAI,GAAG,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAjBH;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE,8BAA8B;YAC3C,SAAS,EAAE,CAAC,6BAA6B,CAAC;SAC3C,CAAC;0BAAA;IAcF,yBAAC;AAAD,CAAC,AAbD,IAaC;AAbY,0BAAkB,qBAa9B,CAAA;AAGD;;;;EAIE"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.ts
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.ts b/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.ts
deleted file mode 100644
index c8160d1..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/dashboard.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import {Component, OnInit} from 'angular2/core';
-import {Router} from 'angular2/router';
-import {Hero} from './hero';
-import {HeroService} from './hero.service';
-
-@Component({
- selector: 'my-dashboard',
- templateUrl: 'app/dashboard.component.html',
- styleUrls: ['app/dashboard.component.css']
-})
-export class DashboardComponent implements OnInit {
- heroes: Hero[] = [];
-
- constructor(private _heroService: HeroService, private _router: Router) { }
-
- ngOnInit() {
- this._heroService.getHeroes().then(heroes => this.heroes = heroes.slice(1,5));
- }
-
- gotoDetail(hero: Hero) {
- let link = ['HeroDetail', { id: hero.id }];
- this._router.navigate(link);
- }
-}
-
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.css
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.css b/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.css
deleted file mode 100644
index 2a0e285..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.css
+++ /dev/null
@@ -1,36 +0,0 @@
-label {
- display: inline-block;
- width: 3em;
- margin: .5em 0;
- color: #607D8B;
- font-weight: bold;
-}
-input {
- height: 2em;
- font-size: 1em;
- padding-left: .4em;
-}
-button {
- margin-top: 20px;
- font-family: Arial;
- background-color: #eee;
- border: none;
- padding: 5px 10px;
- border-radius: 4px;
- cursor: pointer; cursor: hand;
-}
-button:hover {
- background-color: #cfd8dc;
-}
-button:disabled {
- background-color: #eee;
- color: #ccc;
- cursor: auto;
-}
-
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.html
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.html b/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.html
deleted file mode 100644
index 1e85e75..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<div *ngIf="hero">
- <h2>{{hero.name}} details!</h2>
- <div>
- <label>id: </label>{{hero.id}}</div>
- <div>
- <label>name: </label>
- <input [(ngModel)]="hero.name" placeholder="name"/>
- </div>
- <button (click)="goBack()">Back</button>
-</div>
-
-<!--
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
--->
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js b/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js
deleted file mode 100644
index 56d5fa5..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js
+++ /dev/null
@@ -1,37 +0,0 @@
-"use strict";
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var core_1 = require('angular2/core');
-var HeroDetailComponent = (function () {
- function HeroDetailComponent(_heroService, _routeParams) {
- this._heroService = _heroService;
- this._routeParams = _routeParams;
- }
- HeroDetailComponent.prototype.ngOnInit = function () {
- var _this = this;
- var id = +this._routeParams.get('id');
- this._heroService.getHero(id).then(function (hero) { return _this.hero = hero; });
- };
- HeroDetailComponent.prototype.goBack = function () {
- window.history.back();
- };
- HeroDetailComponent = __decorate([
- core_1.Component({
- selector: 'my-hero-detail',
- templateUrl: 'app/hero-detail.component.html',
- styleUrls: ['app/hero-detail.component.css']
- })
- ], HeroDetailComponent);
- return HeroDetailComponent;
-}());
-exports.HeroDetailComponent = HeroDetailComponent;
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
-//# sourceMappingURL=hero-detail.component.js.map
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js.map
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js.map b/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js.map
deleted file mode 100644
index 3928563..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"hero-detail.component.js","sourceRoot":"","sources":["hero-detail.component.ts"],"names":[],"mappings":";;;;;;;AAAA,qBAAgC,eAAe,CAAC,CAAA;AAWhD;IAGE,6BAAoB,YAAyB,EACnC,YAAyB;QADf,iBAAY,GAAZ,YAAY,CAAa;QACnC,iBAAY,GAAZ,YAAY,CAAa;IACnC,CAAC;IAED,sCAAQ,GAAR;QAAA,iBAGC;QAFC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,KAAI,CAAC,IAAI,GAAG,IAAI,EAAhB,CAAgB,CAAC,CAAC;IAC/D,CAAC;IAED,oCAAM,GAAN;QACE,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;IAnBH;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,gCAAgC;YAC7C,SAAS,EAAE,CAAC,+BAA+B,CAAC;SAC7C,CAAC;2BAAA;IAgBF,0BAAC;AAAD,CAAC,AAfD,IAeC;AAfY,2BAAmB,sBAe/B,CAAA;AAGD;;;;EAIE"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.ts
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.ts b/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.ts
deleted file mode 100644
index 0181847..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero-detail.component.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import {Component, OnInit} from 'angular2/core';
-import {RouteParams} from 'angular2/router';
-
-import {Hero} from './hero';
-import {HeroService} from './hero.service';
-
-@Component({
- selector: 'my-hero-detail',
- templateUrl: 'app/hero-detail.component.html',
- styleUrls: ['app/hero-detail.component.css']
-})
-export class HeroDetailComponent implements OnInit {
- hero: Hero;
-
- constructor(private _heroService: HeroService,
- private _routeParams: RouteParams) {
- }
-
- ngOnInit() {
- let id = +this._routeParams.get('id');
- this._heroService.getHero(id).then(hero => this.hero = hero);
- }
-
- goBack() {
- window.history.back();
- }
-}
-
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js b/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js
deleted file mode 100644
index 0c6fe2e..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-var Hero = (function () {
- function Hero() {
- }
- return Hero;
-}());
-exports.Hero = Hero;
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
-//# sourceMappingURL=hero.js.map
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js.map
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js.map b/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js.map
deleted file mode 100644
index 4a29533..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"hero.js","sourceRoot":"","sources":["hero.ts"],"names":[],"mappings":";AAAA;IAAA;IAGA,CAAC;IAAD,WAAC;AAAD,CAAC,AAHD,IAGC;AAHY,YAAI,OAGhB,CAAA;AAGD;;;;EAIE"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js b/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js
deleted file mode 100644
index 3f92669..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"use strict";
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var core_1 = require('angular2/core');
-var mock_heroes_1 = require('./mock-heroes');
-var HeroService = (function () {
- function HeroService() {
- }
- HeroService.prototype.getHeroes = function () {
- return Promise.resolve(mock_heroes_1.HEROES);
- };
- HeroService.prototype.getHero = function (id) {
- return Promise.resolve(mock_heroes_1.HEROES).then(function (heroes) { return heroes.filter(function (hero) { return hero.id === id; })[0]; });
- };
- HeroService = __decorate([
- core_1.Injectable()
- ], HeroService);
- return HeroService;
-}());
-exports.HeroService = HeroService;
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
-//# sourceMappingURL=hero.service.js.map
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js.map
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js.map b/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js.map
deleted file mode 100644
index 2485ba7..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"hero.service.js","sourceRoot":"","sources":["hero.service.ts"],"names":[],"mappings":";;;;;;;AAAA,qBAAyB,eAAe,CAAC,CAAA;AACzC,4BAAyB,eAAe,CAAC,CAAA;AAGzC;IAAA;IAUA,CAAC;IATC,+BAAS,GAAT;QACE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAM,CAAC,CAAC;IACjC,CAAC;IAEF,6BAAO,GAAP,UAAQ,EAAU;QACf,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAM,CAAC,CAAC,IAAI,CACjC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,EAAE,KAAK,EAAE,EAAd,CAAc,CAAC,CAAC,CAAC,CAAC,EAAxC,CAAwC,CACnD,CAAC;IACJ,CAAC;IAVH;QAAC,iBAAU,EAAE;mBAAA;IAWb,kBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,mBAAW,cAUvB,CAAA;AAGD;;;;EAIE"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.ts
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.ts b/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.ts
deleted file mode 100644
index aee78a1..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.service.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import {Injectable} from 'angular2/core';
-import {HEROES} from './mock-heroes';
-
-@Injectable()
-export class HeroService {
- getHeroes() {
- return Promise.resolve(HEROES);
- }
-
- getHero(id: number) {
- return Promise.resolve(HEROES).then(
- heroes => heroes.filter(hero => hero.id === id)[0]
- );
- }
-}
-
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-java/blob/e0e1d7d4/tools/generator-zest/app/templates/Heroes/webapp/app/hero.ts
----------------------------------------------------------------------
diff --git a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.ts b/tools/generator-zest/app/templates/Heroes/webapp/app/hero.ts
deleted file mode 100644
index 812726c..0000000
--- a/tools/generator-zest/app/templates/Heroes/webapp/app/hero.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export class Hero {
- id: number;
- name: string;
-}
-
-
-/*
-Copyright 2016 Google Inc. All Rights Reserved.
-Use of this source code is governed by an MIT-style license that
-can be found in the LICENSE file at http://angular.io/license
-*/
\ No newline at end of file