From e0ff67c0b32813ea48734c770a5ffc1952644e29 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:08:02 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835128 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/SpringDelegationHelloWorld-context.xml | 37 ---------------- .../META-INF/sca/SpringHelloWorld-context.xml | 31 ------------- .../spring/SpringDelegationHelloWorld.composite | 32 -------------- .../sca/itest/spring/SpringHelloWorld.composite | 32 -------------- .../itest/spring/AbstractHelloWorldTestCase.java | 40 ----------------- .../sca/itest/spring/AbstractSCATestCase.java | 51 ---------------------- .../tuscany/sca/itest/spring/HelloWorld.java | 34 --------------- .../tuscany/sca/itest/spring/HelloWorldProxy.java | 41 ----------------- .../spring/SpringDelegationHelloWorldTestCase.java | 31 ------------- .../sca/itest/spring/SpringHelloWorldTestCase.java | 32 -------------- .../sca/itest/spring/TestHelloWorldBean.java | 36 --------------- .../itest/spring/TestHelloWorldDelegatorBean.java | 40 ----------------- 12 files changed, 437 deletions(-) delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java delete mode 100644 branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java (limited to 'branches/sca-java-1.3.1/itest/spring/src') diff --git a/branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml b/branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml deleted file mode 100644 index 7068224183..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml b/branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml deleted file mode 100644 index 3b87979ab2..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite deleted file mode 100644 index 70b2d5fdab..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite deleted file mode 100644 index bab9ecb528..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java deleted file mode 100644 index 634e3d34af..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java +++ /dev/null @@ -1,40 +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.spring; - - -/** - * Basic "hello world" style test case for testing Spring component implementation - * - */ -public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase { - - /** - * Calls the hello world service and checks that it gives the right response... - */ - public void testHello() throws Exception { - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected Class getServiceClass() { - return HelloWorld.class; - } -} diff --git a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java deleted file mode 100644 index e0b1a79c95..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java +++ /dev/null @@ -1,51 +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.spring; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public abstract class AbstractSCATestCase extends TestCase { - - protected SCADomain domain; - protected T service; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance(getCompositeName()); - service = (T)domain.getService(getServiceClass(), "ClientComponent"); - } - - abstract protected Class getServiceClass(); - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - - protected String getCompositeName() { - String className = this.getClass().getName(); - String compositeName = className.substring(0, className.length() - 8).replace('.', '/') + ".composite"; - System.out.println("Using composite: " + compositeName); - return compositeName; - } - -} diff --git a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java deleted file mode 100644 index 3957e49bf3..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.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 org.apache.tuscany.sca.itest.spring; - -import org.osoa.sca.annotations.Remotable; - -/** - * Interface for the "hello world" service - predictably simple with a single operation - * "sayHello" - * - */ -@Remotable -public interface HelloWorld { - - public String sayHello(String s); - -} diff --git a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java deleted file mode 100644 index d75d19295d..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java +++ /dev/null @@ -1,41 +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.spring; - -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 - * - */ -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.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java deleted file mode 100644 index 4088691ccd..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java +++ /dev/null @@ -1,31 +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.spring; - -/** - * 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 - * - */ -public class SpringDelegationHelloWorldTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name -} diff --git a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java deleted file mode 100644 index 840bf59b73..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java +++ /dev/null @@ -1,32 +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.spring; - -/** - * 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 Spring component delegates function to a second spring bean - * - */ -public class SpringHelloWorldTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name -} diff --git a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java deleted file mode 100644 index fa7967c964..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java +++ /dev/null @@ -1,36 +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.spring; - -/** - * A simple test Spring bean which provides the HelloWorld service - * - */ - -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.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java b/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java deleted file mode 100644 index b57cc7f366..0000000000 --- a/branches/sca-java-1.3.1/itest/spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java +++ /dev/null @@ -1,40 +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.spring; - -/** - * A simple test Spring bean which delgates to another bean - * - */ - -public class TestHelloWorldDelegatorBean implements HelloWorld { - - HelloWorld delegate; - - public void setDelegate(HelloWorld delegate) { - this.delegate = delegate; - } - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestHelloWorldDelegatorBean - sayHello called"); - return delegate.sayHello(message); - } - -} -- cgit v1.2.3