You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2017/05/28 22:20:26 UTC
svn commit: r1796553 - in /sling/whiteboard/pauls/gush: examples/
examples/chat/ examples/chat/.settings/ examples/chat/src/
examples/chat/src/main/ examples/chat/src/main/java/
examples/chat/src/main/resources/ examples/chat/src/main/resources/SLING-I...
Author: pauls
Date: Sun May 28 22:20:26 2017
New Revision: 1796553
URL: http://svn.apache.org/viewvc?rev=1796553&view=rev
Log:
Add the scaffolding for a an example chat.
Added:
sling/whiteboard/pauls/gush/examples/
sling/whiteboard/pauls/gush/examples/chat/
sling/whiteboard/pauls/gush/examples/chat/.classpath
sling/whiteboard/pauls/gush/examples/chat/.project
sling/whiteboard/pauls/gush/examples/chat/.settings/
sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.core.resources.prefs
sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.jdt.core.prefs
sling/whiteboard/pauls/gush/examples/chat/pom.xml
sling/whiteboard/pauls/gush/examples/chat/src/
sling/whiteboard/pauls/gush/examples/chat/src/main/
sling/whiteboard/pauls/gush/examples/chat/src/main/java/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/examples/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/examples/chat/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/examples/chat/html.esp
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/gush/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/gush/examples/
sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/gush/examples/chat.json
Modified:
sling/whiteboard/pauls/gush/launchpad/src/main/provisioning/model.txt
Added: sling/whiteboard/pauls/gush/examples/chat/.classpath
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat/.classpath?rev=1796553&view=auto
==============================================================================
--- sling/whiteboard/pauls/gush/examples/chat/.classpath (added)
+++ sling/whiteboard/pauls/gush/examples/chat/.classpath Sun May 28 22:20:26 2017
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: sling/whiteboard/pauls/gush/examples/chat/.project
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat/.project?rev=1796553&view=auto
==============================================================================
--- sling/whiteboard/pauls/gush/examples/chat/.project (added)
+++ sling/whiteboard/pauls/gush/examples/chat/.project Sun May 28 22:20:26 2017
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>chat</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.core.resources.prefs?rev=1796553&view=auto
==============================================================================
--- sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.core.resources.prefs (added)
+++ sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.core.resources.prefs Sun May 28 22:20:26 2017
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding/<project>=UTF-8
Added: sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.jdt.core.prefs?rev=1796553&view=auto
==============================================================================
--- sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.jdt.core.prefs (added)
+++ sling/whiteboard/pauls/gush/examples/chat/.settings/org.eclipse.jdt.core.prefs Sun May 28 22:20:26 2017
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.8
Added: sling/whiteboard/pauls/gush/examples/chat/pom.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat/pom.xml?rev=1796553&view=auto
==============================================================================
--- sling/whiteboard/pauls/gush/examples/chat/pom.xml (added)
+++ sling/whiteboard/pauls/gush/examples/chat/pom.xml Sun May 28 22:20:26 2017
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>sling</artifactId>
+ <version>30</version>
+ <relativePath />
+ </parent>
+
+ <artifactId>org.apache.sling.whiteboard.pauls.gush.examples.chat</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>Apache Sling Whiteboard Pauls Gush Examples Chat</name>
+ <description>
+ A Sling gush based example chat.
+ </description>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/whiteboard/pauls/gush/examples/chat</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/whiteboard/pauls/gush/examples/chat.json</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat</url>
+ </scm>
+
+ <properties>
+ <sling.java.version>8</sling.java.version>
+ </properties>
+
+ <build>
+ <plugins>
+ <!-- Create the bundle of the Sling API -->
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package></Export-Package>
+ <Sling-Initial-Content>SLING-INF/apps;overwrite:=true;path:=/apps,SLING-INF/content;path:=/content</Sling-Initial-Content>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>target/*</exclude>
+ <exclude>src/main/resources/content/**</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ </dependencies>
+</project>
Added: sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/examples/chat/html.esp
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/examples/chat/html.esp?rev=1796553&view=auto
==============================================================================
--- sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/examples/chat/html.esp (added)
+++ sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/apps/gush/examples/chat/html.esp Sun May 28 22:20:26 2017
@@ -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.
+-->
+<html>
+ <head>
+ <script>
+ function b64DecodeUnicode(str) {
+ return decodeURIComponent(atob(str).split('').map(function(c) {
+ return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
+ }).join(''));
+ }
+ var source = new EventSource('/gush/content/test.json');
+ source.onmessage = function(e) {
+ var foo = JSON.parse(e.data);
+ document.body.innerHTML += foo.contenttype + ' ' + b64DecodeUnicode(foo.body) + '<br>';
+ };
+ </script>
+ </head>
+ <body>
+ </body>
+</html>"
Added: sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/gush/examples/chat.json
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/gush/examples/chat.json?rev=1796553&view=auto
==============================================================================
--- sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/gush/examples/chat.json (added)
+++ sling/whiteboard/pauls/gush/examples/chat/src/main/resources/SLING-INF/content/gush/examples/chat.json Sun May 28 22:20:26 2017
@@ -0,0 +1,4 @@
+{
+ "jcr:primaryType" : "nt:unstructured",
+ "sling:resourceType" : "gush/examples/chat"
+}
Modified: sling/whiteboard/pauls/gush/launchpad/src/main/provisioning/model.txt
URL: http://svn.apache.org/viewvc/sling/whiteboard/pauls/gush/launchpad/src/main/provisioning/model.txt?rev=1796553&r1=1796552&r2=1796553&view=diff
==============================================================================
--- sling/whiteboard/pauls/gush/launchpad/src/main/provisioning/model.txt (original)
+++ sling/whiteboard/pauls/gush/launchpad/src/main/provisioning/model.txt Sun May 28 22:20:26 2017
@@ -22,6 +22,7 @@
org.apache.sling/org.apache.sling.launchpad/9-SNAPSHOT/slingstart
org.apache.sling/org.apache.sling.commons.json/2.0.20
org.apache.sling/org.apache.sling.whiteboard.pauls.gush.servlet/0.1.0-SNAPSHOT
+ org.apache.sling/org.apache.sling.whiteboard.pauls.gush.examples.chat/0.1.0-SNAPSHOT
# additional configuration for testing
[configurations]