diff options
Diffstat (limited to 'java/sca/itest/definitions-multiple/src')
22 files changed, 0 insertions, 879 deletions
diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/AddService.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/AddService.java deleted file mode 100644 index 198a38b657..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 calculator; - -import org.oasisopen.sca.annotation.Remotable; -import org.oasisopen.sca.annotation.Service; - -/** - * The Add service interface - */ -@Remotable -@Service -//@Requires(PolicyQNames.TEST_INTENT_FIVE) -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/AddServiceImpl.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/CalculatorService.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index a1880698ea..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 calculator; - -/** - * The Calculator service interface. - */ - -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/CalculatorServiceImpl.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index b4a797e597..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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 calculator; - -import org.oasisopen.sca.annotation.Reference; - - -/** - * An implementation of the Calculator service. - */ -//@Requires(PolicyQNames.TEST_INTENT_ONE) -public class CalculatorServiceImpl implements CalculatorService, PolicyQNames { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - //@Requires({TEST_INTENT_TWO, TEST_INTENT_THREE}) - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - //@Requires(TEST_INTENT_TWO) - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - //@Requires(PolicyQNames.QUALIFIED_TEST_INTENT_ONE) - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - //@Requires(QUALIFIED_TEST_INTENT_FOUR) - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/DivideService.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/DivideService.java deleted file mode 100644 index 8f4c675370..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 calculator; - -import org.oasisopen.sca.annotation.Remotable; -import org.oasisopen.sca.annotation.Service; - -/** - * The divide service interface - */ -@Remotable -@Service -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/DivideServiceImpl.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/MultiplyService.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/MultiplyServiceImpl.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/PolicyQNames.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/PolicyQNames.java deleted file mode 100644 index 3e1bc45842..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/PolicyQNames.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 calculator; - -/** - * @version $Rev$ $Date$ - */ -public interface PolicyQNames { - public static final String QUALIFIER = "."; - - public static final String POLICY_ITEST_PREFIX="{http://itest/policy}"; - public static final String TEST_INTENT_ONE = POLICY_ITEST_PREFIX + "TestIntent_1"; - public static final String TEST_INTENT_TWO = POLICY_ITEST_PREFIX + "TestIntent_2"; - public static final String TEST_INTENT_THREE = POLICY_ITEST_PREFIX + "TestIntent_3"; - public static final String TEST_INTENT_FOUR = POLICY_ITEST_PREFIX + "TestIntent_4"; - public static final String TEST_INTENT_FIVE = POLICY_ITEST_PREFIX + "TestIntent_5"; - - public static final String QUALIFIER_ONE = "Qualifier_1"; - - public static final String QUALIFIED_TEST_INTENT_FOUR = - TEST_INTENT_FOUR + QUALIFIER + QUALIFIER_ONE; - - public static final String QUALIFIED_TEST_INTENT_ONE = - TEST_INTENT_ONE + QUALIFIER + QUALIFIER_ONE; - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/SubtractService.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/java/sca/itest/definitions-multiple/src/main/java/calculator/SubtractServiceImpl.java b/java/sca/itest/definitions-multiple/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/java/sca/itest/definitions-multiple/src/main/resources/contrib3/META-INF/sca-contribution.xml b/java/sca/itest/definitions-multiple/src/main/resources/contrib3/META-INF/sca-contribution.xml deleted file mode 100644 index 6371eaebd9..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/resources/contrib3/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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://www.osoa.org/xmlns/sca/1.0"> - <export.java package="calculator"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/definitions-multiple/src/main/resources/contrib3/definitions.xml b/java/sca/itest/definitions-multiple/src/main/resources/contrib3/definitions.xml deleted file mode 100644 index 7d9e029f57..0000000000 --- a/java/sca/itest/definitions-multiple/src/main/resources/contrib3/definitions.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?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" > - - <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> - -</definitions>
\ No newline at end of file diff --git a/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/MultipleDefinitionsTestCase.java b/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/MultipleDefinitionsTestCase.java deleted file mode 100644 index 31c616e988..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/MultipleDefinitionsTestCase.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.tuscany.sca.itest; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.equinox.launcher.Contribution; -import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import calculator.CalculatorService; - -public class MultipleDefinitionsTestCase { - - private static NodeLauncher launcher; - private static Node node; - private static CalculatorService calculatorService; - - public static void main(String[] args) throws Exception { - setUpBeforeClass(); - tearDownAfterClass(); - } - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - launcher = NodeLauncher.newInstance(); - node = launcher.createNode("Calculator.composite", - new Contribution("contrib2", "./src/test/resources/contrib2"), - new Contribution("contrib1", "./src/test/resources/contrib1"), - new Contribution("contrib3", "./target/classes")); - node.start(); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node.destroy(); - } - if (launcher != null) { - launcher.destroy(); - } - } - - @Test - public void testPolicies() { - Assert.assertEquals(20.0, calculatorService.add(10, 10)); - Assert.assertEquals(100.0, calculatorService.multiply(10, 10)); - Assert.assertEquals(1.0, calculatorService.divide(10, 10)); - Assert.assertEquals(0.0, calculatorService.subtract(10, 10)); - } -} diff --git a/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/Policy.java b/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/Policy.java deleted file mode 100644 index ba17755b88..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/Policy.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.tuscany.sca.itest; - -import javax.xml.namespace.QName; - -/** - * Interface that will abstract various types of policy specifications - * and attachments for example WS-Policy - * - * @version $Rev$ $Date$ - */ -public interface Policy { - QName getSchemaName(); - void setUnresolved(boolean unresolved); - boolean isUnresolved(); -} diff --git a/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java b/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java deleted file mode 100644 index 5196e2f215..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.tuscany.sca.itest; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; -import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; - - -/** - * A PolicyProcessor used for testing. - * - * @version $Rev$ $Date$ - */ -public class TestPolicyProcessor implements StAXArtifactProcessor<Policy> { - - public TestPolicyProcessor(FactoryExtensionPoint factoryExtensionPoint, - StAXArtifactProcessor<Object> extensionProcessor, - Monitor monitor) { - - } - - public QName getArtifactType() { - return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "Policy"); - } - - public Policy read(XMLStreamReader arg0) throws ContributionReadException, XMLStreamException { - return new MockPolicyImplOne(); - } - - public void write(Policy arg0, XMLStreamWriter arg1) throws ContributionWriteException, - XMLStreamException { - } - - public Class<Policy> getModelType() { - // TODO Auto-generated method stub - return Policy.class; - } - - public void resolve(Policy arg0, ModelResolver arg1) throws ContributionResolveException { - - } - - - public class MockPolicyImplOne implements Policy { - public QName getSchemaName() { - return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "Policy"); - } - - public boolean isUnresolved() { - return false; - } - - public void setUnresolved(boolean unresolved) { - } - - } -} diff --git a/java/sca/itest/definitions-multiple/src/test/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/java/sca/itest/definitions-multiple/src/test/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index a20489035b..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# 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/java/sca/itest/definitions-multiple/src/test/resources/contrib1/Calculator.composite b/java/sca/itest/definitions-multiple/src/test/resources/contrib1/Calculator.composite deleted file mode 100644 index e49717dbe8..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/resources/contrib1/Calculator.composite +++ /dev/null @@ -1,61 +0,0 @@ -<?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"/> - <!-- reference name="addService" target="AddServiceComponent" /--> - <reference name="addService" requires="ip:TestIntent_1" > - <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"/> - <service name="AddService" requires="ip:TestIntent_1" > - <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> - -</composite> diff --git a/java/sca/itest/definitions-multiple/src/test/resources/contrib1/META-INF/sca-contribution.xml b/java/sca/itest/definitions-multiple/src/test/resources/contrib1/META-INF/sca-contribution.xml deleted file mode 100644 index 00d7793198..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/resources/contrib1/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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://www.osoa.org/xmlns/sca/1.0"> - <import.java package="calculator"/> -</contribution>
\ No newline at end of file diff --git a/java/sca/itest/definitions-multiple/src/test/resources/contrib1/definitions.xml b/java/sca/itest/definitions-multiple/src/test/resources/contrib1/definitions.xml deleted file mode 100644 index 07756b50b4..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/resources/contrib1/definitions.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?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" > - - <!-- PolicySets --> - <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> - -</definitions>
\ No newline at end of file diff --git a/java/sca/itest/definitions-multiple/src/test/resources/contrib1/definitions/definitions.xml b/java/sca/itest/definitions-multiple/src/test/resources/contrib1/definitions/definitions.xml deleted file mode 100644 index 84f8e8a3c9..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/resources/contrib1/definitions/definitions.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?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> - - -</definitions>
\ No newline at end of file diff --git a/java/sca/itest/definitions-multiple/src/test/resources/contrib2/definitions.xml b/java/sca/itest/definitions-multiple/src/test/resources/contrib2/definitions.xml deleted file mode 100644 index 439b7bbbe8..0000000000 --- a/java/sca/itest/definitions-multiple/src/test/resources/contrib2/definitions.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?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" > - - <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> - -</definitions>
\ No newline at end of file |