From 3859835f4135cee628e18204acce06ea30a8dd19 Mon Sep 17 00:00:00 2001 From: ramkumar Date: Wed, 20 May 2009 12:30:58 +0000 Subject: Fixes for TUSCANY-3043 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776677 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/helloworld/HelloWorld.java | 35 +++++++++++++ .../src/main/java/helloworld/HelloWorldImpl.java | 38 ++++++++++++++ .../src/main/java/helloworld/HelloWorldProxy.java | 42 +++++++++++++++ .../itest/spring/src/main/java/mock/TestBean.java | 31 +++++++++++ .../spring/src/main/java/mock/TestBeanImpl.java | 42 +++++++++++++++ .../src/main/java/mock/TestHelloWorldBean.java | 39 ++++++++++++++ .../spring/src/main/java/mock/TestReference.java | 27 ++++++++++ .../src/main/java/mock/TestReferenceBean.java | 57 +++++++++++++++++++++ .../src/main/java/mock/TestSCAPropertyBean.java | 55 ++++++++++++++++++++ .../context-multiple/SpringHelloWorld-context.xml | 31 +++++++++++ .../sca/context-multiple/beanRefContext.xml | 1 + .../META-INF/sca/location-jar/spring-context.jar | Bin 0 -> 1471 bytes .../SpringExplicitReference-context.xml | 33 ++++++++++++ .../SpringImplicitReference-context.xml | 34 ++++++++++++ .../sca-services/SpringExplicitService-context.xml | 39 ++++++++++++++ .../sca-services/SpringImplicitService-context.xml | 31 +++++++++++ .../context/multiple/StockQuote.composite | 2 +- .../location/folder/SpringFolderLocation.composite | 39 ++++++++++++++ .../location/jar/SpringJarLocation.composite | 39 ++++++++++++++ .../references/SpringExplicitReference.composite | 32 ++++++++++++ .../references/SpringImplicitReference.composite | 39 ++++++++++++++ .../sca/services/SpringExplicitService.composite | 33 ++++++++++++ .../sca/services/SpringImplicitService.composite | 32 ++++++++++++ .../folder/SpringFolderLocationTestCase.java | 41 +++++++++++++++ .../location/jar/SpringJarLocationTestCase.java | 41 +++++++++++++++ .../SpringExplicitReferenceTestCase.java | 41 +++++++++++++++ .../SpringImplicitReferenceTestCase.java | 44 ++++++++++++++++ .../services/SpringExplicitServiceTestCase.java | 36 +++++++++++++ .../services/SpringImplicitServiceTestCase.java | 34 ++++++++++++ 29 files changed, 987 insertions(+), 1 deletion(-) create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorld.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldProxy.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBean.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBeanImpl.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/mock/TestHelloWorldBean.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReference.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReferenceBean.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/java/mock/TestSCAPropertyBean.java create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringExplicitReference.composite create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringImplicitReference.composite create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringExplicitService.composite create mode 100644 branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringImplicitService.composite create mode 100644 branches/sca-java-1.x/itest/spring/src/test/java/location/folder/SpringFolderLocationTestCase.java create mode 100644 branches/sca-java-1.x/itest/spring/src/test/java/location/jar/SpringJarLocationTestCase.java create mode 100644 branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java create mode 100644 branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java create mode 100644 branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java create mode 100644 branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java (limited to 'branches') diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorld.java b/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorld.java new file mode 100644 index 0000000000..e0987096f6 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorld.java @@ -0,0 +1,35 @@ +/* + * 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 helloworld; + +import org.osoa.sca.annotations.Remotable; + +/** + * Interface for the "hello world" service - predictably simple with a single operation + * "sayHello" + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface HelloWorld { + + String sayHello(String s); + +} diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..73939693a4 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldImpl.java @@ -0,0 +1,38 @@ +/* + * 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 helloworld; + +/** + * A simple proxy Java class which implements the HelloWorld interface but which uses + * a reference "delegate" to actually provide the HelloWorld service + * + * @version $Rev$ $Date$ + */ +public class HelloWorldImpl implements HelloWorld { + + static String hello = "Hello "; + + public String sayHello(String s) { + // Simply call the reference to satisfy the service request... + System.out.println("HelloWorldImpl - sayHello called"); + return (hello + s); + } + +} diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldProxy.java b/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldProxy.java new file mode 100644 index 0000000000..4d4b5a2931 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/helloworld/HelloWorldProxy.java @@ -0,0 +1,42 @@ +/* + * 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 helloworld; + +import org.osoa.sca.annotations.Reference; + +/** + * A simple proxy Java class which implements the HelloWorld interface but which uses + * a reference "delegate" to actually provide the HelloWorld service + * + * @version $Rev$ $Date$ + */ +public class HelloWorldProxy implements HelloWorld { + + // Here is the reference "delegate" - it implements the HelloWorld interface... + @Reference + public HelloWorld delegate; + + public String sayHello(String s) { + // Simply call the reference to satisfy the service request... + System.out.println("HelloWorldProxy - calling sayHello"); + return delegate.sayHello(s); + } + +} diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBean.java b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBean.java new file mode 100644 index 0000000000..96df81fc0c --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBean.java @@ -0,0 +1,31 @@ +/* + * 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 mock; + +/** + * @version $Rev: 430937 $ $Date: 2006-08-12 02:17:56 +0100 (Sat, 12 Aug 2006) $ + */ +public interface TestBean { + String echo(String msg); + + TestBean getBean(); + + void setBean(TestBean bean); + +} diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBeanImpl.java b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBeanImpl.java new file mode 100644 index 0000000000..538d3547f4 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestBeanImpl.java @@ -0,0 +1,42 @@ +/* + * 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 mock; + +/** + * @version $Rev: 441406 $ $Date: 2006-09-08 08:20:10 +0100 (Fri, 08 Sep 2006) $ + */ +public class TestBeanImpl implements TestBean { + + private TestBean bean; + + public TestBeanImpl() { + } + + public String echo(String msg) { + return msg; + } + + public TestBean getBean() { + return bean; + } + + public void setBean(TestBean bean) { + this.bean = bean; + } +} diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestHelloWorldBean.java b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestHelloWorldBean.java new file mode 100644 index 0000000000..5c9dede7ec --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestHelloWorldBean.java @@ -0,0 +1,39 @@ +/* + * 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 mock; + +/** + * A simple test Spring bean which provides the HelloWorld service + * + * @version $Rev$ $Date$ + */ + +import helloworld.HelloWorld; + +public class TestHelloWorldBean implements HelloWorld { + + static String hello = "Hello "; + + // Classic "Hello xxx" response to any input message + public String sayHello(String message) { + System.out.println("TestHelloWorldBean - sayHello called"); + return (hello + message); + } + +} // end class TestHelloWorldBean diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReference.java b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReference.java new file mode 100644 index 0000000000..0a8742d242 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReference.java @@ -0,0 +1,27 @@ +/* + * 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 mock; + +/** + * @version $Rev: 536115 $ $Date: 2007-05-08 09:04:20 +0100 (Tue, 08 May 2007) $ + */ +public interface TestReference { + String echo(String msg); +} diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReferenceBean.java b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReferenceBean.java new file mode 100644 index 0000000000..27ccdbdd77 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestReferenceBean.java @@ -0,0 +1,57 @@ +/* + * 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 mock; + +/** + * A test Spring bean which provides the HelloWorld service by calling a reference + * to provide the content of the response + * + * @version $Rev$ $Date$ + */ + +import helloworld.HelloWorld; + +public class TestReferenceBean implements HelloWorld { + + // The reference + private HelloWorld bean; + + // Classic "Hello xxx" response to any input message + public String sayHello(String message) { + System.out.println("TestReferenceBean - sayHello called"); + return (bean.sayHello(message)); + } + + /** + * Setter for the bean reference + * @param theBean + */ + public void setBean(HelloWorld theBean) { + this.bean = theBean; + } + + /** + * Getter for the reference + * @return + */ + public HelloWorld getBean() { + return this.bean; + } + +} // end class TestReferenceBean diff --git a/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestSCAPropertyBean.java b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestSCAPropertyBean.java new file mode 100644 index 0000000000..881ca8bb7d --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/java/mock/TestSCAPropertyBean.java @@ -0,0 +1,55 @@ +/* + * 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 mock; + +/** + * A test Spring bean which provides the HelloWorld service. + * This bean has a single String property called "hello" which must be set through + * external configuration to give the correct response message, otherwise an (incorrect) + * default message is generated + * + * @version $Rev$ $Date$ + */ + +import helloworld.HelloWorld; + +public class TestSCAPropertyBean implements HelloWorld { + + private String hello = "Go away"; + + /** + * Provides the operation of the "HelloWorld" interface - a simple string response + * to a string input message, where the response is a greeting followed by the original + * input message. + */ + public String sayHello(String message) { + System.out.println("TestHelloWorldBean - sayHello called"); + return (hello + " " + message); + } + + /** + * Public setter for the (unannotated) field "hello" which constitutes an SCA + * property + * @param message - the message to use for the response to "sayHello" + */ + public void setHello(String message) { + hello = message; + } + +} // end class TestSCAPropertyBean diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml new file mode 100644 index 0000000000..c20679241f --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml @@ -0,0 +1,31 @@ + + + + + + + + + \ No newline at end of file diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml index fb4be314b6..930b92f4be 100644 --- a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml @@ -28,6 +28,7 @@ META-INF/sca/context-multiple/StockQuoteService-context.xml + META-INF/sca/context-multiple/SpringHelloWorld-context.xml diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar new file mode 100644 index 0000000000..d8ee59a610 Binary files /dev/null and b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar differ diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml new file mode 100644 index 0000000000..d18d8312e3 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml new file mode 100644 index 0000000000..df4b9b28cf --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml @@ -0,0 +1,34 @@ + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml new file mode 100644 index 0000000000..194bc4bcc9 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml new file mode 100644 index 0000000000..1c63311367 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml @@ -0,0 +1,31 @@ + + + + + + + + + \ No newline at end of file diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/context/multiple/StockQuote.composite b/branches/sca-java-1.x/itest/spring/src/main/resources/context/multiple/StockQuote.composite index 0c6d6f95e2..780795a7a0 100644 --- a/branches/sca-java-1.x/itest/spring/src/main/resources/context/multiple/StockQuote.composite +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/context/multiple/StockQuote.composite @@ -29,7 +29,7 @@ - + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite b/branches/sca-java-1.x/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite new file mode 100644 index 0000000000..7f6268f6b5 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/location/folder/SpringFolderLocation.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + Hello + + + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite b/branches/sca-java-1.x/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite new file mode 100644 index 0000000000..1f8792e4d8 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/location/jar/SpringJarLocation.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + Hello + + + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringExplicitReference.composite b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringExplicitReference.composite new file mode 100644 index 0000000000..ea0d002414 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringExplicitReference.composite @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringImplicitReference.composite b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringImplicitReference.composite new file mode 100644 index 0000000000..256eeb2dcc --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/references/SpringImplicitReference.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringExplicitService.composite b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringExplicitService.composite new file mode 100644 index 0000000000..5f851517e8 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringExplicitService.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringImplicitService.composite b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringImplicitService.composite new file mode 100644 index 0000000000..482c81df23 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/main/resources/sca/services/SpringImplicitService.composite @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/spring/src/test/java/location/folder/SpringFolderLocationTestCase.java b/branches/sca-java-1.x/itest/spring/src/test/java/location/folder/SpringFolderLocationTestCase.java new file mode 100644 index 0000000000..88ac2e8cb5 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/test/java/location/folder/SpringFolderLocationTestCase.java @@ -0,0 +1,41 @@ +/* + * 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 location.folder; + +import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; + +/** + * A test case designed to test the implementation of Properties from a Spring application + * context, where the properties are explicit, through the presence of an sca:property + * element within the Spring application context + * + * The artifacts involved in this test are: + * + * 1) A composite containing a component with a Spring implementation + * 2) The element references an application context that + * uses an explicit sca:property element which is used to compute the response to an invocation + * of the service of the implementation + * + * @version $Rev$ $Date$ + */ +public class SpringFolderLocationTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} + diff --git a/branches/sca-java-1.x/itest/spring/src/test/java/location/jar/SpringJarLocationTestCase.java b/branches/sca-java-1.x/itest/spring/src/test/java/location/jar/SpringJarLocationTestCase.java new file mode 100644 index 0000000000..e3600a355c --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/test/java/location/jar/SpringJarLocationTestCase.java @@ -0,0 +1,41 @@ +/* + * 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 location.jar; + +import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; + +/** + * A test case designed to test the implementation of Properties from a Spring application + * context, where the properties are explicit, through the presence of an sca:property + * element within the Spring application context + * + * The artifacts involved in this test are: + * + * 1) A composite containing a component with a Spring implementation + * 2) The element references an application context that + * uses an explicit sca:property element which is used to compute the response to an invocation + * of the service of the implementation + * + * @version $Rev$ $Date$ + */ +public class SpringJarLocationTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} + diff --git a/branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java b/branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java new file mode 100644 index 0000000000..9bc12c3e7b --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java @@ -0,0 +1,41 @@ +/* + * 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 sca.references; + +import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; + +/** + * A test case designed to test the implementation of References from a Spring application + * context, where the references are explicit, through the presence of an sca:reference + * element within the Spring application context + * + * The artifacts involved in this test are: + * + * 1) A composite containing a component with a Spring implementation which makes + * a reference to a second component + * 2) The composite has a component with a Java POJO implementation which satisfies the reference + * 3) The element references an application context that + * uses an explicit sca:reference element to identify the reference made by the Spring application + * + * @version $Rev$ $Date$ + */ +public class SpringExplicitReferenceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java b/branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java new file mode 100644 index 0000000000..52ea64a3ed --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java @@ -0,0 +1,44 @@ +/* + * 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 sca.references; + +import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; + +/** + * A test case designed to test the implementation of References from a Spring application + * context, where the references are implicit, through the presence of Bean properties with a + * ref attribute which is not satisfied by a Bean within the application context. + * + * The artifacts involved in this test are: + * + * 1) A composite containing a component with a Spring implementation which makes + * a reference to a second component + * 2) The composite has a component with a Java POJO implementation which satisfies the reference + * 3) The element references an application context that + * does not use an explicit sca:reference element to identify the reference made by the + * Spring application, but relies on an unsatisfied Bean property with a ref attribute. + * + * @version $Rev$ $Date$ + */ +public class SpringImplicitReferenceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} + + diff --git a/branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java b/branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java new file mode 100644 index 0000000000..35f44b2af7 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringExplicitServiceTestCase.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 sca.services; + +import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; + +/** + * A basic test case of: + * 1) A composite containing a component with a Spring implementation + * 2) The composite has a component with a Java POJO implementation which uses the + * Spring implementation to satisfy a reference + * 3) The element references an application context that + * uses an explicit sca: element to identify the service offered by the Spring application + * + * @version $Rev$ $Date$ + */ +public class SpringExplicitServiceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} diff --git a/branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java b/branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java new file mode 100644 index 0000000000..488bdcb202 --- /dev/null +++ b/branches/sca-java-1.x/itest/spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java @@ -0,0 +1,34 @@ +/* + * 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 sca.services; + +import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; + +/** + * A basic test case of: + * 1) A composite containing a component with a Spring implementation + * 2) The composite has a component with a Java POJO implementation which uses the + * Spring implementation to satisfy a reference + * + * @version $Rev$ $Date$ + */ +public class SpringImplicitServiceTestCase extends AbstractHelloWorldTestCase { + // super class does it all getting composite based on this class name +} -- cgit v1.2.3