You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by sb...@apache.org on 2015/01/24 19:02:55 UTC
[2/2] incubator-streams git commit: resolves STREAMS-268
resolves STREAMS-268
Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/de250750
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/de250750
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/de250750
Branch: refs/heads/STREAMS-268
Commit: de250750f9e86b28b372a4a559003917b4f20374
Parents: c9fafe7
Author: Steve Blackmon <sb...@apache.org>
Authored: Sat Jan 24 12:02:33 2015 -0600
Committer: Steve Blackmon <sb...@apache.org>
Committed: Sat Jan 24 12:02:33 2015 -0600
----------------------------------------------------------------------
pom.xml | 1 -
streams-web/pom.xml | 224 -------------------
.../main/webapp/WEB-INF/cassandra.properties | 5 -
.../main/webapp/WEB-INF/propertiesLoader.xml | 36 ---
.../main/webapp/WEB-INF/spring-web-servlet.xml | 49 ----
.../src/main/webapp/WEB-INF/streams.properties | 43 ----
streams-web/src/main/webapp/WEB-INF/web.xml | 57 -----
.../src/main/webapp/demo/activityDemo.html | 43 ----
.../src/main/webapp/demo/css/activityStyles.css | 26 ---
.../src/main/webapp/demo/js/activityDemo.js | 83 -------
.../src/main/webapp/demo/js/publisher.js | 60 -----
.../src/main/webapp/demo/js/subscriber.js | 57 -----
streams-web/src/main/webapp/demo/publisher.html | 91 --------
.../src/main/webapp/demo/subscriber.html | 57 -----
streams-web/src/main/webapp/index.html | 27 ---
15 files changed, 859 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2e4a914..e8f534e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -231,7 +231,6 @@
<module>streams-pojo-extensions</module>
<module>streams-runtimes</module>
<module>streams-util</module>
- <module>streams-web</module>
</modules>
<packaging>pom</packaging>
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/pom.xml
----------------------------------------------------------------------
diff --git a/streams-web/pom.xml b/streams-web/pom.xml
deleted file mode 100644
index 8061ff8..0000000
--- a/streams-web/pom.xml
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.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
- ~
- ~ 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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>streams-project</artifactId>
- <groupId>org.apache.streams</groupId>
- <version>0.1-SNAPSHOT</version>
- </parent>
- <artifactId>streams-web</artifactId>
- <packaging>war</packaging>
-
- <name>${project.artifactId}</name>
-
- <description>Apache Streams Web App</description>
-
- <properties>
- <spring.version>3.0.5.RELEASE</spring.version>
- <junit.version>4.11</junit.version>
- <jdk.version>1.7</jdk.version>
- <camel.version>2.14.0</camel.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.streams</groupId>
- <artifactId>streams-runtime-webapp</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.streams.osgi.components</groupId>
- <artifactId>activity-consumer</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.streams.osgi.components</groupId>
- <artifactId>activity-subscriber</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.streams.osgi.components</groupId>
- <artifactId>activity-registration</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.streams</groupId>
- <artifactId>streams-persist-cassandra</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-web</artifactId>
- <version>${camel.version}</version>
- <type>war</type>
- <scope>runtime</scope>
- </dependency>
-
- <!-- Dependencies for using ActiveMQ -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-camel</artifactId>
- <version>5.5.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.xbean</groupId>
- <artifactId>xbean-spring</artifactId>
- <version>3.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- <version>${camel.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-servlet</artifactId>
- <version>${camel.version}</version>
- </dependency>
-
- <!-- Dependencies for stream processing in Camel
- http://camel.apache.org/stream.html -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-stream</artifactId>
- <version>${camel.version}</version>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
- <!--rave-->
- <dependency>
- <groupId>org.apache.rave</groupId>
- <artifactId>rave-core-api</artifactId>
- <version>${rave.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.rave</groupId>
- <artifactId>rave-core</artifactId>
- <version>${rave.version}</version>
- </dependency>
-
- </dependencies>
- <build>
- <finalName>streams-web</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>2.9.0</version>
- </plugin>
-
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>7.5.3.v20111011</version>
-
- <configuration>
- <webAppConfig>
- <contextPath>/</contextPath>
- </webAppConfig>
-
- <systemProperties>
- <!-- enable easy JMX connection to JConsole -->
- <systemProperty>
- <name>com.sun.management.jmxremote</name>
- <value/>
- </systemProperty>
- </systemProperties>
- <scanIntervalSeconds>10</scanIntervalSeconds>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.2</version>
- <executions>
- <execution>
- <id>default-copy-resources</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <overwrite>true</overwrite>
- <outputDirectory>${project.build.directory}/${project.project.artifactId}/WEB-INF/spring</outputDirectory>
- <resources>
- <resource>
- <directory>${project.parent.basedir}/streams-eip-routes/src/main/resources/META-INF/spring</directory>
- <excludes>
- <exclude>streams-eip-osgi-component-import.xml</exclude>
- <exclude>propertiesLoader.xml</exclude>
- <exclude>streams.properties</exclude>
- </excludes>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/WEB-INF/cassandra.properties
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/WEB-INF/cassandra.properties b/streams-web/src/main/webapp/WEB-INF/cassandra.properties
deleted file mode 100644
index b7ea724..0000000
--- a/streams-web/src/main/webapp/WEB-INF/cassandra.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-keyspaceName=keyspacetest
-activitystreamsColumnFamilyName=activitystreams
-subscriptionColumnFamilyName=subscriptions
-publisherColumnFamilyName=publishers
-cassandraPort=127.0.0.1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/WEB-INF/propertiesLoader.xml
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/WEB-INF/propertiesLoader.xml b/streams-web/src/main/webapp/WEB-INF/propertiesLoader.xml
deleted file mode 100644
index d90ef76..0000000
--- a/streams-web/src/main/webapp/WEB-INF/propertiesLoader.xml
+++ /dev/null
@@ -1,36 +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
- ~
- ~ 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.
- -->
-
-<beans
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-
-
- <context:property-placeholder
- location="WEB-INF/streams.properties,
- WEB-INF/cassandra.properties"
- ignore-unresolvable="true"/>
-
- <bean id="configuration" class="org.apache.streams.messaging.configuration.EipConfigurator" />
- <bean id="cassandraConfig" class="org.apache.streams.cassandra.configuration.CassandraConfiguration" />
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml b/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml
deleted file mode 100644
index 2d6557d..0000000
--- a/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml
+++ /dev/null
@@ -1,49 +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
- ~
- ~ 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.
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
- <context:component-scan base-package="org.apache.streams" />
- <context:component-scan base-package="org.apache.camel.web" />
-
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix">
- <value>/WEB-INF/</value>
- </property>
- <property name="suffix">
- <value>.jsp</value>
- </property>
- </bean>
-
-
- <bean id="activityPublisherRegistration" class="org.apache.streams.osgi.components.impl.ActivityPublisherRegistrationImpl" />
- <bean id="activityConsumerWarehouse" class="org.apache.streams.osgi.components.activityconsumer.impl.ActivityConsumerWarehouseImpl" />
-
- <bean id="activityStreamsSubscriberRegistration" class="org.apache.streams.osgi.components.impl.ActivityStreamsSubscriberRegistrationImpl" />
- <bean id="activityStreamsSubscriberWarehouse" class="org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriberWarehouseImpl" />
-
-
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/WEB-INF/streams.properties
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/WEB-INF/streams.properties b/streams-web/src/main/webapp/WEB-INF/streams.properties
deleted file mode 100644
index 157fb64..0000000
--- a/streams-web/src/main/webapp/WEB-INF/streams.properties
+++ /dev/null
@@ -1,43 +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
-#
-# 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.
-#
-
-servlet.baseUrlPath=http://localhost:8080/streams-web/
-
-consumer.inRouteHost=localhost
-consumer.inRoutePort=8000
-consumer.activityQUri = direct:activityQ
-
-consumer.publisherEndpointProtocol=servlet:///
-consumer.publisherEndpointUrlResource=publish
-
-consumer.receiveMethod=receive
-consumer.splitMethod=split
-
-consumer.registrationEndpoint=servlet:///publisher/register
-
-subscriber.inRouteHost=localhost
-subscriber.inRoutePort=8000
-subscriber.subscriberEndpointUrlResource=subscriber
-subscriber.receiveMethod=receive
-subscriber.postMethod=updateActivityStreamsSubscriberConfiguration
-subscriber.getMethod=getStream
-subscriber.registrationEndpoint=servlet:///subscriber/register
-subscriber.subscriberEndpointProtocol=servlet:///
-
-
-activemq.jmsConnectionFactoryUrl=tcp://localhost:61616
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/WEB-INF/web.xml b/streams-web/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index faf2ba6..0000000
--- a/streams-web/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,57 +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
- ~
- ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- id="Shindig"
- version="2.5">
- <display-name>Streams</display-name>
-
- <!-- tell Spring where it should load the XML file -->
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>
- /WEB-INF/propertiesLoader.xml
- /WEB-INF/spring/*.xml
- /WEB-INF/spring-web-servlet.xml
- </param-value>
- </context-param>
- <!-- the listener that kick-starts Spring -->
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
-
- <!-- Camel servlet -->
- <servlet>
- <servlet-name>CamelServlet</servlet-name>
- <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- Camel servlet mapping -->
- <servlet-mapping>
- <servlet-name>CamelServlet</servlet-name>
- <url-pattern>/apps/*</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list><welcome-file>/demo/index.html</welcome-file></welcome-file-list>
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/demo/activityDemo.html
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/demo/activityDemo.html b/streams-web/src/main/webapp/demo/activityDemo.html
deleted file mode 100644
index c8e3a1d..0000000
--- a/streams-web/src/main/webapp/demo/activityDemo.html
+++ /dev/null
@@ -1,43 +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
- ~
- ~ 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.
- -->
-<!DOCTYPE HTML>
-<html xmlns="http://www.w3.org/1999/html">
-<head>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js"></script>
- <script type="text/javascript" src="js/activityDemo.js"></script>
- <link rel="stylesheet" type="text/css" href="css/activityStyles.css" />
- <title>Activity Streams Demo</title>
-</head>
-<body>
- <label>View Streams for the following tag:</label><br>
- <textarea id="tag" rows="2"></textarea><br>
- <button type="button" onclick="activityDemo.getActivitiesForGivenTag()">Get Activities</button><br><br>
-
- <div id="activityStream"></div>
- <script type="text/x-handlebars-template" id='activity-template'>
- <!--Iterates through each activity in the array that was returned from Streams-->
- {{#each this}}
- <div class='activity'>
- <div class='actor'>{{actor.id}} {{verb}} {{published}}</div>
- </div>
- {{/each}}
- </script>
-
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/demo/css/activityStyles.css
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/demo/css/activityStyles.css b/streams-web/src/main/webapp/demo/css/activityStyles.css
deleted file mode 100644
index a496f2e..0000000
--- a/streams-web/src/main/webapp/demo/css/activityStyles.css
+++ /dev/null
@@ -1,26 +0,0 @@
-/*<license>
-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
-
- 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.
-</license>*/
-.activity {
- -moz-box-shadow: 3px 3px 5px 6px #ccc;
- -webkit-box-shadow: 3px 3px 5px 6px #ccc;
- box-shadow: 3px 3px 5px 6px #ccc;
- padding: .3em .7em .3em .7em;
- width: 300px;
- margin-top: 25px;
- margin-bottom: 25px; }
-.actor { text-align: left; }
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/demo/js/activityDemo.js
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/demo/js/activityDemo.js b/streams-web/src/main/webapp/demo/js/activityDemo.js
deleted file mode 100644
index 2d5421d..0000000
--- a/streams-web/src/main/webapp/demo/js/activityDemo.js
+++ /dev/null
@@ -1,83 +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
- ~
- ~ 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 activityDemo = activityDemo || (function(){
- var subscriberURL = "";
- var registerUrl = "/streams-web/apps/subscriber/register";
- var activityStream = "";
-
- var getActivitiesForGivenTag = function(){
-
- registerSubscriber();
- };
-
- // Registers a new subscriber and sets the subscriber's filter(s)
- // based on tag entered by the user on the demo webpage
- var registerSubscriber = function(){
- var tag = $("#tag").val();
- console.log("tag = " + tag);
- var registrationObject =
- {
- "authToken": "token",
- "@class":"org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriptionImpl",
- "filters": [
- tag
- ]
- };
-
- $.ajax({
- url:registerUrl,
- contentType: 'application/json',
- type:"POST",
- data:JSON.stringify(registrationObject),
- success:function(data){
- console.log(data);
- subscriberURL = data;
- getActivitiesStream();
- }
- })
- };
-
- // Gets activities streams array
- var getActivitiesStream = function(){
- if(!subscriberURL){
- alert("Please enter a subscriber url first");
- }
-
- $.ajax({
- contentType: "application/json",
- type:"GET",
- url: subscriberURL,
- success:function(data){
- setTemplate(data);
- }
- })
- };
-
- // Applies the array returned from Streams to the html template to be displayed
- var setTemplate = function(activityStreamData){
- var source = $("#activity-template").html();
- var template = Handlebars.compile(source);
- var html = template(activityStreamData);
- $("#activityStream").html(html);
- };
-
- return {
- getActivitiesForGivenTag: getActivitiesForGivenTag
- }
-
-})();
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/demo/js/publisher.js
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/demo/js/publisher.js b/streams-web/src/main/webapp/demo/js/publisher.js
deleted file mode 100644
index 15d2c0e..0000000
--- a/streams-web/src/main/webapp/demo/js/publisher.js
+++ /dev/null
@@ -1,60 +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
- ~
- ~ 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 publisher = publisher || (function(){
-
- //registers a new publisher, and returns the publisher's unique URL that you can use to POST activities
- var registerPublisher = function(){
-
- var registrationUrl;
- console.log($("#publisherRegistrationJSON").val());
- $.ajax({
- data: $("#publisherRegistrationJSON").val(),
- contentType:'application/json',
- type:'POST',
- url:'/streams-web/apps/publisher/register',
- success:function(data){
- console.log(data);
- console.log( $("#publisherRegistrationJSON").html());
- registrationUrl = data;
- $("#registrationUrl").val(registrationUrl);
- }
- });
- };
-
- //uses the publisher's unique URL to POST activities
- var postActivity = function(){
- var registrationUrl;
- $.ajax({
- data: $("#publisherActivityJSON").val(),
- url: $("#registrationUrl").val(),
- contentType:'application/json',
- type:'POST',
- success:function(data){
- console.log(data);
- $("#successMessage").html("Success! Activity Posted");
- }
- })
- };
-
- return{
- registerPublisher: registerPublisher,
- postActivity: postActivity
- };
-
-
-})();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/demo/js/subscriber.js
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/demo/js/subscriber.js b/streams-web/src/main/webapp/demo/js/subscriber.js
deleted file mode 100644
index c2e7d4d..0000000
--- a/streams-web/src/main/webapp/demo/js/subscriber.js
+++ /dev/null
@@ -1,57 +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
- ~
- ~ 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 subscriber = subscriber || (function(){
-
- //registers a new subscriber, and returns the subscriber's unique URL
- var registerSubscriber = function(){
-
- var registrationUrl;
- console.log($("").val());
- $.ajax({
- data:$("#subscriberRegistrationJSON").val(),
- contentType:"application/json",
- type:"POST",
- url:"/streams-web/apps/subscriber/register",
- success:function(data){
- console.log(data);
- registrationUrl = data;
- $("#registrationUrl").val(registrationUrl);
- }
- });
- };
-
- //returns activity streams (JSON) that have the same tag specified in the subscriber's filters
- var getActivities = function(){
- var registrationUrl;
- $.ajax({
- contentType: "text/plain",
- type:"GET",
- url: $("#registrationUrl").val(),
- success:function(data){
- console.log(data);
- $("#successMessage").val(data);
- }
- })
- };
-
- return{
- registerSubscriber: registerSubscriber,
- getActivities: getActivities
- };
-
-})();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/demo/publisher.html
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/demo/publisher.html b/streams-web/src/main/webapp/demo/publisher.html
deleted file mode 100644
index 9fe42a2..0000000
--- a/streams-web/src/main/webapp/demo/publisher.html
+++ /dev/null
@@ -1,91 +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
- ~
- ~ 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.
- -->
-<!DOCTYPE HTML>
-<html>
-<head>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="js/publisher.js"></script>
-
- <title>Publisher Demo</title>
-</head>
-
-<body>
- <form>
- <p>
-
- <label>Enter your Publisher Registration JSON here:</label>
- <textarea id="publisherRegistrationJSON"
- rows="12"
- cols="80">{
- "authToken": "token",
- "@class":"org.apache.streams.osgi.components.activityconsumer.impl.PushActivityConsumer",
- "input_type": "http",
- "method": "post",
- "src": "http.example.com:8888",
- "delivery_frequency": "60",
- "auth_type": "none",
- "username": "username",
- "password": "password"
- }
- </textarea><br>
- </p>
- </form>
- <button type="button" onclick="publisher.registerPublisher()">Submit Registration JSON</button><br>
-
- <input id="registrationUrl">
-
- <form>
- <p>
-
- <label>Enter your Publisher Registration JSON here:</label>
- <textarea id="publisherActivityJSON"
- rows="12"
- cols="80">
- {
- "id": "id",
- "verb": "verb",
- "tags": "tags",
- "provider": {
- "url": "www.providerexample.com"
- },
- "actor": {
- "id": "actorid",
- "objectType": "actorobject",
- "displayName": "actorname",
- "url": "www.actorexampleurl.com"
- },
- "target": {
- "id": "targetid",
- "displayName": "targetname",
- "url": "www.targeturl.com"
- },
- "object": {
- "id": "objectid",
- "displayName": "objectname",
- "objectType": "object",
- "url": "www.objecturl.org"
- }
- }
- </textarea><br>
- </p>
- </form>
-
- <button type="button" onclick="publisher.postActivity()">Submit Activity JSON</button><br>
- <p id="successMessage"></p>
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/demo/subscriber.html
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/demo/subscriber.html b/streams-web/src/main/webapp/demo/subscriber.html
deleted file mode 100644
index b5b1466..0000000
--- a/streams-web/src/main/webapp/demo/subscriber.html
+++ /dev/null
@@ -1,57 +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
- ~
- ~ 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.
- -->
-<!DOCTYPE HTML>
-<html>
-<head>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="js/subscriber.js"></script>
- <title>Subscriber Demo</title>
-</head>
-
-<body>
-<form>
- <p>
- <label>Enter your Subscriber Registration JSON here:</label>
- <textarea id="subscriberRegistrationJSON"
- rows="12"
- cols="80">
- {
- "authToken": "token",
- "@class":"org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriptionImpl",
- "filters": [
- "tags"
- ]
- }
- </textarea><br>
- </p>
-</form>
-
-<button type="button" onclick="subscriber.registerSubscriber()">Submit Registration JSON</button>
-<br>
-<textarea id="registrationUrl"
- rows="2"
- cols="80"></textarea><br>
-
-<button type="button" onclick="subscriber.getActivities()">Get Activities</button>
-<br>
-<textarea id="successMessage"
- rows="16"
- cols="80"></textarea>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/de250750/streams-web/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/streams-web/src/main/webapp/index.html b/streams-web/src/main/webapp/index.html
deleted file mode 100644
index 5653542..0000000
--- a/streams-web/src/main/webapp/index.html
+++ /dev/null
@@ -1,27 +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
- ~
- ~ 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.
- -->
-<!DOCTYPE HTML>
-<html>
-<head>
-
-</head>
-<body>
-<a href="demo/publisher.html">Push here to demo publishing</a>
-<a href="demo/subscriber.html" >Push here to demo subscribing</a>
-</body>
-</html>
\ No newline at end of file