Author: antelder
Date: Thu Aug 11 19:50:07 2011
New Revision: 1156776
URL: http://svn.apache.org/viewvc?rev=1156776&view=rev
Log:
Add an example composite based on the one in section 5.2.1 of the assembly spec
so we can compare the pictures
Added:
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite
- copied, changed from r1156639,
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite
Modified:
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml
Added:
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java?rev=1156776&view=auto
==============================================================================
---
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java
(added)
+++
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java
Thu Aug 11 19:50:07 2011
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package services.myvalue;
+
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Reference;
+
+public class MyValueServiceImpl {
+
+ @Property
+ String currency;
+
+ @Reference
+ Object customerService;
+
+ @Reference
+ Object stockQuoteService;
+
+}
Modified:
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml
URL:
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml?rev=1156776&r1=1156775&r2=1156776&view=diff
==============================================================================
---
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml
(original)
+++
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml
Thu Aug 11 19:50:07 2011
@@ -18,8 +18,10 @@
* under the License.
-->
<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:sample="http://sample">
+ xmlns:sample="http://sample"
+ xmlns:foo="http://foo.com">
<deployable composite="sample:helloworld-contribution" />
+ <deployable composite="foo:MyValueComposite" />
</contribution>
Copied:
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite
(from r1156639,
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite)
URL:
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite?p2=tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite&p1=tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite&r1=1156639&r2=1156776&rev=1156776&view=diff
==============================================================================
---
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite
(original)
+++
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite
Thu Aug 11 19:50:07 2011
@@ -18,12 +18,20 @@
* under the License.
-->
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://sample"
- name="helloworld-contribution">
+ targetNamespace="http://foo.com"
+ name="MyValueComposite" >
- <component name="HelloworldComponent">
- <implementation.java class="sample.HelloworldImpl"/>
- </component>
+ <service name="MyValueService" promote="MyValueServiceComponent"/>
-</composite>
+ <component name="MyValueServiceComponent">
+ <implementation.java class="services.myvalue.MyValueServiceImpl"/>
+ <property name="currency">EURO</property>
+ <reference name="customerService"/>
+ <reference name="stockQuoteService"/>
+ </component>
+
+ <reference name="CustomerService"
promote="MyValueServiceComponent/customerService"/>
+
+ <reference name="StockQuoteService"
promote="MyValueServiceComponent/stockQuoteService"/>
+
+</composite>
\ No newline at end of file