http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-context.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-context.xml b/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-context.xml deleted file mode 100644 index f12ab82..0000000 --- a/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-context.xml +++ /dev/null @@ -1,28 +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 - ~ - ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <!-- regular spring configuration file defining the beans for this -bundle. The configuration of OSGi definitions is kept in a separate -configuration file so that this file can easily be used -for integration testing outside of an OSGi environment --> - <bean id="activityConsumerWarehouse" class="org.apache.streams.osgi.components.activityconsumer.impl.ActivityConsumerWarehouseImpl"/> -</beans> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-osgi.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-osgi.xml b/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-osgi.xml deleted file mode 100644 index 408ce95..0000000 --- a/streams-osgi-components/activity-consumer/src/main/resources/META-INF/spring/activity-consumer-osgi.xml +++ /dev/null @@ -1,29 +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 - ~ - ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <osgi:service ref="activityConsumerWarehouse" interface="org.apache.streams.osgi.components.activityconsumer.ActivityConsumerWarehouse"/> - -</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-consumer/src/main/resources/readme.txt ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-consumer/src/main/resources/readme.txt b/streams-osgi-components/activity-consumer/src/main/resources/readme.txt deleted file mode 100644 index 5774586..0000000 --- a/streams-osgi-components/activity-consumer/src/main/resources/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Bundle resources go here http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/osgi.bnd ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/osgi.bnd b/streams-osgi-components/activity-registration/osgi.bnd deleted file mode 100644 index 53f60f9..0000000 --- a/streams-osgi-components/activity-registration/osgi.bnd +++ /dev/null @@ -1,9 +0,0 @@ -#-------------------------------------------------------------------------------- -# Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 -#-------------------------------------------------------------------------------- - -#----------------------------------------------------------------- -# Use this file to add customized Bnd instructions for the bundle -#----------------------------------------------------------------- - - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/pom.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/pom.xml b/streams-osgi-components/activity-registration/pom.xml deleted file mode 100644 index 7871a0e..0000000 --- a/streams-osgi-components/activity-registration/pom.xml +++ /dev/null @@ -1,130 +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. ---> -<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.streams.osgi.components</groupId> - <artifactId>streams-osgi-components</artifactId> - <version>0.4-incubating-SNAPSHOT</version> - </parent> - - <artifactId>activity-registration</artifactId> - - <name>${bundle.symbolicName} [${bundle.namespace}]</name> - - <packaging>bundle</packaging> - - <properties> - <bundle.symbolicName>activity-registration-bundle</bundle.symbolicName> - <bundle.namespace>org.apache.streams.osgi.components</bundle.namespace> - <commons.log>1.1</commons.log> - </properties> - - <build> - <resources> - <resource> - <directory>src/main/resources</directory> - </resource> - <!-- - | example additional resource entries, useful when building Eclipse RCP applications - --> - <resource> - <directory>.</directory> - <includes> - <include>plugin.xml</include> - <include>plugin.properties</include> - <include>icons/**</include> - </includes> - </resource> - </resources> - <plugins> - <plugin> - <groupId>org.ops4j</groupId> - <artifactId>maven-pax-plugin</artifactId> - <!-- - | enable improved OSGi compilation support for the bundle life-cycle. - | to switch back to the standard bundle life-cycle, move this setting - | down to the maven-bundle-plugin section - --> - <extensions>true</extensions> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>1.4.3</version> - <!-- - | the following instructions build a simple set of public/private classes into an OSGi bundle - --> - <configuration> - <instructions> - <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> - <Bundle-Version>${project.version}</Bundle-Version> - <Export-Package>${bundle.namespace};version="${project.version}"</Export-Package> - <Private-Package>${bundle.namespace}.impl.*</Private-Package> - <Import-Package>org.apache.streams.osgi.components.activityconsumer.impl,org.apache.streams.osgi.components.activityconsumer,org.apache.streams.osgi.components.activitysubscriber,org.apache.streams.osgi.components.activitysubscriber.impl,org.apache.commons.logging, org.codehaus.jackson.map</Import-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi_R4_core</artifactId> - <version>1.0</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi_R4_compendium</artifactId> - <version>1.0</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging-api</artifactId> - <version>${commons.log}</version> - <scope>provided</scope> - </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</groupId> - <artifactId>streams-testing</artifactId> - <version>${project.version}</version> - <scope>test</scope> - <type>test-jar</type> - </dependency> - </dependencies> - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java b/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java deleted file mode 100644 index fd590a1..0000000 --- a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityPublisherRegistration.java +++ /dev/null @@ -1,29 +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. - */ - -package org.apache.streams.osgi.components; - -/** - * Public API representing an example OSGi service - */ -public interface ActivityPublisherRegistration { - - public Object register(Object obj); - -} - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java b/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java deleted file mode 100644 index bd400d8..0000000 --- a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/ActivityStreamsSubscriberRegistration.java +++ /dev/null @@ -1,29 +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. - */ - -package org.apache.streams.osgi.components; - -/** - * Public API representing an example OSGi service - */ -public interface ActivityStreamsSubscriberRegistration { - - public Object register(Object obj); - -} - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java b/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java deleted file mode 100644 index e621f43..0000000 --- a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityPublisherRegistrationImpl.java +++ /dev/null @@ -1,67 +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. - */ - -package org.apache.streams.osgi.components.impl; - -import java.util.Date; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.streams.osgi.components.ActivityPublisherRegistration; -import org.apache.streams.osgi.components.activityconsumer.ActivityConsumer; -import org.apache.streams.osgi.components.activityconsumer.impl.PushActivityConsumer; - -public class ActivityPublisherRegistrationImpl implements ActivityPublisherRegistration { - private static final transient Log LOG = LogFactory.getLog(ActivityPublisherRegistrationImpl.class); - private boolean verbose = true; - private String prefix = "Activity Publisher Registration"; - - public Object register(Object body) { - - //authorize this producer based on some rule set... - //create a new ActivityConsumer... - //using the URI supplied to set it up... - //return the consumer for addition to the consumer warehouse - - String answer = prefix + " set body: " + body + " " + new Date(); - LOG.info(">> call >>" + answer); - - - ActivityConsumer activityConsumer =(ActivityConsumer)body; - //authenticate.. - activityConsumer.setAuthenticated(true); - return activityConsumer; - } - - - public boolean isVerbose() { - return verbose; - } - - public void setVerbose(boolean verbose) { - this.verbose = verbose; - } - - public String getPrefix() { - return prefix; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java b/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java deleted file mode 100644 index 6a270d6..0000000 --- a/streams-osgi-components/activity-registration/src/main/java/org/apache/streams/osgi/components/impl/ActivityStreamsSubscriberRegistrationImpl.java +++ /dev/null @@ -1,67 +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. - */ - -package org.apache.streams.osgi.components.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.streams.osgi.components.ActivityStreamsSubscriberRegistration; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscription; -import org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriberDelegate; - -public class ActivityStreamsSubscriberRegistrationImpl implements ActivityStreamsSubscriberRegistration { - private static final transient Log LOG = LogFactory.getLog(ActivityStreamsSubscriberRegistrationImpl.class); - private boolean verbose = true; - private String prefix = "Activity Subscriber Registration"; - - public Object register(Object body) { - - //authorize this subscriber based on some rule set... - //create a new SubscriberDelegate... - //using the URI supplied to set it up... - //return the consumer for addition to the consumer warehouse - - ActivityStreamsSubscription configuration = (ActivityStreamsSubscription)body; - - ActivityStreamsSubscriberDelegate delegate = new ActivityStreamsSubscriberDelegate(configuration); - //authenticate - delegate.setAuthenticated(true); - - - - return delegate; - } - - - - public boolean isVerbose() { - return verbose; - } - - public void setVerbose(boolean verbose) { - this.verbose = verbose; - } - - public String getPrefix() { - return prefix; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml b/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml deleted file mode 100644 index af9e3b7..0000000 --- a/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context-osgi.xml +++ /dev/null @@ -1,30 +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 - ~ - ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <osgi:service ref="activityPublisherRegistration" interface="org.apache.streams.osgi.components.ActivityPublisherRegistration"/> - <osgi:service ref="activityStreamsSubscriberRegistration" interface="org.apache.streams.osgi.components.ActivityStreamsSubscriberRegistration"/> - -</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml b/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml deleted file mode 100644 index 4e58ace..0000000 --- a/streams-osgi-components/activity-registration/src/main/resources/META-INF/spring/activity-registration-context.xml +++ /dev/null @@ -1,29 +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 - ~ - ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <!-- regular spring configuration file defining the beans for this -bundle. The configuration of OSGi definitions is kept in a separate -configuration file so that this file can easily be used -for integration testing outside of an OSGi environment --> - <bean id="activityPublisherRegistration" class="org.apache.streams.osgi.components.impl.ActivityPublisherRegistrationImpl"/> - <bean id="activityStreamsSubscriberRegistration" class="org.apache.streams.osgi.components.impl.ActivityStreamsSubscriberRegistrationImpl"/> -</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-registration/src/main/resources/readme.txt ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-registration/src/main/resources/readme.txt b/streams-osgi-components/activity-registration/src/main/resources/readme.txt deleted file mode 100644 index 5774586..0000000 --- a/streams-osgi-components/activity-registration/src/main/resources/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Bundle resources go here http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/osgi.bnd ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/osgi.bnd b/streams-osgi-components/activity-subscriber/osgi.bnd deleted file mode 100644 index 53f60f9..0000000 --- a/streams-osgi-components/activity-subscriber/osgi.bnd +++ /dev/null @@ -1,9 +0,0 @@ -#-------------------------------------------------------------------------------- -# Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 -#-------------------------------------------------------------------------------- - -#----------------------------------------------------------------- -# Use this file to add customized Bnd instructions for the bundle -#----------------------------------------------------------------- - - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/pom.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/pom.xml b/streams-osgi-components/activity-subscriber/pom.xml deleted file mode 100644 index 5b5c30a..0000000 --- a/streams-osgi-components/activity-subscriber/pom.xml +++ /dev/null @@ -1,134 +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. ---> -<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.streams.osgi.components</groupId> - <artifactId>streams-osgi-components</artifactId> - <version>0.4-incubating-SNAPSHOT</version> - </parent> - - <artifactId>activity-subscriber</artifactId> - - <name>${bundle.symbolicName} [${bundle.namespace}]</name> - - <packaging>bundle</packaging> - - <properties> - <bundle.symbolicName>activity-subscriber-bundle</bundle.symbolicName> - <bundle.namespace>org.apache.streams.osgi.components.activitysubscriber</bundle.namespace> - <commons.log>1.1</commons.log> - <jackson.version>1.9.11</jackson.version> - </properties> - - <build> - <resources> - <resource> - <directory>src/main/resources</directory> - </resource> - <!-- - | example additional resource entries, useful when building Eclipse RCP applications - --> - <resource> - <directory>.</directory> - <includes> - <include>plugin.xml</include> - <include>plugin.properties</include> - <include>icons/**</include> - </includes> - </resource> - </resources> - <plugins> - <plugin> - <groupId>org.ops4j</groupId> - <artifactId>maven-pax-plugin</artifactId> - <!-- - | enable improved OSGi compilation support for the bundle life-cycle. - | to switch back to the standard bundle life-cycle, move this setting - | down to the maven-bundle-plugin section - --> - <extensions>true</extensions> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>1.4.3</version> - <!-- - | the following instructions build a simple set of public/private classes into an OSGi bundle - --> - <configuration> - <instructions> - <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> - <Bundle-Version>${project.version}</Bundle-Version> - <Export-Package>${bundle.namespace};version="${project.version}",org.apache.streams.osgi.components.activitysubscriber.impl</Export-Package> - <Private-Package>${bundle.namespace}.impl.*</Private-Package> - <Import-Package>org.apache.streams.osgi.components.activitysubscriber,org.apache.commons.logging,org.codehaus.jackson.*;version="${jackson.version}",javax.xml.datatype, javax.xml.namespace, javax.xml.parsers, org.joda.time, org.joda.time.format, org.w3c.dom, org.w3c.dom.bootstrap, org.w3c.dom.ls, org.xml.sax</Import-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi_R4_core</artifactId> - <version>1.0</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mrbean</artifactId> - <version>${jackson.version}</version> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mapper-asl</artifactId> - <version>${jackson.version}</version> - </dependency> - - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi_R4_compendium</artifactId> - <version>1.0</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging-api</artifactId> - <version>${commons.log}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.streams</groupId> - <artifactId>streams-testing</artifactId> - <version>${project.version}</version> - <scope>test</scope> - <type>test-jar</type> - </dependency> - </dependencies> - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java deleted file mode 100644 index 8852843..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriber.java +++ /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 - * - * 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 org.apache.streams.osgi.components.activitysubscriber; - - -import java.util.Date; -import java.util.List; - -public interface ActivityStreamsSubscriber { - public void receive(List<String> activity); - public String getStream(); - public void init(); - public void setInRoute(String route); - public String getInRoute(); - public void setActivityStreamsSubscriberConfiguration(ActivityStreamsSubscription config); - public void updateActivityStreamsSubscriberConfiguration(String config); - public boolean isAuthenticated(); - public void setAuthenticated(boolean authenticated); - public ActivityStreamsSubscription getActivityStreamsSubscriberConfiguration(); - Date getLastUpdated(); - void setLastUpdated(Date lastUpdated); -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java deleted file mode 100644 index f6e0223..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriberWarehouse.java +++ /dev/null @@ -1,34 +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. - */ - -package org.apache.streams.osgi.components.activitysubscriber; - -import java.util.ArrayList; - -/** - * Public API representing an example OSGi service - */ -public interface ActivityStreamsSubscriberWarehouse { - - public void register(ActivityStreamsSubscriber activitySubscriber); - - public ArrayList<ActivityStreamsSubscriber> findSubscribersByFilters(String src); - - public ArrayList<ActivityStreamsSubscriber> getAllSubscribers(); -} - http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscription.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscription.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscription.java deleted file mode 100644 index 19cc107..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscription.java +++ /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 - * - * 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 org.apache.streams.osgi.components.activitysubscriber; - -import org.codehaus.jackson.annotate.JsonTypeInfo; - -import java.util.ArrayList; -import java.util.List; - -@JsonTypeInfo(use= JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class") -public interface ActivityStreamsSubscription { - - public void setFilters(List<String> filters); - public List<String> getFilters(); - - public List<ActivityStreamsSubscriptionOutput> getActivityStreamsSubscriptionOutputs(); - public void setActivityStreamsSubscriptionOutputs(List<ActivityStreamsSubscriptionOutput> outputs); - - public String getAuthToken(); - public void setAuthToken(String token); - -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionFilter.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionFilter.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionFilter.java deleted file mode 100644 index 5900e76..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionFilter.java +++ /dev/null @@ -1,34 +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. - */ - -package org.apache.streams.osgi.components.activitysubscriber; - -import org.codehaus.jackson.annotate.JsonTypeInfo; - -@JsonTypeInfo(use= JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class") -public interface ActivityStreamsSubscriptionFilter { - - - - public void setQuery(String query); - - public String getQuery(); - - public boolean evaluate(String activity); - -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionOutput.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionOutput.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionOutput.java deleted file mode 100644 index b6ca484..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/ActivityStreamsSubscriptionOutput.java +++ /dev/null @@ -1,47 +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. - */ - -package org.apache.streams.osgi.components.activitysubscriber; - -public interface ActivityStreamsSubscriptionOutput { - - public String getOutputType(); - public void setOutputType(String outputType); - - public String getMethod(); - public void setMethod(String method); - - public String getUrl(); - public void setUrl(String url); - - public String getDeliveryFrequency(); - public void setDeliveryFrequency(String deliveryFrequency); - - public String getMaxSize(); - public void setMaxSize(int maxSize); - - public String getAuthType(); - public void setAuthType(String authType); - - public String getUsername(); - public void setUsername(String username); - - public String getPassword(); - public void setPassword(String password); - -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java deleted file mode 100644 index b575ba3..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberDelegate.java +++ /dev/null @@ -1,126 +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. - */ - -package org.apache.streams.osgi.components.activitysubscriber.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriber; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscription; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class ActivityStreamsSubscriberDelegate implements ActivityStreamsSubscriber { - - private static final transient Log LOG = LogFactory.getLog(ActivityStreamsSubscriberDelegate.class); - - private boolean authenticated; - - private ActivityStreamsSubscription activityStreamsSubscriberConfiguration; - - private String inRoute; - - //an individual subscriber gets ONE stream which is an aggregation of all its SRCs - private List<String> stream; - - private Date lastUpdated; - - - public ActivityStreamsSubscriberDelegate(ActivityStreamsSubscription configuration){ - setActivityStreamsSubscriberConfiguration(configuration); - stream = new ArrayList<String>(); - lastUpdated = new Date(0); - } - - - public ActivityStreamsSubscription getActivityStreamsSubscriberConfiguration() { - return activityStreamsSubscriberConfiguration; - } - - public void setActivityStreamsSubscriberConfiguration(ActivityStreamsSubscription activityStreamsSubscriberConfiguration) { - this.activityStreamsSubscriberConfiguration = activityStreamsSubscriberConfiguration; - } - - public void updateActivityStreamsSubscriberConfiguration(String activityStreamsSubscriberConfiguration) { - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,false); - - try { - // read from file, convert it to user class - ActivityStreamsSubscription configuration = mapper.readValue(activityStreamsSubscriberConfiguration, ActivityStreamsSubscriptionImpl.class); - this.activityStreamsSubscriberConfiguration = configuration; - - } catch (Exception e) { - LOG.info("exception" + e); - - } - - } - - public boolean isAuthenticated() { - return authenticated; - } - - public void setAuthenticated(boolean authenticated) { - this.authenticated = authenticated; - } - - public String getInRoute() { - return inRoute; - } - - public void setInRoute(String inRoute) { - this.inRoute = inRoute; - } - - public void receive (List<String> activity){ - //add new activities to stream - LOG.info("adding activities to subscription stream"); - stream.addAll(0,activity); - } - - //return the list of activities (stream) as a json string - public String getStream() { - - return stream.toString(); - } - - public Date getLastUpdated() { - return lastUpdated; - } - - public void setLastUpdated(Date lastUpdated) { - this.lastUpdated = lastUpdated; - } - - public void init(){ - //any initialization... gets called directly after registration - - - - } - - - - - -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java deleted file mode 100644 index 80f94cf..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriberWarehouseImpl.java +++ /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. - */ - -package org.apache.streams.osgi.components.activitysubscriber.impl; - -import java.util.ArrayList; -import java.util.HashMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriber; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse; - - -public class ActivityStreamsSubscriberWarehouseImpl implements ActivityStreamsSubscriberWarehouse { - private static final transient Log LOG = LogFactory.getLog(ActivityStreamsSubscriberWarehouseImpl.class); - - private ArrayList<ActivityStreamsSubscriber> subscribers; - - public ActivityStreamsSubscriberWarehouseImpl(){ - subscribers = new ArrayList<ActivityStreamsSubscriber>(); - } - - public void register(ActivityStreamsSubscriber activitySubscriber) { - - if (!subscribers.contains(activitySubscriber)){ - subscribers.add(activitySubscriber); - activitySubscriber.init(); - } - - } - - - //the warehouse can do some interesting things to make the filtering efficient i think... - public ArrayList<ActivityStreamsSubscriber> findSubscribersByFilters(String src){ - return subscribers; - } - - - public ArrayList<ActivityStreamsSubscriber> getAllSubscribers(){ - return subscribers; - } - - - -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionCassandraFilterImpl.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionCassandraFilterImpl.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionCassandraFilterImpl.java deleted file mode 100644 index f1a9f9d..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionCassandraFilterImpl.java +++ /dev/null @@ -1,42 +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. - */ - -package org.apache.streams.osgi.components.activitysubscriber.impl; - -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriptionFilter; - -import java.util.List; - -public class ActivityStreamsSubscriptionCassandraFilterImpl implements ActivityStreamsSubscriptionFilter { - private String query; - private List<String> filters; - - public ActivityStreamsSubscriptionCassandraFilterImpl(){} - - public void setQuery(String query) { - this.query=query; - } - - public String getQuery() { - return query; - } - - public boolean evaluate(String activity){ - return true; - } -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionImpl.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionImpl.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionImpl.java deleted file mode 100644 index 32dfdc3..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionImpl.java +++ /dev/null @@ -1,74 +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. - */ - -package org.apache.streams.osgi.components.activitysubscriber.impl; - - -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscription; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriptionOutput; - -import org.codehaus.jackson.map.annotate.JsonDeserialize; - -import java.util.ArrayList; -import java.util.List; - -public class ActivityStreamsSubscriptionImpl implements ActivityStreamsSubscription { - - @JsonDeserialize(as=ArrayList.class) - private List<String> filters; - - @JsonDeserialize(as=ArrayList.class) - private List<ActivityStreamsSubscriptionOutput> outputs; - - private String authToken; - - public void setFilters(List<String> filters) { - this.filters = filters; - } - - @Override - public List<ActivityStreamsSubscriptionOutput> getActivityStreamsSubscriptionOutputs() { - return outputs; - } - - @Override - public void setActivityStreamsSubscriptionOutputs(List<ActivityStreamsSubscriptionOutput> outputs) { - this.outputs = outputs; - } - - @Override - public List<String> getFilters(){ - return filters; - - } - - @Override - public String getAuthToken() { - return authToken; - } - - @Override - public void setAuthToken(String auth_token) { - this.authToken = auth_token; - } - - - - - -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionLuceneFilterImpl.java ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionLuceneFilterImpl.java b/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionLuceneFilterImpl.java deleted file mode 100644 index c738e0e..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/java/org/apache/streams/osgi/components/activitysubscriber/impl/ActivityStreamsSubscriptionLuceneFilterImpl.java +++ /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. - */ - -package org.apache.streams.osgi.components.activitysubscriber.impl; - - -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriptionFilter; - -public class ActivityStreamsSubscriptionLuceneFilterImpl implements ActivityStreamsSubscriptionFilter{ - - private String query; - - - - public void setQuery(String query) { - this.query=query; - } - - public String getQuery() { - return query; - } - - public boolean evaluate(String activity){ - return true; - } - - -} http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml b/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml deleted file mode 100644 index 65c58bd..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-context.xml +++ /dev/null @@ -1,28 +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 - ~ - ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <!-- regular spring configuration file defining the beans for this -bundle. The configuration of OSGi definitions is kept in a separate -configuration file so that this file can easily be used -for integration testing outside of an OSGi environment --> - <bean id="activitySubscriberWarehouse" 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/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml b/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml deleted file mode 100644 index 8988824..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/resources/META-INF/spring/activity-subscriber-osgi.xml +++ /dev/null @@ -1,29 +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 - ~ - ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <osgi:service ref="activitySubscriberWarehouse" interface="org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse"/> - -</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt b/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt deleted file mode 100644 index 5774586..0000000 --- a/streams-osgi-components/activity-subscriber/src/main/resources/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Bundle resources go here http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/activity-subscriber/src/site/resources/readme.txt ---------------------------------------------------------------------- diff --git a/streams-osgi-components/activity-subscriber/src/site/resources/readme.txt b/streams-osgi-components/activity-subscriber/src/site/resources/readme.txt deleted file mode 100644 index 5774586..0000000 --- a/streams-osgi-components/activity-subscriber/src/site/resources/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Bundle resources go here http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-osgi-components/pom.xml ---------------------------------------------------------------------- diff --git a/streams-osgi-components/pom.xml b/streams-osgi-components/pom.xml deleted file mode 100644 index 44d0f44..0000000 --- a/streams-osgi-components/pom.xml +++ /dev/null @@ -1,43 +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 - ~ - ~ 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.streams</groupId> - <artifactId>streams-project</artifactId> - <version>0.4-incubating-SNAPSHOT</version> - </parent> - - <groupId>org.apache.streams.osgi.components</groupId> - <artifactId>streams-osgi-components</artifactId> - - <name>Apache Streams OSGI Components</name> - - <packaging>pom</packaging> - - - <modules> - <module>activity-registration</module> - <module>activity-consumer</module> - <module>activity-subscriber</module> - </modules> - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-runtimes/pom.xml ---------------------------------------------------------------------- diff --git a/streams-runtimes/pom.xml b/streams-runtimes/pom.xml index 21c2a15..0194b45 100644 --- a/streams-runtimes/pom.xml +++ b/streams-runtimes/pom.xml @@ -38,6 +38,5 @@ <module>streams-runtime-local</module> <module>streams-runtime-pig</module> <module>streams-runtime-storm</module> - <!--<module>streams-runtime-webapp</module>--> </modules> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-runtimes/streams-runtime-spark/src/main/jsonschema/SparkRuntimeConfiguration.json ---------------------------------------------------------------------- diff --git a/streams-runtimes/streams-runtime-spark/src/main/jsonschema/SparkRuntimeConfiguration.json b/streams-runtimes/streams-runtime-spark/src/main/jsonschema/SparkRuntimeConfiguration.json deleted file mode 100644 index 5a9cf69..0000000 --- a/streams-runtimes/streams-runtime-spark/src/main/jsonschema/SparkRuntimeConfiguration.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-03/schema", - "$license": [ - "http://www.apache.org/licenses/LICENSE-2.0" - ], - "type": "object", - "javaType" : "org.apache.streams.spark.SparkRuntimeConfiguration", - "extends": { - "$ref": "../../../../../streams-config/src/main/jsonschema/StreamsConfiguration.json" - }, - "javaInterfaces": ["java.io.Serializable"], - "properties": { - "inputPath": { - "type": "string", - "description": "Input Path" - }, - "outputPath": { - "type": "string", - "description": "Output Path" - }, - "outputPartitions": { - "type": "integer", - "description": "Partitions", - "default": 0 - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-runtimes/streams-runtime-webapp/README.md ---------------------------------------------------------------------- diff --git a/streams-runtimes/streams-runtime-webapp/README.md b/streams-runtimes/streams-runtime-webapp/README.md deleted file mode 100644 index 94ffeff..0000000 --- a/streams-runtimes/streams-runtime-webapp/README.md +++ /dev/null @@ -1,8 +0,0 @@ -Apache Streams (incubating) -Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 --------------------------------------------------------------------------------- - -org.apache.streams:streams-runtime-webapp -========================================= - -[README.md](src/site/markdown/index.md "README") http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-runtimes/streams-runtime-webapp/pom.xml ---------------------------------------------------------------------- diff --git a/streams-runtimes/streams-runtime-webapp/pom.xml b/streams-runtimes/streams-runtime-webapp/pom.xml deleted file mode 100644 index 7c97dae..0000000 --- a/streams-runtimes/streams-runtime-webapp/pom.xml +++ /dev/null @@ -1,250 +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 - ~ - ~ 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.streams</groupId> - <artifactId>streams-runtimes</artifactId> - <version>0.4-incubating-SNAPSHOT</version> - </parent> - - <artifactId>streams-runtime-webapp</artifactId> - - <name>${bundle.symbolicName} [${bundle.namespace}]</name> - - <description>Apache Streams Runtimes</description> - - <properties> - <bundle.symbolicName>streams-eip-routes</bundle.symbolicName> - <bundle.namespace>org.apache.streams</bundle.namespace> - <jackson.old.version>1.9.11</jackson.old.version> - </properties> - - <packaging>bundle</packaging> - - <repositories> - <repository> - <id>clojars.org</id> - <url>http://clojars.org/repo</url> - </repository> - </repositories> - - <build> - - <resources> - <resource> - <directory>src/main/resources</directory> - </resource> - <!-- - | example additional resource entries, useful when building Eclipse RCP applications - --> - <resource> - <directory>.</directory> - <includes> - <include>plugin.xml</include> - <include>plugin.properties</include> - <include>icons/**</include> - <include>META-INF/*</include> - </includes> - </resource> - </resources> - <plugins> - <plugin> - <groupId>org.ops4j</groupId> - <artifactId>maven-pax-plugin</artifactId> - <!-- - | enable improved OSGi compilation support for the bundle life-cycle. - | to switch back to the standard bundle life-cycle, move this setting - | down to the maven-bundle-plugin section - --> - <extensions>true</extensions> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>1.4.3</version> - <!-- - | the following instructions build a simple set of public/private classes into an OSGi bundle - --> - <configuration> - <instructions> - <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> - <Bundle-Version>${project.version}</Bundle-Version> - <Export-Package>${bundle.namespace};version="${project.version}",org.apache.streams.messaging.configuration,org.apache.streams.messaging.routers,org.apache.streams.messaging.rules,org.apache.streams.messaging.processors,org.apache.streams.messaging.aggregation,org.apache.streams.messaging.service, org.apache.streams.messaging.storm,org.apache.activemq,org.codehaus.jackson.*;version="${jackson.version}"</Export-Package> - <Private-Package>${bundle.namespace}.messaging.routers.impl.*,${bundle.namespace}.messaging.rules.impl.*, ${bundle.namespace}.messaging.service.impl.*</Private-Package> - <Import-Package>org.apache.camel.*;version="2.8.5",org.apache.streams.messaging.configuration,org.apache.activemq.camel.component,org.apache.activemq,org.apache.activemq.pool,org.apache.camel.component.jms,org.springframework.*;version="3.0.6.RELEASE",org.apache.commons.logging,org.apache.streams.*,org.apache.streams.osgi.components,org.apache.streams.osgi.components.activityconsumer,org.apache.streams.osgi.components.activityconsumer.impl,org.apache.streams.osgi.components.activitysubscriber,org.apache.streams.osgi.components.activitysubscriber.impl,org.apache.streams.messaging.processors,org.apache.streams.messaging.aggregation,javax.jms, javax.net.ssl, javax.transaction.xa, org.apache.activemq.advisory, org.apache.activemq.blob, org.apache.activemq.broker, org.apache.activemq.broker.region, org.apache.activemq.command, org.apache.activemq.filter, org.apache.activemq.jndi, org.apache.activemq.management, org.apache.activemq.selector, org.apache.activemq.sta te, org.apache.activemq.thread, org.apache.activemq.transaction, org.apache.activemq.transport, org.apache.activemq.transport.failover, org.apache.activemq.transport.tcp, org.apache.activemq.usage, org.apache.activemq.util, org.slf4j,org.codehaus.jackson;version="${jackson.version}",javax.xml.datatype, javax.xml.namespace, javax.xml.parsers, org.joda.time, org.joda.time.format, org.w3c.dom, org.w3c.dom.bootstrap, org.w3c.dom.ls, org.xml.sax, org.apache.rave.model, org.apache.rave.portal.model.impl, backtype.storm, backtype.storm.coordination, backtype.storm.generated, backtype.storm.spout, backtype.storm.task, backtype.storm.topology, backtype.storm.topology.base, backtype.storm.tuple, javax.annotation, backtype.storm.utils</Import-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> - <version>2.9.0</version> - </dependency> - - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>activemq-camel</artifactId> - <version>5.5.1</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>activemq-pool</artifactId> - <version>5.5.1</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>3.0.6.RELEASE</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>3.0.6.RELEASE</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mrbean</artifactId> - <version>${jackson.old.version}</version> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mapper-asl</artifactId> - <version>${jackson.old.version}</version> - </dependency> - - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi_R4_core</artifactId> - <version>1.0</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi_R4_compendium</artifactId> - <version>1.0</version> - <scope>provided</scope> - <optional>true</optional> - </dependency> - - - <dependency> - <groupId>org.apache.streams.osgi.components</groupId> - <artifactId>activity-registration</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</groupId> - <artifactId>streams-persist-cassandra</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.rave</groupId> - <artifactId>rave-core</artifactId> - <version>${rave.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.rave</groupId> - <artifactId>rave-core-api</artifactId> - <version>${rave.version}</version> - </dependency> - - <dependency> - <groupId>storm</groupId> - <artifactId>storm</artifactId> - <version>0.8.2</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymock</artifactId> - <version>3.1</version> - </dependency> - <dependency> - <groupId>org.apache.streams</groupId> - <artifactId>streams-testing</artifactId> - <version>${project.version}</version> - <scope>test</scope> - <type>test-jar</type> - </dependency> - </dependencies> - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ce7aa24d/streams-runtimes/streams-runtime-webapp/src/main/java/org/apache/streams/messaging/aggregation/ActivityAggregator.java ---------------------------------------------------------------------- diff --git a/streams-runtimes/streams-runtime-webapp/src/main/java/org/apache/streams/messaging/aggregation/ActivityAggregator.java b/streams-runtimes/streams-runtime-webapp/src/main/java/org/apache/streams/messaging/aggregation/ActivityAggregator.java deleted file mode 100644 index dc7ba0c..0000000 --- a/streams-runtimes/streams-runtime-webapp/src/main/java/org/apache/streams/messaging/aggregation/ActivityAggregator.java +++ /dev/null @@ -1,59 +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. - */ - -package org.apache.streams.messaging.aggregation; - - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.streams.messaging.service.impl.CassandraActivityService; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriber; -import org.apache.streams.osgi.components.activitysubscriber.ActivityStreamsSubscriberWarehouse; -import org.springframework.scheduling.annotation.Scheduled; - -import java.util.*; - -public class ActivityAggregator { - - private ActivityStreamsSubscriberWarehouse activityStreamsSubscriberWarehouse; - private CassandraActivityService activityService; - private static final transient Log LOG = LogFactory.getLog(ActivityAggregator.class); - - public void setActivityStreamsSubscriberWarehouse(ActivityStreamsSubscriberWarehouse activityStreamsSubscriberWarehouse) { - this.activityStreamsSubscriberWarehouse = activityStreamsSubscriberWarehouse; - } - - public void setActivityService(CassandraActivityService activityService) { - this.activityService = activityService; - } - - @Scheduled(fixedRate=30000) - public void distributeToSubscribers() { - for (ActivityStreamsSubscriber subscriber : activityStreamsSubscriberWarehouse.getAllSubscribers()) { - updateSubscriber(subscriber); - } - } - - public void updateSubscriber(ActivityStreamsSubscriber subscriber){ - Set<String> activities = new TreeSet<String>(); - activities.addAll(activityService.getActivitiesForFilters(subscriber.getActivityStreamsSubscriberConfiguration().getFilters(), subscriber.getLastUpdated())); - //TODO: an activity posted in between the cql query and setting the lastUpdated field will be lost - subscriber.setLastUpdated(new Date()); - subscriber.receive(new ArrayList<String>(activities)); - } -}
