From 35f81a620ea2d8423a49d8630bcef1d69027f444 Mon Sep 17 00:00:00 2001 From: antelder Date: Sat, 28 Mar 2009 09:44:15 +0000 Subject: Remove old m2 branch git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@759447 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/test/ASM_0001_Client.java | 67 ----------------- .../src/main/java/test/ASM_0002_Client.java | 80 --------------------- .../src/main/java/test/ASM_0003_Client.java | 79 -------------------- .../sampleTest/src/main/java/test/Service1.java | 39 ---------- .../src/main/java/test/Service1Superset.java | 45 ------------ .../sampleTest/src/main/java/test/Service2.java | 35 --------- .../src/main/java/test/TestException.java | 47 ------------ .../src/main/java/test/TestInvocation.class | Bin 395 -> 0 bytes .../src/main/java/test/TestInvocation.java | 42 ----------- .../src/main/java/test/service1Impl.java | 39 ---------- .../src/main/java/test/service1Impl2.java | 46 ------------ .../src/main/java/test/service1Impl3.java | 51 ------------- .../src/main/java/test/service1Impl4.java | 52 -------------- .../src/main/java/test/service1Impl5.java | 45 ------------ .../src/main/java/test/service1Impl6.java | 50 ------------- .../src/main/java/test/service1SupersetImpl.java | 43 ----------- .../src/main/java/test/service2Impl.java | 39 ---------- 17 files changed, 799 deletions(-) delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0001_Client.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0002_Client.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0003_Client.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1Superset.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service2.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestException.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.class delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl2.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl3.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl4.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl5.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl6.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1SupersetImpl.java delete mode 100644 branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service2Impl.java (limited to 'branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test') diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0001_Client.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0001_Client.java deleted file mode 100644 index dff88ce8ca..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0001_Client.java +++ /dev/null @@ -1,67 +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 test; - -import org.oasisopen.sca.annotation.Service; - -/** - * Basic test initiation class - * @author MikeEdwards - * - */ -@Service(TestInvocation.class) -public class ASM_0001_Client implements TestInvocation { - - private String testName = "ASM_0001"; - - /** - * This method is offered as a service and is - * invoked by the test client to run the test - */ - public String invokeTest(String input) throws TestException { - String response = null; - - response = runTest(input); - - return response; - } // end method invokeTest - - /** - * This method actually runs the test - and is subclassed by classes that run other tests. - * @param input - an input string - * @return - a response string = "ASM_0001 inputString invoked ok"; - * - */ - public String runTest(String input) { - String response = null; - - response = testName + " " + input + " invoked ok"; - - return response; - } // end method runTest - - /** - * Sets the name of the test - * @param name - the test name - */ - protected void setTestName(String name) { - testName = name; - } - -} // diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0002_Client.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0002_Client.java deleted file mode 100644 index 673dde9590..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0002_Client.java +++ /dev/null @@ -1,80 +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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Test initiation class with a single reference of multiplicity 1..1 - * @author MikeEdwards - * - */ -@Service(TestInvocation.class) -public class ASM_0002_Client implements TestInvocation { - - @Property - public String testName = "ASM_xxxx"; - - @Reference - public Service1 reference1; - - /** - * This method is offered as a service and is - * invoked by the test client to run the test - */ - public String invokeTest(String input) throws TestException { - String response = null; - - try { - response = runTest(input); - } catch (Exception e) { - throw new TestException("Test service got an exception during execution: " + e.getClass().getName() - + " " - + e.getMessage()); - } // end try - return response; - } // end method invokeTest - - /** - * This method actually runs the test - and is subclassed by classes that run other tests. - * @param input - an input string - * @return - a response string = "ASM_0001 inputString invoked ok"; - * - */ - public String runTest(String input) { - String response = null; - - String response1 = reference1.operation1(input); - - response = testName + " " + input + " " + response1; - - return response; - } // end method runTest - - /** - * Sets the name of the test - * @param name - the test name - */ - protected void setTestName(String name) { - testName = name; - } - -} // diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0003_Client.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0003_Client.java deleted file mode 100644 index f6f4f1ccb8..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/ASM_0003_Client.java +++ /dev/null @@ -1,79 +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 test; - -import java.util.List; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Basic test initiation class - * @author MikeEdwards - * - */ -@Service(TestInvocation.class) -public class ASM_0003_Client implements TestInvocation { - - @Property - public String testName = "ASM_xxxx"; - - @Reference - public List reference1; - - /** - * This method is offered as a service and is - * invoked by the test client to run the test - */ - public String invokeTest(String input) throws TestException { - String response = null; - - response = runTest(input); - - return response; - } // end method invokeTest - - /** - * This method actually runs the test - and is subclassed by classes that run other tests. - * @param input - an input string - * @return - a response string = "ASM_0001 inputString invoked ok"; - * - */ - public String runTest(String input) { - String response = ""; - - for (Service1 reference : reference1) { - response += reference.operation1(input); - } // end for - - response = testName + " " + input + " " + response; - - return response; - } // end method runTest - - /** - * Sets the name of the test - * @param name - the test name - */ - protected void setTestName(String name) { - testName = name; - } - -} // diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1.java deleted file mode 100644 index 713fa40563..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1.java +++ /dev/null @@ -1,39 +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 test; - -// TODO: Need to change *ALL* annotations to org.oasisopen.xxxx -import org.oasisopen.sca.annotation.Remotable; - -/** - * A test service interface - * @author MikeEdwards - * - */ -@Remotable -public interface Service1 { - - /** - * Method for invoking testcase service - * @param input - input parameter(s) as a String - * @return - output data as a String - */ - public String operation1(String input); - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1Superset.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1Superset.java deleted file mode 100644 index 7d3a2f2e9f..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service1Superset.java +++ /dev/null @@ -1,45 +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 test; - -/** - * A superset of the basic test service interface - * @author MikeEdwards - * - */ -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Service1Superset { - - /** - * Method for invoking testcase service - * @param input - input parameter(s) as a String - * @return - output data as a String - */ - public String operation1(String input); - - /** - * A second method for invoking a testcase service - * @param input - input parameter(s) as a String - * @return - output data as a String - */ - public String operation2(String input); - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service2.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service2.java deleted file mode 100644 index f834a4fbf1..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/Service2.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 test; - -/** - * A test service interface, designed to be incompatible with the Service1 interface - * @author MikeEdwards - * - */ -public interface Service2 { - - /** - * Method for invoking testcase service - * @param input - input parameter(s) as a String - * @return - output data as a String - */ - public int operation2(int input); - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestException.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestException.java deleted file mode 100644 index 158c5f4522..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestException.java +++ /dev/null @@ -1,47 +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 test; - -/* - * Exception thrown by SCA Test services - */ -public class TestException extends Exception { - - /** - * Required serialVersionUID field - */ - private static final long serialVersionUID = -6978058912756564824L; - - public TestException() { - super(); - }; - - public TestException(String msg) { - super(msg); - }; - - public TestException(String msg, Throwable cause) { - super(msg, cause); - }; - - public TestException(Throwable cause) { - super(cause); - }; - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.class b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.class deleted file mode 100644 index 64e43c20c9..0000000000 Binary files a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.class and /dev/null differ diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.java deleted file mode 100644 index e5d781095f..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/TestInvocation.java +++ /dev/null @@ -1,42 +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 test; - -import javax.jws.WebMethod; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Basic interface to invoke testcases - * @author MikeEdwards - * - */ -@Remotable -public interface TestInvocation { - - /** - * Method for invoking testcase - * @param input - input parameter(s) as a String - * @return - output data as a String - * @throws - a TestException is thrown in cases where the test service fails internally - */ - @WebMethod - public String invokeTest(String input) throws TestException; - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl.java deleted file mode 100644 index a505f895a2..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl.java +++ /dev/null @@ -1,39 +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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -/** - * Simple Java component implementation for business interface Service1 - * @author MikeEdwards - * - */ -@Service(Service1.class) -public class service1Impl implements Service1 { - - @Property - public String serviceName = "service1"; - - public String operation1(String input) { - return serviceName + " operation1 invoked"; - } - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl2.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl2.java deleted file mode 100644 index 0f639fbbf3..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl2.java +++ /dev/null @@ -1,46 +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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Enhanced Java component implementation for business interface Service1, - * where the implementation also has a single reference using the Service1 - * interface and which gets called when operation1 is invoked - * @author MikeEdwards - * - */ -@Service(Service1.class) -public class service1Impl2 implements Service1 { - - @Property - public String serviceName = "service1"; - // Reference with an implied multiplicity of (1..1) since required=true is the default - @Reference - public Service1 reference1 = null; - - public String operation1(String input) { - String result = reference1.operation1(input); - return serviceName + " operation1 invoked" + " " + result; - } - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl3.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl3.java deleted file mode 100644 index 834dc3ddf7..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl3.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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Enhanced Java component implementation for business interface Service1, - * where the implementation also has a single reference using the Service1 - * interface with mutiplicity 1..n all of which and which get called when - * operation1 is invoked - * @author MikeEdwards - * - */ -@Service(Service1.class) -public class service1Impl3 implements Service1 { - - @Property - public String serviceName = "service1"; - // Required = true + an array -> multiplicity 1..n - @Reference(required = true) - public Service1[] reference1 = null; - - public String operation1(String input) { - String result = ""; - // Call each of the references in the array, concatenating the results - for (int i = 0; i < reference1.length; i++) { - result = result.concat(reference1[i].operation1(input)); - } // end for - return serviceName + " operation1 invoked" + " " + result; - } - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl4.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl4.java deleted file mode 100644 index 4799d777c7..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl4.java +++ /dev/null @@ -1,52 +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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Enhanced Java component implementation for business interface Service1, - * where the implementation also has a single reference using the Service1 - * interface with multiplicity 0..n all of which and which get called when - * operation1 is invoked - * @author MikeEdwards - * - */ -@Service(Service1.class) -public class service1Impl4 implements Service1 { - - @Property - public String serviceName = "service1"; - // Required = false + an array -> multiplicity 0..n - @Reference(required = false) - public Service1[] reference1 = null; - - public String operation1(String input) { - String result = serviceName + " operation1 invoked"; - // Call each of the references in the array, concatenating the results - for (int i = 0; i < reference1.length; i++) { - result = result.concat(" "); - result = result.concat(reference1[i].operation1(input)); - } // end for - return result; - } - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl5.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl5.java deleted file mode 100644 index dd69308c95..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl5.java +++ /dev/null @@ -1,45 +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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -/** - * Java component implementation for business interface Service1 - * - no references - * - 3 properties - * @author MikeEdwards - * - */ -@Service(Service1.class) -public class service1Impl5 implements Service1 { - - @Property - public String serviceName = "service1"; - @Property - public String serviceData1; - @Property - public String serviceData2; - - public String operation1(String input) { - return serviceName + " operation1 invoked" + serviceData1 + serviceData2; - } - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl6.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl6.java deleted file mode 100644 index 1810686194..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1Impl6.java +++ /dev/null @@ -1,50 +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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Enhanced Java component implementation for business interface Service1, - * where the implementation also has a single reference using the Service1 - * interface with multiplicity 0..1 which gets called when - * operation1 is invoked, if present - * @author MikeEdwards - * - */ -@Service(Service1.class) -public class service1Impl6 implements Service1 { - - @Property - public String serviceName = "service1"; - // Required = false -> multiplicity 0..1 - @Reference(required = false) - public Service1 reference1 = null; - - public String operation1(String input) { - String result = serviceName + " operation1 invoked"; - // Call the reference if present - if (reference1 != null) - result = result.concat(reference1.operation1(input)); - return result; - } - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1SupersetImpl.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1SupersetImpl.java deleted file mode 100644 index f137b7f1b4..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service1SupersetImpl.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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -/** - * Simple Java component implementation for business interface Service1Superset - * @author MikeEdwards - * - */ -@Service(Service1Superset.class) -public class service1SupersetImpl implements Service1Superset { - - @Property - public String serviceName = "service1"; - - public String operation1(String input) { - return serviceName + " operation1 invoked"; - } - - public String operation2(String input) { - return serviceName + " operation2 invoked"; - } - -} diff --git a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service2Impl.java b/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service2Impl.java deleted file mode 100644 index 919b33014c..0000000000 --- a/branches/sca-java-2.0-M2/stest/sampleTest/src/main/java/test/service2Impl.java +++ /dev/null @@ -1,39 +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 test; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -/** - * Simple Java component implementation for business interface Service2 - * @author MikeEdwards - * - */ -@Service(Service2.class) -public class service2Impl implements Service2 { - - @Property - public String serviceName = "service1"; - - public int operation2(int input) { - return input + 1; - } - -} -- cgit v1.2.3