summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.5/itest/policy/src/main/resources
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-04-18 07:36:53 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-04-18 07:36:53 +0000
commit6c7ad7c110656f47273dc23228b41e46023492f3 (patch)
tree348f4838b71e73278bd01153e93db88e22e9c189 /branches/sca-java-1.5/itest/policy/src/main/resources
parent5395b820e60118c68eab9c442af3c53e0e2d7f50 (diff)
Create 1.5 branch
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@766260 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5/itest/policy/src/main/resources')
-rw-r--r--branches/sca-java-1.5/itest/policy/src/main/resources/Calculator.composite66
-rw-r--r--branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor19
-rw-r--r--branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler28
-rw-r--r--branches/sca-java-1.5/itest/policy/src/main/resources/definitions.xml147
4 files changed, 260 insertions, 0 deletions
diff --git a/branches/sca-java-1.5/itest/policy/src/main/resources/Calculator.composite b/branches/sca-java-1.5/itest/policy/src/main/resources/Calculator.composite
new file mode 100644
index 0000000000..aed7684099
--- /dev/null
+++ b/branches/sca-java-1.5/itest/policy/src/main/resources/Calculator.composite
@@ -0,0 +1,66 @@
+<?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://www.osoa.org/xmlns/sca/1.0" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://itest/policy" xmlns:sample="http://itest/policy" name="Calculator"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ xmlns:ip="http://itest/policy">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"></implementation.java>
+ <!-- reference name="addService" target="AddServiceComponent" /-->
+ <reference name="addService">
+ <interface.java interface="calculator.AddService" />
+ <binding.ws uri="http://localhost:8085/AddServiceComponentWS" />
+ </reference>
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl" requires="ip:TestIntent_3" />
+ <service name="AddService">
+ <interface.java interface="calculator.AddService" />
+ <binding.ws uri="http://localhost:8085/AddServiceComponentWS" />
+ <binding.sca/>
+ </service>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl" />
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl" />
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl" />
+ </component>
+
+ <component name="AnotherCalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl" />
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+</composite>
diff --git a/branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
new file mode 100644
index 0000000000..a20489035b
--- /dev/null
+++ b/branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -0,0 +1,19 @@
+# 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.
+
+# Implementation class for the artifact processor extension
+org.apache.tuscany.sca.itest.TestPolicyProcessor;qname=http://schemas.xmlsoap.org/ws/2004/09/policy#Policy,model=org.apache.tuscany.sca.itest.Policy
diff --git a/branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler
new file mode 100644
index 0000000000..d9f144b3ff
--- /dev/null
+++ b/branches/sca-java-1.5/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler
@@ -0,0 +1,28 @@
+# 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.
+#
+# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures
+# handler classname;qname=<policy intent addressed>;model=<policy model class>
+calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_1,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
+calculator.policy.TestRefPolicyHandler;intent=http://itest/policy#TestIntent_1,model=org.apache.neethi.Policy,appliesTo=sca:reference
+calculator.policy.TestSvcPolicyHandler;intent=http://itest/policy#TestIntent_1,model=org.apache.neethi.Policy,appliesTo=sca:service
+calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_1.Qualifier_1,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
+calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_2,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
+calculator.policy.TestRefPolicyHandler;intent=http://itest/policy#TestIntent_2,model=org.apache.neethi.Policy,appliesTo=sca:reference
+calculator.policy.TestSvcPolicyHandler;intent=http://itest/policy#TestIntent_2,model=org.apache.neethi.Policy,appliesTo=sca:service
+calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_3,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
+calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_5,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java \ No newline at end of file
diff --git a/branches/sca-java-1.5/itest/policy/src/main/resources/definitions.xml b/branches/sca-java-1.5/itest/policy/src/main/resources/definitions.xml
new file mode 100644
index 0000000000..0009d712f3
--- /dev/null
+++ b/branches/sca-java-1.5/itest/policy/src/main/resources/definitions.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://itest/policy"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ xmlns:calc="http://calculator"
+ xmlns:ip="http://itest/policy" >
+
+ <!-- Policy Intents -->
+ <sca:intent name="TestIntent_1" constrains="sca:implementation.java sca:binding.ws">
+ <description>Test Intent One</description>
+ </sca:intent>
+
+ <sca:intent name="TestIntent_2" constrains="sca:implementation.java sca:binding.ws">
+ <description>Test Intent Two</description>
+ </sca:intent>
+
+ <sca:intent name="TestIntent_3" constrains="sca:implementation.java sca:binding.ws">
+ <description>Test Intent Three</description>
+ </sca:intent>
+
+ <sca:intent name="TestIntent_4" constrains="sca:implementation.java sca:binding.ws">
+ <description>Test Intent Four</description>
+ </sca:intent>
+
+ <sca:intent name="TestIntent_5" constrains="sca:implementation.java sca:binding.ws">
+ <description>Test Intent Five</description>
+ </sca:intent>
+
+ <sca:intent name="TestIntent_1.Qualifier_1" />
+ <sca:intent name="TestIntent_4.Qualifier_1" />
+
+ <!-- PolicySets -->
+ <sca:policySet name="TestPolicySet_1_implementation" provides="ip:TestIntent_1"
+ appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <intentMap provides="ip:TestIntent_1" default="Qualifier_1">
+ <qualifier name="Qualifier_1">
+ <wsp:Policy />
+ </qualifier>
+ </intentMap>
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_1_Qualified_implementation" provides="ip:TestIntent_1.Qualifier_1"
+ appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_1_reference" provides="ip:TestIntent_1" appliesTo="sca:reference"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_1_service" provides="ip:TestIntent_1" appliesTo="sca:service"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:intent name="TestIntent_4.Qualifier_1" />
+
+ <sca:policySet name="TestPolicySet_2_implementation" provides="ip:TestIntent_2"
+ appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_2_reference" provides="ip:TestIntent_2" appliesTo="sca:reference"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_2_service" provides="ip:TestIntent_2" appliesTo="sca:service"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+
+ <sca:policySet name="TestPolicySet_3_implementation" provides="ip:TestIntent_3"
+ appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_3_reference" provides="ip:TestIntent_3" appliesTo="sca:reference"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_3_service" provides="ip:TestIntent_3" appliesTo="sca:service"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_4_implementation" provides="ip:TestIntent_4"
+ appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_4_service" provides="ip:TestIntent_4" appliesTo="sca:service"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_4_reference" provides="ip:TestIntent_4" appliesTo="sca:reference"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_5_implementation" provides="" appliesTo="sca:implementation.java"
+ tuscany:alwaysAppliesTo="sca:component[@name='MultiplyServiceComponent']"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_5_service" provides="ip:TestIntent_5" appliesTo="sca:service"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_5_reference" provides="ip:TestIntent_5" appliesTo="sca:reference"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy />
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet_4_qualified_1_implementation" provides="ip:TestIntent_4"
+ appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <intentMap provides="ip:TestIntent_4" default="Qualifier_1">
+ <qualifier name="Qualifier_1">
+ <wsp:Policy />
+ </qualifier>
+ </intentMap>
+ </sca:policySet>
+</definitions> \ No newline at end of file