incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject svn commit: r948087 [1/3] - in /incubator/aries/trunk/samples/goat: ./ goat-api/ goat-api/src/ goat-api/src/main/ goat-api/src/main/java/ goat-api/src/main/java/org/ goat-api/src/main/java/org/apache/ goat-api/src/main/java/org/apache/aries/ goat-api/s...
Date Tue, 25 May 2010 16:13:17 GMT
Author: zoe
Date: Tue May 25 16:13:13 2010
New Revision: 948087

URL: http://svn.apache.org/viewvc?rev=948087&view=rev
Log:
ARIES-319 First commit of goat sample

Added:
    incubator/aries/trunk/samples/goat/
    incubator/aries/trunk/samples/goat/goat-api/
    incubator/aries/trunk/samples/goat/goat-api/pom.xml
    incubator/aries/trunk/samples/goat/goat-api/src/
    incubator/aries/trunk/samples/goat/goat-api/src/main/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfo.java
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfoProvider.java
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ModelInfoService.java
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ParameterizedRelationshipAspect.java
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipAspect.java
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfo.java
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfoProvider.java
    incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/VersionedRelationshipAspect.java
    incubator/aries/trunk/samples/goat/goat-assembly/
    incubator/aries/trunk/samples/goat/goat-assembly/pom.xml
    incubator/aries/trunk/samples/goat/goat-assembly/src/
    incubator/aries/trunk/samples/goat/goat-assembly/src/main/
    incubator/aries/trunk/samples/goat/goat-assembly/src/main/filtered-resources/
    incubator/aries/trunk/samples/goat/goat-assembly/src/main/filtered-resources/configuration/
    incubator/aries/trunk/samples/goat/goat-assembly/src/main/filtered-resources/configuration/config.ini
    incubator/aries/trunk/samples/goat/goat-assembly/src/main/r/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/pom.xml
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyInfoProvider.java
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyModelService.java
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyRelationshipProvider.java
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/OSGI-INF/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/OSGI-INF/blueprint/
    incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml
    incubator/aries/trunk/samples/goat/goat-eba/
    incubator/aries/trunk/samples/goat/goat-web/
    incubator/aries/trunk/samples/goat/goat-web/pom.xml
    incubator/aries/trunk/samples/goat/goat-web/src/
    incubator/aries/trunk/samples/goat/goat-web/src/main/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/ComponentInfoImpl.java
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/RelationshipInfoImpl.java
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/web/
    incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/dwr.xml
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/lib/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/web.xml
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/Thumbs.db   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndCopy.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndMove.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoCopy.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoMove.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_dx_gradient.gif   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_sort_down.gif   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_sort_up.gif   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/header.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/header_shadow.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/resolved.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/row_back.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/running.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/tabEnabled_rotated.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/tabHover_rotated.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/td_button_down.png   (with props)
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ComponentStatusGrid.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Config.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ConfigManager.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/DwrLoadingDialog.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ElementLayoutManager.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/LayoutManager.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ProviderSelector.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Relationship.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/RelationshipAggregator.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/RelationshipElement.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/RelationshipManager.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/ServerSideInterface.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/SimpleInitialLayout.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/TwistieSection.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/ComponentColorProperty.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/ComponentContainer.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/ElementBase.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/ElementRegistry.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/RelationshipAggregation.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/TextComponentProperty.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/relationshipaspects/
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/relationshipaspects/AspectBase.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/relationshipaspects/Parameterized.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/relationshipaspects/Versioned.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/index.html
    incubator/aries/trunk/samples/goat/pom.xml

Added: incubator/aries/trunk/samples/goat/goat-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/pom.xml?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/pom.xml (added)
+++ incubator/aries/trunk/samples/goat/goat-api/pom.xml Tue May 25 16:13:13 2010
@@ -0,0 +1,46 @@
+<?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.aries.samples.goat</groupId>
+        <artifactId>goat</artifactId>
+        <version>0.2-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.aries.samples.goat.api</artifactId>
+    <name>Apache Aries GOAT api</name>
+    <packaging>bundle</packaging>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Export-Package>org.apache.aries.samples.goat.api.*; version=${project.version}</Export-Package> 
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfo.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfo.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfo.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfo.java Tue May 25 16:13:13 2010
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ComponentInfo {
+   String getId();
+   /**
+    * always needed, id's must be unique globally, or within their containing component info.
+    * (impl notes.. (for bundles)
+    * Id's will probably NOT be bundle id's... we need the id to be fixed between framework restarts,
+    * to enable things like storing coords for onscreen renderings of components
+    * Id's will probably end up being path based, /component.id/component.id etc .. for sanities sake.
+    * Component properties are information that forms part of a component, keys will vary depending on 
+    * what the component represents. The GUI will handle rendering based on key names.
+    */
+   Map<String,String> getComponentProperties();
+
+   
+   /**
+	* children are only supported in concept currently.. no gui work done yet for them..   
+    * List of any contained components for this component.    
+    */
+   List<ComponentInfo> getChildren(); 
+}

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfoProvider.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfoProvider.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfoProvider.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ComponentInfoProvider.java Tue May 25 16:13:13 2010
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+import java.util.List;
+
+/**
+ * Provides information about components within a model.
+ *
+ * Good usage practice would be to subscribe a listener .. and THEN call getComponents.. 
+ * (doing it the other way round risks leaving a window during which a change could occur, and you not be informed).
+ * (doing it this way round, at worst, you'll see an update before you handle getComponents, 
+ *  and since an update can be an add, you'll just process it twice) 
+ *
+ */
+public interface ComponentInfoProvider {
+	
+	/**
+	 * Callback interface implemented by users of the ComponentInfoProvider interface, allowing 
+	 * notification of changes, or deletions to components they have been informed about.
+	 */
+	static interface ComponentInfoListener {
+		//called to add, or update a component.
+		public void updateComponent(ComponentInfo b);
+		public void removeComponent(ComponentInfo b);
+	};
+	
+	/**
+	 * Gets the current set of 'top level' components in this model.
+	 * 
+	 * Any nested components are only obtainable via the 'getChildren' method on ComponentInfo.
+	 * 
+	 * @return
+	 */
+	List<ComponentInfo> getComponents();
+	
+	/**
+	 * Gets a component for an id previously returned via getComponents, or updateComponent
+	 * @param id
+	 * @return component, or null if component id is either unknown, or deleted.
+	 */
+	ComponentInfo getComponentForId(String id);
+	
+	/**
+	 * Add a listener to this Info Provider, to be informed of changes/deletions.
+	 * @param listener
+	 */
+	public void registerComponentInfoListener(ComponentInfoListener listener);
+	
+	//TODO: unregisterComponentInfoListener ;-) 
+
+}

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ModelInfoService.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ModelInfoService.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ModelInfoService.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ModelInfoService.java Tue May 25 16:13:13 2010
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+/**
+ * The top level service interface published to the service registry
+ *
+ * A model is something with components, with relationships between them.
+ */
+public interface ModelInfoService {
+	String getName();
+	ComponentInfoProvider getComponentInfoProvider();
+	RelationshipInfoProvider getRelationshipInfoProvider();
+}

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ParameterizedRelationshipAspect.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ParameterizedRelationshipAspect.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ParameterizedRelationshipAspect.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/ParameterizedRelationshipAspect.java Tue May 25 16:13:13 2010
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+import java.util.List;
+
+public interface ParameterizedRelationshipAspect extends RelationshipAspect{
+	   static class Parameter{
+		   String key;
+		   String value;
+	   };
+	   List<Parameter> getProvidedParameters(); //any parameters specified by the supplier of the dependency.
+	   List<Parameter> getConsumedParameters(); //any parameters specified by the consumer of the dependency.
+}

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipAspect.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipAspect.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipAspect.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipAspect.java Tue May 25 16:13:13 2010
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+public interface RelationshipAspect {
+	public String getType();
+}

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfo.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfo.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfo.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfo.java Tue May 25 16:13:13 2010
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+import java.util.List;
+
+//This represents a single dependency between two components
+public interface RelationshipInfo {
+	
+	   //relationships are unique by type&name combined.
+	
+	   String getType(); //String describing the type of this dependency.		   
+	   String getName();  //name of this dependency.
+	   
+	   //the provider/consumer side of this relationship.
+	   ComponentInfo getProvidedBy();	   
+	   //consumers can of course, be empty. (thats empty.. NOT null)
+	   List<ComponentInfo> getConsumedBy();
+	   
+	   //relationship aspects are not fully integrated yet.. avoid until stable ;-)
+	   List<RelationshipAspect> getRelationshipAspects();   
+}

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfoProvider.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfoProvider.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfoProvider.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/RelationshipInfoProvider.java Tue May 25 16:13:13 2010
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+import java.util.List;
+
+public interface RelationshipInfoProvider {
+	static interface RelationshipInfoListener {
+		public void updateRelationship(RelationshipInfo b);
+		public void removeRelationship(RelationshipInfo b);
+	};
+	
+	List<RelationshipInfo> getRelationships();
+	
+	public void registerRelationshipInfoListener(RelationshipInfoListener listener);
+}

Added: incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/VersionedRelationshipAspect.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/VersionedRelationshipAspect.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/VersionedRelationshipAspect.java (added)
+++ incubator/aries/trunk/samples/goat/goat-api/src/main/java/org/apache/aries/samples/goat/api/VersionedRelationshipAspect.java Tue May 25 16:13:13 2010
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.api;
+
+public interface VersionedRelationshipAspect extends RelationshipAspect {
+	   String getProvidedVersion(); //this will be an exact version.
+	   String getConsumedVersion(); //this will be either a range, or an exact version. 
+	                                //provided version will either match, or be in the range.
+}

Added: incubator/aries/trunk/samples/goat/goat-assembly/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-assembly/pom.xml?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-assembly/pom.xml (added)
+++ incubator/aries/trunk/samples/goat/goat-assembly/pom.xml Tue May 25 16:13:13 2010
@@ -0,0 +1,162 @@
+<?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.aries.samples.goat</groupId>
+		<artifactId>goat</artifactId>
+		<version>0.2-incubating-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>org.apache.aries.samples.goat.assembly</artifactId>
+	<name>Apache Aries GOAT sample assembly</name>
+	<packaging>pom</packaging>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>org.eclipse.equinox</groupId>
+			<artifactId>cm</artifactId>
+		</dependency>
+
+        <dependency>
+	       <groupId>org.apache.felix</groupId>
+	       <artifactId>javax.servlet</artifactId>
+	       <version>1.0.0</version>
+	    </dependency>
+
+		<dependency>
+            <groupId>org.apache.aries.application</groupId>
+		    <artifactId>org.apache.aries.application</artifactId>
+			<version>0.2-incubating-SNAPSHOT</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.aries.blueprint</groupId>
+			<artifactId>org.apache.aries.blueprint</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.aries</groupId>
+			<artifactId>org.apache.aries.util</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.aries.application</groupId>
+			<artifactId>org.apache.aries.application.api</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.aries.application</groupId>
+			<artifactId>org.apache.aries.application.install</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.fileinstall</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.ops4j.pax.logging</groupId>
+			<artifactId>pax-logging-api</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.ops4j.pax.logging</groupId>
+			<artifactId>pax-logging-service</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.ops4j.pax.web</groupId>
+			<artifactId>pax-web-extender-war</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.ops4j.pax.web</groupId>
+			<artifactId>pax-web-jsp</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.ops4j.pax.web</groupId>
+			<artifactId>pax-web-jetty-bundle</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.eclipse.osgi</groupId>
+			<artifactId>services</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.eclipse</groupId>
+			<artifactId>osgi</artifactId>
+		</dependency>
+
+        <dependency>
+			<groupId>org.apache.aries.samples.goat</groupId>
+			<artifactId>org.apache.aries.samples.goat.api</artifactId>
+		</dependency>
+
+        <dependency>
+			<groupId>org.apache.aries.samples.goat</groupId>
+			<artifactId>org.apache.aries.samples.goat.web</artifactId>
+		</dependency>
+
+        <dependency>
+			<groupId>org.apache.aries.samples.goat</groupId>
+			<artifactId>org.apache.aries.samples.goat.dummy</artifactId>
+		</dependency>
+	</dependencies>
+	<build>
+
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<configuration>
+					<outputDirectory>${project.build.directory}</outputDirectory>
+				</configuration>
+				<executions>
+					<execution>
+						<id>filter</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>resources</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy</id>
+						<phase>package</phase>
+						<goals>
+							<goal>copy-dependencies</goal>
+						</goals>
+						<configuration>
+							<excludeTransitive>true</excludeTransitive>
+							<outputDirectory>${project.build.directory}</outputDirectory>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: incubator/aries/trunk/samples/goat/goat-assembly/src/main/filtered-resources/configuration/config.ini
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-assembly/src/main/filtered-resources/configuration/config.ini?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-assembly/src/main/filtered-resources/configuration/config.ini (added)
+++ incubator/aries/trunk/samples/goat/goat-assembly/src/main/filtered-resources/configuration/config.ini Tue May 25 16:13:13 2010
@@ -0,0 +1,355 @@
+# 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.
+osgi.bundles=\
+cm-3.2.0-v20070116.jar@start,\
+javax.servlet-1.0.0.jar@start,\
+org.apache.aries.application-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.blueprint-${ariesBlueprintVersion}.jar@start,\
+org.apache.aries.util-${ariesUtilVersion}.jar@start,\
+org.apache.felix.fileinstall-2.0.8.jar@start,\
+pax-logging-api-1.4.jar@start,\
+pax-logging-service-1.4.jar@start,\
+pax-web-extender-war-0.7.2.jar@start,\
+pax-web-jetty-bundle-0.7.2.jar@start,\
+pax-web-jsp-0.7.2.jar@start,\
+services-3.1.200-v20070605.jar@start,\
+org.apache.aries.samples.goat.api-0.2-incubating-SNAPSHOT.jar@start,\
+org.apache.aries.samples.goat.web-0.2-incubating-SNAPSHOT.jar@start,\
+org.apache.aries.samples.goat.dummy-0.2-incubating-SNAPSHOT.jar@start
+eclipse.ignoreApp=true
+org.ops4j.pax.logging.DefaultServiceLog.level=INFO
+org.osgi.framework.system.packages=javax.accessibility,\
+javax.activation,\
+javax.activity,\
+javax.annotation,\
+javax.annotation.processing,\
+javax.crypto,\
+javax.crypto.interfaces,\
+javax.crypto.spec,\
+javax.imageio,\
+javax.imageio.event,\
+javax.imageio.metadata,\
+javax.imageio.plugins.bmp,\
+javax.imageio.plugins.jpeg,\
+javax.imageio.spi,\
+javax.imageio.stream,\
+javax.jms,\
+javax.jws,\
+javax.jws.soap,\
+javax.lang.model,\
+javax.lang.model.element,\
+javax.lang.model.type,\
+javax.lang.model.util,\
+javax.management,\
+javax.management.loading,\
+javax.management.modelmbean,\
+javax.management.monitor,\
+javax.management.openmbean,\
+javax.management.relation,\
+javax.management.remote,\
+javax.management.remote.rmi,\
+javax.management.timer,\
+javax.naming,\
+javax.naming.directory,\
+javax.naming.event,\
+javax.naming.ldap,\
+javax.naming.spi,\
+javax.net,\
+javax.net.ssl,\
+javax.print,\
+javax.print.attribute,\
+javax.print.attribute.standard,\
+javax.print.event,\
+javax.rmi,\
+javax.rmi.CORBA,\
+javax.rmi.ssl,\
+javax.script,\
+javax.security.auth,\
+javax.security.auth.callback,\
+javax.security.auth.kerberos,\
+javax.security.auth.login,\
+javax.security.auth.spi,\
+javax.security.auth.x500,\
+javax.security.cert,\
+javax.security.sasl,\
+javax.sound.midi,\
+javax.sound.midi.spi,\
+javax.sound.sampled,\
+javax.sound.sampled.spi,\
+javax.sql,\
+javax.sql.rowset,\
+javax.sql.rowset.serial,\
+javax.sql.rowset.spi,\
+javax.swing,\
+javax.swing.border,\
+javax.swing.colorchooser,\
+javax.swing.event,\
+javax.swing.filechooser,\
+javax.swing.plaf,\
+javax.swing.plaf.basic,\
+javax.swing.plaf.metal,\
+javax.swing.plaf.multi,\
+javax.swing.plaf.synth,\
+javax.swing.table,\
+javax.swing.text,\
+javax.swing.text.html,\
+javax.swing.text.html.parser,\
+javax.swing.text.rtf,\
+javax.swing.tree,\
+javax.swing.undo,\
+javax.tools,\
+javax.transaction,\
+javax.transaction.xa,\
+javax.xml,\
+javax.xml.bind,\
+javax.xml.bind.annotation,\
+javax.xml.bind.annotation.adapters,\
+javax.xml.bind.attachment,\
+javax.xml.bind.helpers,\
+javax.xml.bind.util,\
+javax.xml.crypto,\
+javax.xml.crypto.dom,\
+javax.xml.crypto.dsig,\
+javax.xml.crypto.dsig.dom,\
+javax.xml.crypto.dsig.keyinfo,\
+javax.xml.crypto.dsig.spec,\
+javax.xml.datatype,\
+javax.xml.namespace,\
+javax.xml.parsers,\
+javax.xml.soap,\
+javax.xml.stream,\
+javax.xml.stream.events,\
+javax.xml.stream.util,\
+javax.xml.transform,\
+javax.xml.transform.dom,\
+javax.xml.transform.sax,\
+javax.xml.transform.stax,\
+javax.xml.transform.stream,\
+javax.xml.validation,\
+javax.xml.ws,\
+javax.xml.ws.handler,\
+javax.xml.ws.handler.soap,\
+javax.xml.ws.http,\
+javax.xml.ws.soap,\
+javax.xml.ws.spi,\
+javax.xml.ws.wsaddressing,\
+javax.xml.xpath,\
+org.ietf.jgss,\
+org.omg.CORBA,\
+org.omg.CORBA_2_3,\
+org.omg.CORBA_2_3.portable,\
+org.omg.CORBA.DynAnyPackage,\
+org.omg.CORBA.ORBPackage,\
+org.omg.CORBA.portable,\
+org.omg.CORBA.TypeCodePackage,\
+org.omg.CosNaming,\
+org.omg.CosNaming.NamingContextExtPackage,\
+org.omg.CosNaming.NamingContextPackage,\
+org.omg.Dynamic,\
+org.omg.DynamicAny,\
+org.omg.DynamicAny.DynAnyFactoryPackage,\
+org.omg.DynamicAny.DynAnyPackage,\
+org.omg.IOP,\
+org.omg.IOP.CodecFactoryPackage,\
+org.omg.IOP.CodecPackage,\
+org.omg.Messaging,\
+org.omg.PortableInterceptor,\
+org.omg.PortableInterceptor.ORBInitInfoPackage,\
+org.omg.PortableServer,\
+org.omg.PortableServer.CurrentPackage,\
+org.omg.PortableServer.POAManagerPackage,\
+org.omg.PortableServer.POAPackage,\
+org.omg.PortableServer.portable,\
+org.omg.PortableServer.ServantLocatorPackage,\
+org.omg.SendingContext,\
+org.omg.stub.java.rmi,\
+org.w3c.dom,\
+org.w3c.dom.bootstrap,\
+org.w3c.dom.css,\
+org.w3c.dom.events,\
+org.w3c.dom.html,\
+org.w3c.dom.ls,\
+org.w3c.dom.ranges,\
+org.w3c.dom.stylesheets,\
+org.w3c.dom.traversal,\
+org.w3c.dom.views,\
+org.w3c.dom.xpath,\
+org.xml.sax,\
+org.xml.sax.ext,\
+org.xml.sax.helpers,\
+com.ibm.CORBA.iiop
+
+xxorg.osgi.framework.system.packages=javax.xml.parsers,\
+javax.naming
+xorg.osgi.framework.system.packages=javax.accessibility,\
+javax.activation,\
+javax.activity,\
+javax.annotation,\
+javax.annotation.processing,\
+javax.crypto,\
+javax.crypto.interfaces,\
+javax.crypto.spec,\
+javax.imageio,\
+javax.imageio.event,\
+javax.imageio.metadata,\
+javax.imageio.plugins.bmp,\
+javax.imageio.plugins.jpeg,\
+javax.imageio.spi,\
+javax.imageio.stream,\
+javax.jws,\
+javax.jws.soap,\
+javax.lang.model,\
+javax.lang.model.element,\
+javax.lang.model.type,\
+javax.lang.model.util,\
+javax.management,\
+javax.management.loading,\
+javax.management.modelmbean,\
+javax.management.monitor,\
+javax.management.openmbean,\
+javax.management.relation,\
+javax.management.remote,\
+javax.management.remote.rmi,\
+javax.management.timer,\
+javax.naming,\
+javax.naming.directory,\
+javax.naming.event,\
+javax.naming.ldap,\
+javax.naming.spi,\
+javax.net,\
+javax.net.ssl,\
+javax.print,\
+javax.print.attribute,\
+javax.print.attribute.standard,\
+javax.print.event,\
+javax.rmi,\
+javax.rmi.CORBA,\
+javax.rmi.ssl,\
+javax.script,\
+javax.security.auth,\
+javax.security.auth.callback,\
+javax.security.auth.kerberos,\
+javax.security.auth.login,\
+javax.security.auth.spi,\
+javax.security.auth.x500,\
+javax.security.cert,\
+javax.security.sasl,\
+javax.sound.midi,\
+javax.sound.midi.spi,\
+javax.sound.sampled,\
+javax.sound.sampled.spi,\
+javax.sql,\
+javax.sql.rowset,\
+javax.sql.rowset.serial,\
+javax.sql.rowset.spi,\
+javax.swing,\
+javax.swing.border,\
+javax.swing.colorchooser,\
+javax.swing.event,\
+javax.swing.filechooser,\
+javax.swing.plaf,\
+javax.swing.plaf.basic,\
+javax.swing.plaf.metal,\
+javax.swing.plaf.multi,\
+javax.swing.plaf.synth,\
+javax.swing.table,\
+javax.swing.text,\
+javax.swing.text.html,\
+javax.swing.text.html.parser,\
+javax.swing.text.rtf,\
+javax.swing.tree,\
+javax.swing.undo,\
+javax.tools,\
+javax.transaction,\
+javax.transaction.xa,\
+javax.xml,\
+javax.xml.bind,\
+javax.xml.bind.annotation,\
+javax.xml.bind.annotation.adapters,\
+javax.xml.bind.attachment,\
+javax.xml.bind.helpers,\
+javax.xml.bind.util,\
+javax.xml.crypto,\
+javax.xml.crypto.dom,\
+javax.xml.crypto.dsig,\
+javax.xml.crypto.dsig.dom,\
+javax.xml.crypto.dsig.keyinfo,\
+javax.xml.crypto.dsig.spec,\
+javax.xml.datatype,\
+javax.xml.namespace,\
+javax.xml.parsers,\
+javax.xml.soap,\
+javax.xml.stream,\
+javax.xml.stream.events,\
+javax.xml.stream.util,\
+javax.xml.transform,\
+javax.xml.transform.dom,\
+javax.xml.transform.sax,\
+javax.xml.transform.stax,\
+javax.xml.transform.stream,\
+javax.xml.validation,\
+javax.xml.ws,\
+javax.xml.ws.handler,\
+javax.xml.ws.handler.soap,\
+javax.xml.ws.http,\
+javax.xml.ws.soap,\
+javax.xml.ws.spi,\
+javax.xml.ws.wsaddressing,\
+javax.xml.xpath,\
+org.ietf.jgss,\
+org.omg.CORBA,\
+org.omg.CORBA_2_3,\
+org.omg.CORBA_2_3.portable,\
+org.omg.CORBA.DynAnyPackage,\
+org.omg.CORBA.ORBPackage,\
+org.omg.CORBA.portable,\
+org.omg.CORBA.TypeCodePackage,\
+org.omg.CosNaming,\
+org.omg.CosNaming.NamingContextExtPackage,\
+org.omg.CosNaming.NamingContextPackage,\
+org.omg.Dynamic,\
+org.omg.DynamicAny,\
+org.omg.DynamicAny.DynAnyFactoryPackage,\
+org.omg.DynamicAny.DynAnyPackage,\
+org.omg.IOP,\
+org.omg.IOP.CodecFactoryPackage,\
+org.omg.IOP.CodecPackage,\
+org.omg.Messaging,\
+org.omg.PortableInterceptor,\
+org.omg.PortableInterceptor.ORBInitInfoPackage,\
+org.omg.PortableServer,\
+org.omg.PortableServer.CurrentPackage,\
+org.omg.PortableServer.POAManagerPackage,\
+org.omg.PortableServer.POAPackage,\
+org.omg.PortableServer.portable,\
+org.omg.PortableServer.ServantLocatorPackage,\
+org.omg.SendingContext,\
+org.omg.stub.java.rmi,\
+org.w3c.dom,\
+org.w3c.dom.bootstrap,\
+org.w3c.dom.css,\
+org.w3c.dom.events,\
+org.w3c.dom.html,\
+org.w3c.dom.ls,\
+org.w3c.dom.ranges,\
+org.w3c.dom.stylesheets,\
+org.w3c.dom.traversal,\
+org.w3c.dom.views,\
+org.w3c.dom.xpath,\
+org.xml.sax,\
+org.xml.sax.ext,\
+org.xml.sax.helpers

Added: incubator/aries/trunk/samples/goat/goat-dummy-provider/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-dummy-provider/pom.xml?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-dummy-provider/pom.xml (added)
+++ incubator/aries/trunk/samples/goat/goat-dummy-provider/pom.xml Tue May 25 16:13:13 2010
@@ -0,0 +1,60 @@
+<?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.aries.samples.goat</groupId>
+        <artifactId>goat</artifactId>
+        <version>0.2-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.aries.samples.goat.dummy</artifactId>
+    <name>Apache Aries GOAT dummy provider</name>
+    <packaging>bundle</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.aries.samples.goat</groupId>
+			<artifactId>org.apache.aries.samples.goat.api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.aries.samples.goat</groupId>
+			<artifactId>org.apache.aries.samples.goat.web</artifactId>
+		</dependency>
+	</dependencies>
+
+    
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Private-Package>org.apache.aries.samples.goat.dummy.*</Private-Package> 
+						<Export-Package>!org.apache.aries.samples.goat.dummy.*</Export-Package> 
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
+

Added: incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyInfoProvider.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyInfoProvider.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyInfoProvider.java (added)
+++ incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyInfoProvider.java Tue May 25 16:13:13 2010
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.dummy;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.aries.samples.goat.info.ComponentInfoImpl;
+
+import org.apache.aries.samples.goat.api.ComponentInfo;
+import org.apache.aries.samples.goat.api.ComponentInfoProvider;
+
+public class DummyInfoProvider implements ComponentInfoProvider {
+	
+	ComponentInfoImpl a = new ComponentInfoImpl();
+	ComponentInfoImpl b = new ComponentInfoImpl();
+	ComponentInfoImpl c = new ComponentInfoImpl();
+		
+	public DummyInfoProvider(){
+				
+		a.setId("/root/"+1);
+		Map<String,String> props = new HashMap<String,String>();
+		props.put("SymbolicName", "Uber.Bundle");
+		props.put("Version", "1.0.0");
+		props.put("State", "ACTIVE");
+		props.put("BundleID", "1");
+		a.setComponentProperties(props);
+		
+		b.setId("/root/"+2);
+		props = new HashMap<String,String>();
+		props.put("SymbolicName", "Fred");
+		props.put("Version", "1.0.0");
+		props.put("State", "RESOLVED");
+		props.put("BundleID", "2");
+		b.setComponentProperties(props);
+		
+		c.setId("/root/"+3);
+		props = new HashMap<String,String>();
+		props.put("SymbolicName", "Wilma");
+		props.put("Version", "1.0.0");
+		props.put("State", "ACTIVE");
+		props.put("BundleID", "3");
+		c.setComponentProperties(props);
+	}
+
+	@Override
+	public List<ComponentInfo> getComponents() {
+		List<ComponentInfo> result = new ArrayList<ComponentInfo>();
+		result.add(a);
+		result.add(b);
+		result.add(c);
+		return result;
+	}
+
+	@Override
+	public ComponentInfo getComponentForId(String id) {
+		if("/root/1".equals(id)) return a;
+		if("/root/2".equals(id)) return b;
+		if("/root/3".equals(id)) return c;
+		return null;
+	}
+
+	@Override
+	public void registerComponentInfoListener(ComponentInfoListener listener) {
+		//no-op
+	}
+
+}
+

Added: incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyModelService.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyModelService.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyModelService.java (added)
+++ incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyModelService.java Tue May 25 16:13:13 2010
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.dummy;
+
+import org.apache.aries.samples.goat.api.ComponentInfoProvider;
+import org.apache.aries.samples.goat.api.ModelInfoService;
+import org.apache.aries.samples.goat.api.RelationshipInfoProvider;
+
+public class DummyModelService implements ModelInfoService {
+
+	private final static ComponentInfoProvider cip = new DummyInfoProvider();
+	private final static RelationshipInfoProvider rip = new DummyRelationshipProvider(cip);
+	
+	@Override
+	public String getName() {
+		return "Dummy Model Service";
+	}
+
+	@Override
+	public ComponentInfoProvider getComponentInfoProvider() {
+		return cip;
+	}
+
+	@Override
+	public RelationshipInfoProvider getRelationshipInfoProvider() {
+		return rip;
+	}
+
+}

Added: incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyRelationshipProvider.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyRelationshipProvider.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyRelationshipProvider.java (added)
+++ incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/java/org/apache/aries/samples/goat/dummy/DummyRelationshipProvider.java Tue May 25 16:13:13 2010
@@ -0,0 +1,112 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.dummy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.aries.samples.goat.info.RelationshipInfoImpl;
+
+import org.apache.aries.samples.goat.api.ComponentInfo;
+import org.apache.aries.samples.goat.api.ComponentInfoProvider;
+import org.apache.aries.samples.goat.api.RelationshipInfo;
+import org.apache.aries.samples.goat.api.RelationshipInfoProvider;
+
+public class DummyRelationshipProvider implements RelationshipInfoProvider {
+
+	ComponentInfoProvider cip = null;
+	
+	public DummyRelationshipProvider(ComponentInfoProvider cip){
+		this.cip = cip;
+	}
+	
+	@Override
+	public List<RelationshipInfo> getRelationships() {
+		
+		ArrayList<RelationshipInfo> ris = new ArrayList<RelationshipInfo>();
+		
+		ComponentInfo ci1 = cip.getComponentForId("/root/1");
+		ComponentInfo ci2 = cip.getComponentForId("/root/2");
+		ComponentInfo ci3 = cip.getComponentForId("/root/3");
+		
+		RelationshipInfoImpl ri1 = new RelationshipInfoImpl();
+		RelationshipInfoImpl ri2 = new RelationshipInfoImpl();
+		RelationshipInfoImpl ri3 = new RelationshipInfoImpl();
+		RelationshipInfoImpl ri4 = new RelationshipInfoImpl();
+		RelationshipInfoImpl ri5 = new RelationshipInfoImpl();
+		RelationshipInfoImpl ri6 = new RelationshipInfoImpl();
+		ris.add(ri1);
+		ris.add(ri2);
+		ris.add(ri3);
+		ris.add(ri4);
+		ris.add(ri5);
+		ris.add(ri6);
+		
+		ri1.setName("i.am.exported.by.1.and.used.by.2.and.3");
+		ri1.setProvidedBy(ci1);
+		ArrayList<ComponentInfo> c = new ArrayList<ComponentInfo>();
+		c.add(ci2);
+		c.add(ci3);
+		ri1.setConsumedBy(c);
+		ri1.setType("Package"); 
+		
+		ri2.setName("i.am.exported.by.1.and.used.by.3");
+		ri2.setProvidedBy(ci1);
+		c = new ArrayList<ComponentInfo>();
+		c.add(ci3);
+		ri2.setConsumedBy(c);
+		ri2.setType("Package"); 
+		
+		ri3.setName("i.am.exported.by.2.and.used.by.3");
+		ri3.setProvidedBy(ci2);
+		c = new ArrayList<ComponentInfo>();
+		c.add(ci3);
+		ri3.setConsumedBy(c);
+		ri3.setType("Package"); 
+		
+		ri4.setName("i.am.exported.by.3.and.used.by.2");
+		ri4.setProvidedBy(ci3);
+		c = new ArrayList<ComponentInfo>();
+		c.add(ci2);
+		ri4.setConsumedBy(c);
+		ri4.setType("Package"); 
+
+		ri5.setName("i.am.a.funky.service.from.3.used.by.2");
+		ri5.setProvidedBy(ci3);
+		c = new ArrayList<ComponentInfo>();
+		c.add(ci2);
+		ri5.setConsumedBy(c);
+		ri5.setType("Service");
+		
+		ri6.setName("i.am.a.funky.service.from.1.used.by.2");
+		ri6.setProvidedBy(ci1);
+		c = new ArrayList<ComponentInfo>();
+		c.add(ci2);
+		ri6.setConsumedBy(c);
+		ri6.setType("Service");
+		return ris;
+	}
+
+	@Override
+	public void registerRelationshipInfoListener(RelationshipInfoListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Added: incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ incubator/aries/trunk/samples/goat/goat-dummy-provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml Tue May 25 16:13:13 2010
@@ -0,0 +1,26 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+  <bean id="dummyInfoProvider" class="org.apache.aries.samples.goat.dummy.DummyModelService">
+  </bean>
+  <service ref="dummyInfoProvider" interface="org.apache.aries.samples.goat.api.ModelInfoService">
+  	<service-properties>
+  	  <entry key="displayName" value="DummyInfoProvider"/>
+  	</service-properties>
+  </service>
+</blueprint>

Added: incubator/aries/trunk/samples/goat/goat-web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/pom.xml?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/pom.xml (added)
+++ incubator/aries/trunk/samples/goat/goat-web/pom.xml Tue May 25 16:13:13 2010
@@ -0,0 +1,149 @@
+<?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.aries.samples.goat</groupId>
+        <artifactId>goat</artifactId>
+        <version>0.2-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.aries.samples.goat.web</artifactId>
+    <name>Apache Aries GOAT web bundle </name>
+    <packaging>bundle</packaging>
+
+
+	<dependencies>
+		<dependency>
+			<groupId>org.eclipse</groupId>
+			<artifactId>osgi</artifactId>
+		</dependency>
+        <dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>javax.servlet</artifactId>
+			<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.directwebremoting</groupId>
+			<artifactId>dwr</artifactId>
+			<version>3.0.0.109.dev-SNAPSHOT</version>
+			<scope>provided</scope>
+			<optional>true</optional>
+		</dependency>
+        <dependency>
+			<groupId>org.apache.aries.application</groupId>
+			<artifactId>org.apache.aries.application.utils</artifactId>
+		</dependency>
+        <dependency>
+			<groupId>org.apache.aries.samples.goat</groupId>
+			<artifactId>org.apache.aries.samples.goat.api</artifactId>
+		</dependency>
+	</dependencies>
+
+    
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>unpack dojo</id>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>unpack</goal>
+						</goals>
+						<configuration>
+							<artifactItems>
+								<artifactItem>
+									<groupId>org.dojotoolkit</groupId>
+									<artifactId>dojo</artifactId>
+									<version>1.4.2</version>
+									<type>zip</type>
+								</artifactItem>
+							</artifactItems>
+							<outputDirectory>${project.build.directory}/dojo</outputDirectory>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<configuration>
+					<instructions>
+						<Bundle-ClassPath>.,WEB-INF/lib</Bundle-ClassPath>
+						<Include-Resource>{maven-resources},target/dojo/dojo-1.4.2</Include-Resource>
+						<Web-ContextPath>/</Web-ContextPath>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Private-Package>org.apache.aries.samples.goat.web.*</Private-Package>
+						<Export-Package>org.apache.aries.samples.goat.info;version=${project.version}</Export-Package> 
+						<Import-Package>
+							javax.imageio,
+							javax.jms,
+							javax.servlet,
+							javax.servlet.http,
+							javax.sql,
+							javax.swing.event,
+							javax.xml.parsers,
+							javax.xml.transform,
+							javax.xml.transform.dom,
+							javax.xml.transform.stream,
+							org.w3c.dom,
+							org.xml.sax,
+							net.sf.hibernate;resolution:=optional,
+							nu.xom;resolution:=optional,
+							org.aopalliance.intercept;resolution:=optional,
+							org.apache.bsf;resolution:=optional,
+							org.apache.catalina;resolution:=optional,
+							org.apache.commons.fileupload;resolution:=optional,
+							org.apache.commons.fileupload.disk;resolution:=optional,
+							org.apache.commons.fileupload.servlet;resolution:=optional,
+							org.apache.commons.logging,
+							org.apache.struts.action;resolution:=optional,
+							org.apache.struts.config;resolution:=optional,
+							org.apache.struts.util;resolution:=optional,
+							org.apache.xmlbeans;resolution:=optional,
+							org.dom4j*;resolution:=optional,
+							org.hibernate*;resolution:=optional,
+							org.jdom*;resolution:=optional,
+							org.mortbay*;resolution:=optional,
+							org.mozilla*;resolution:=optional,
+							org.springframework*;resolution:=optional,
+							com.google.inject*;resolution:=optional,
+							com.yahoo.platform.yui.compressor;resolution:=optional,
+							dojox.cometd;resolution:=optional,
+							*
+						</Import-Package>
+						<Embed-Dependency>dwr</Embed-Dependency>
+						<Embed-Directory>WEB-INF/lib</Embed-Directory>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<repositories>
+		<repository>
+			<id>dwr-snapshots</id>
+			<name>DWR SNAPSHOT Repository</name>
+			<url>http://download.directwebremoting.org/maven2-snapshot/</url>
+		</repository>
+	</repositories>
+</project>

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/ComponentInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/ComponentInfoImpl.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/ComponentInfoImpl.java (added)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/ComponentInfoImpl.java Tue May 25 16:13:13 2010
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.info;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.aries.samples.goat.api.ComponentInfo;
+
+public class ComponentInfoImpl implements ComponentInfo {
+
+	List<ComponentInfo> children;
+	Map<String,String> componentProperties;
+	String id;
+	public List<ComponentInfo> getChildren() {
+		return children;
+	}
+	public void setChildren(List<ComponentInfo> children) {
+		this.children = children;
+	}
+	public Map<String, String> getComponentProperties() {
+		return componentProperties;
+	}
+	public void setComponentProperties(Map<String, String> componentProperties) {
+		this.componentProperties = componentProperties;
+	}
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+
+}

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/RelationshipInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/RelationshipInfoImpl.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/RelationshipInfoImpl.java (added)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/info/RelationshipInfoImpl.java Tue May 25 16:13:13 2010
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.info;
+import java.util.List;
+
+import org.apache.aries.samples.goat.api.ComponentInfo;
+import org.apache.aries.samples.goat.api.RelationshipAspect;
+import org.apache.aries.samples.goat.api.RelationshipInfo;
+
+public class RelationshipInfoImpl implements RelationshipInfo {
+	List<ComponentInfo> consumedBy;
+	List<RelationshipAspect> relationshipAspects;
+	String name;
+	ComponentInfo providedBy;
+	String type;
+	public List<ComponentInfo> getConsumedBy() {
+		return consumedBy;
+	}
+	public void setConsumedBy(List<ComponentInfo> consumedBy) {
+		this.consumedBy = consumedBy;
+	}
+	public List<RelationshipAspect> getRelationshipAspects() {
+		return relationshipAspects;
+	}
+	public void setRelationshipAspects(List<RelationshipAspect> relationshipAspects) {
+		this.relationshipAspects = relationshipAspects;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public ComponentInfo getProvidedBy() {
+		return providedBy;
+	}
+	public void setProvidedBy(ComponentInfo providedBy) {
+		this.providedBy = providedBy;
+	}
+	public String getType() {
+		return type;
+	}
+	public void setType(String type) {
+		this.type = type;
+	}
+	
+}

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java (added)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/java/org/apache/aries/samples/goat/web/ServerSideClass.java Tue May 25 16:13:13 2010
@@ -0,0 +1,216 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.samples.goat.web;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+
+import org.directwebremoting.ScriptSession;
+import org.directwebremoting.ScriptBuffer;
+import org.directwebremoting.Browser;
+import org.directwebremoting.ServerContextFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+
+import org.apache.aries.samples.goat.api.ComponentInfo;
+import org.apache.aries.samples.goat.api.ComponentInfoProvider;
+import org.apache.aries.samples.goat.api.ModelInfoService;
+import org.apache.aries.samples.goat.api.RelationshipInfo;
+
+public class ServerSideClass {
+
+	private String modelInfoServiceHint="";
+	
+	private ModelInfoService ModelInfoService=null;
+	
+	private Map<ModelInfoService, ComponentInfoProvider.ComponentInfoListener>listeners=new HashMap<ModelInfoService,ComponentInfoProvider.ComponentInfoListener>();
+
+
+    private class ListenerImpl implements ComponentInfoProvider.ComponentInfoListener{
+    	String server;
+    	public ListenerImpl(String server){
+    		this.server=server;
+    	}
+    	public void updateComponent(ComponentInfo b) {
+    		if(this.server.equals(modelInfoServiceHint)){
+ 			   //todo: only issue the add for the new bundle, and affected other bundles.
+ 			   getInitialComponents(modelInfoServiceHint);
+ 		   }
+    	}
+    	public void removeComponent(ComponentInfo b) {
+    		//todo
+    	}
+    }
+    
+	public ServerSideClass() {
+		System.err.println("SSC Built!");
+       	
+    }
+    
+	@SuppressWarnings("unused")
+	private String bundleStateToString(int bundleState){
+		switch(bundleState){
+		case Bundle.UNINSTALLED : return "UNINSTALLED";
+		case Bundle.INSTALLED : return "INSTALLED";
+		case Bundle.RESOLVED : return "RESOLVED";
+		case Bundle.STARTING : return "STARTING";
+		case Bundle.STOPPING : return "STOPPING";
+		case Bundle.ACTIVE : return "ACTIVE";
+		default : return "UNKNOWN["+bundleState+"]";
+		}
+	}    
+    
+    /**
+     * this is invoked by a page onload.. so until it's invoked.. we dont care about components
+     */
+    public void getInitialComponents(String dataProvider){
+    	
+    	System.err.println("GET INITIAL BUNDLES ASKED TO USE DATAPROVIDER "+dataProvider);
+    	
+    	if(dataProvider==null)
+    		throw new IllegalArgumentException("Unable to accept 'null' as a dataProvider");
+    	
+    	//do we need to update?
+    	if( !this.modelInfoServiceHint.equals(dataProvider)){
+    		    		
+    		this.modelInfoServiceHint = dataProvider;
+		    		
+    		
+    		if(!(this.ModelInfoService==null)){
+    			//we already had a provider.. we need to shut down the existing components & relationships in the browsers..
+    			addFunctionCall("forgetAboutAllEverything");
+    		}
+    		
+        	ServletContext context = org.directwebremoting.ServerContextFactory.get().getServletContext();
+    		Object o = context.getAttribute("osgi-bundlecontext");
+    		if(o!=null){
+    			if(o instanceof BundleContext){
+    				BundleContext b_ctx = (BundleContext)o;
+    				
+    				System.err.println("Looking up bcip");
+    				try{
+    				ServiceReference sr[] = b_ctx.getServiceReferences(ModelInfoService.class.getName(), "(displayName="+this.modelInfoServiceHint+")");
+    				if(sr!=null){
+    					System.err.println("Getting bcip");
+    					this.ModelInfoService = (ModelInfoService)b_ctx.getService(sr[0]);
+    					System.err.println("Got bcip "+this.ModelInfoService);
+    				}else{
+    					System.err.println("UNABLE TO FIND BCIP!!");
+    					System.err.println("UNABLE TO FIND BCIP!!");
+    					System.err.println("UNABLE TO FIND BCIP!!");
+    				}
+    				}catch(InvalidSyntaxException ise){
+    					
+    				}
+  				
+    				if(this.ModelInfoService!=null){
+    					if(!listeners.containsKey(this.ModelInfoService)){    
+    						ComponentInfoProvider.ComponentInfoListener l = new ListenerImpl(this.modelInfoServiceHint);
+    						listeners.put(this.ModelInfoService, l);
+    						this.ModelInfoService.getComponentInfoProvider().registerComponentInfoListener(l);
+    					}
+    				}
+    			}
+    		}
+    		
+    	}
+    	    	
+    	List<ComponentInfo> bis = this.ModelInfoService.getComponentInfoProvider().getComponents();
+    	System.err.println("Got "+(bis==null?"null":bis.size())+" components back from the provider ");
+    	if(bis!=null){
+    		for(ComponentInfo b: bis){
+    	
+    			System.err.println("Adding Component .. "+b.getId());
+	
+    			addFunctionCall("addComponent",  b);    			   			
+    		}
+    	} 
+    	
+    	List<RelationshipInfo> ris = this.ModelInfoService.getRelationshipInfoProvider().getRelationships();
+    	System.err.println("Got "+(ris==null?"null":ris.size())+" relationships back from the provider ");
+    	if(ris!=null){
+    		for(RelationshipInfo r: ris){
+    			System.err.println("Adding relationship type "+r.getType()+" called "+r.getName()+" from "+r.getProvidedBy().getId());
+    			
+    			addFunctionCall("addRelationship",  r);
+    		}
+    	}
+    	 	
+    }
+	private void addFunctionCall(String name, Object... params){
+        final ScriptBuffer script = new ScriptBuffer();
+        script.appendScript(name).appendScript("(");
+        for(int i = 0; i < params.length; i++)
+        {
+            if(i != 0)script.appendScript(",");
+            script.appendData(params[i]);
+        }
+        script.appendScript(");");
+        Browser.withAllSessions(new Runnable(){ public void run(){
+            for(ScriptSession s: Browser.getTargetSessions()){
+                s.addScript(script);
+            }
+        }});
+    }
+
+	public String[] getProviders(){
+		System.err.println("Getting providers...");
+		ArrayList<String> result=new ArrayList<String>();
+    	ServletContext context = ServerContextFactory.get().getServletContext();
+		Object o = context.getAttribute("osgi-bundlecontext");
+		if(o!=null){
+			if(o instanceof BundleContext){
+				BundleContext b_ctx = (BundleContext)o;
+				try{
+					System.err.println("Getting providers [2]...");
+					ServiceReference[] srs = b_ctx.getServiceReferences(ModelInfoService.class.getName(), null);
+					System.err.println("Got.. "+srs);
+					if(srs==null || srs.length==0){
+						System.err.println("NO DATA PROVIDERS");
+						throw new RuntimeException("Unable to find any data providers");
+					}
+					System.err.println("Processing srs as loop.");
+					for(ServiceReference sr : srs){
+						System.err.println("Processing srs entry...");
+						
+						String name = (String.valueOf(sr.getProperty("displayName")));
+						
+						result.add(name);
+					}	
+					System.err.println("Processed srs as loop.");
+				}catch(InvalidSyntaxException e){
+					//wont happen, the exception relates to the filter, (2nd arg above), which is constant null.
+				}
+			}
+		}	
+		System.err.println("Returning "+result.size());
+		String[] arr = new String[result.size()];
+		arr = result.toArray(arr);
+		for(String x: arr){
+			System.err.println(" - "+x);
+		}
+		return arr;
+	}
+}

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/dwr.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/dwr.xml?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/dwr.xml (added)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/dwr.xml Tue May 25 16:13:13 2010
@@ -0,0 +1,28 @@
+<?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.
+-->
+<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr/dwr30.dtd">
+
+<dwr>
+  <allow>
+    <create creator="new" scope="application">
+      <param name="class" value="org.apache.aries.samples.goat.web.ServerSideClass"/>
+    </create>
+	<convert converter="bean" match="org.apache.aries.samples.goat.info.ComponentInfoImpl" javascript="ComponentInfo"/>          
+	<convert converter="bean" match="org.apache.aries.samples.goat.info.RelationshipInfoImpl" javascript="RelationshipInfo"/> 
+  </allow>
+</dwr>

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/web.xml?rev=948087&view=auto
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/web.xml (added)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/WEB-INF/web.xml Tue May 25 16:13:13 2010
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<web-app xmlns: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="WebApp_ID" version="2.5">
+  <display-name>GOAT</display-name>
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+    <welcome-file>index.htm</welcome-file>
+    <welcome-file>index.jsp</welcome-file>
+    <welcome-file>default.html</welcome-file>
+    <welcome-file>default.htm</welcome-file>
+    <welcome-file>default.jsp</welcome-file>
+  </welcome-file-list>
+  
+<servlet>
+  <servlet-name>dwr-invoker</servlet-name>
+  <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
+   
+    <init-param>
+     <param-name>debug</param-name>
+     <param-value>true</param-value>
+  </init-param>
+  
+  <init-param>
+    <param-name>activeReverseAjaxEnabled</param-name>
+    <param-value>true</param-value>
+  </init-param>
+
+</servlet>
+
+<servlet-mapping>
+  <servlet-name>dwr-invoker</servlet-name>
+  <url-pattern>/dwr/*</url-pattern>
+</servlet-mapping>
+
+</web-app>

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/Thumbs.db
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/Thumbs.db?rev=948087&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/Thumbs.db
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndCopy.png
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndCopy.png?rev=948087&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndCopy.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndMove.png
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndMove.png?rev=948087&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndMove.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoCopy.png
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoCopy.png?rev=948087&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoCopy.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoMove.png
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoMove.png?rev=948087&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/dndNoMove.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_dx_gradient.gif
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_dx_gradient.gif?rev=948087&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_dx_gradient.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_sort_down.gif
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/images/grid_sort_down.gif?rev=948087&view=auto
==============================================================================
Binary file - no diff available.



Mime
View raw message