summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/policies/src/main/resources
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-07-07 22:04:23 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-07-07 22:04:23 +0000
commit1cafec6621f1acdc1809e67d42b3915411dddf21 (patch)
treeb7d6f21c3e1f2fa562fc776ae0b473ec6eb9574a /java/sca/itest/policies/src/main/resources
parent7c535773f216d7f87d71718a27df6c0b85a59854 (diff)
Add an itest for policies
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@791992 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/itest/policies/src/main/resources/Customer.composite34
-rw-r--r--java/sca/itest/policies/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--java/sca/itest/policies/src/main/resources/Payment.composite48
3 files changed, 105 insertions, 0 deletions
diff --git a/java/sca/itest/policies/src/main/resources/Customer.composite b/java/sca/itest/policies/src/main/resources/Customer.composite
new file mode 100644
index 0000000000..29458ad284
--- /dev/null
+++ b/java/sca/itest/policies/src/main/resources/Customer.composite
@@ -0,0 +1,34 @@
+<?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/200903"
+ xmlns:c="http://customer"
+ xmlns:sca = "http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://customer"
+ name="Customer">
+
+ <service name="Registry" promote="CustomerRegistry">
+ <binding.sca/>
+ </service>
+
+ <component name="CustomerRegistry">
+ <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.CustomerRegistryImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/java/sca/itest/policies/src/main/resources/META-INF/sca-contribution.xml b/java/sca/itest/policies/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ca9ae2f775
--- /dev/null
+++ b/java/sca/itest/policies/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:p="http://payment">
+ <deployable composite="p:Payment" />
+</contribution> \ No newline at end of file
diff --git a/java/sca/itest/policies/src/main/resources/Payment.composite b/java/sca/itest/policies/src/main/resources/Payment.composite
new file mode 100644
index 0000000000..a1f9aefdac
--- /dev/null
+++ b/java/sca/itest/policies/src/main/resources/Payment.composite
@@ -0,0 +1,48 @@
+<?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/200903"
+ xmlns:p="http://payment"
+ xmlns:c="http://customer"
+ xmlns:sca = "http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ requires = "sca:authorization"
+ targetNamespace="http://payment"
+ name="Payment">
+
+ <component name="Payment">
+ <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.PaymentImpl" />
+ <reference name="creditCardPayment" target="CreditCardPayment">
+ <binding.sca requires="sca:integrity">
+ </binding.sca>
+ </reference>
+ <reference name="customerRegistry" target="Customer/Registry" requires="sca:suspendsTransaction"/>
+ </component>
+
+ <component name="CreditCardPayment">
+ <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.CreditCardPaymentImpl" />
+ </component>
+
+ <component name="Customer">
+ <implementation.composite name="c:Customer" requires="sca:managedTransaction.global"/>
+ <service name="Registry" requires="sca:suspendsTransaction">
+ <binding.sca/>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file