diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-11 19:50:07 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-11 19:50:07 +0000 |
commit | 0ad58ea612b11983efbb44064fb4a2b9fcda03c3 (patch) | |
tree | fd90514ef960b8ba0cfa2932147db3461d5e69a0 /collaboration | |
parent | acb77d471e5f0597ccaf7e2da4911ee24f84fb5f (diff) |
Add an example composite based on the one in section 5.2.1 of the assembly spec so we can compare the pictures
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1156776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'collaboration')
3 files changed, 76 insertions, 1 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java new file mode 100644 index 0000000000..af8795073e --- /dev/null +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/services/myvalue/MyValueServiceImpl.java @@ -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;
+
+}
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml index 95c32fb5bf..7d740f8e9b 100644 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml @@ -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>
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite new file mode 100644 index 0000000000..b84eb359fa --- /dev/null +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/myValue.composite @@ -0,0 +1,37 @@ +<?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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://foo.com"
+ name="MyValueComposite" >
+
+ <service name="MyValueService" promote="MyValueServiceComponent"/>
+
+ <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 |