From 1f81a54d49573dc5d1470af8c6385af42ae8f56b Mon Sep 17 00:00:00 2001 From: slaws Date: Wed, 19 Nov 2008 13:06:58 +0000 Subject: TUSCANY-2675 Patch from Jun Guo to start adding assembly spec vtests. Thanks Jun Guo git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@718951 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/vtest/assembly/component/DService.java | 29 ++++++++++++ .../sca/vtest/assembly/component/EEService.java | 31 +++++++++++++ .../sca/vtest/assembly/component/EService.java | 31 +++++++++++++ .../component/impl/ABServiceImpl.componentType | 32 ++++++++++++++ .../assembly/component/impl/ABServiceImpl.java | 51 ++++++++++++++++++++++ .../component/impl/DServiceImpl.componentType | 31 +++++++++++++ .../assembly/component/impl/DServiceImpl.java | 29 ++++++++++++ .../component/impl/EServiceImpl.componentType | 31 +++++++++++++ .../assembly/component/impl/EServiceImpl.java | 38 ++++++++++++++++ 9 files changed, 303 insertions(+) create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType create mode 100644 branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java (limited to 'branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca') diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java new file mode 100644 index 0000000000..f5832aa7ce --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java @@ -0,0 +1,29 @@ +/* + * 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.vtest.assembly.component; + +/** + * simple service + */ +public interface DService { + + public String sayHello(); + + +} diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java new file mode 100644 index 0000000000..87de618ad3 --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.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 org.apache.tuscany.sca.vtest.assembly.component; + +/** + * simple service + * + */ +public interface EEService { + + public String method1() ; + + public String method3() ; + +} diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java new file mode 100644 index 0000000000..5d3bbb26c3 --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.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 org.apache.tuscany.sca.vtest.assembly.component; + +/** + * simple service + * + */ +public interface EService { + + public String method1() ; + + public String method2() ; + +} diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType new file mode 100644 index 0000000000..7cc63afee1 --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java new file mode 100644 index 0000000000..98f0291be3 --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java @@ -0,0 +1,51 @@ +/* + * 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.vtest.assembly.component.impl; + +import org.apache.tuscany.sca.vtest.assembly.component.AService; +import org.apache.tuscany.sca.vtest.assembly.component.BService; +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * service implementation of AService and BService + * + */ +@Service(interfaces={AService.class, BService.class}) +public class ABServiceImpl implements AService, BService{ + + public String getState() { + return "OK"; + } + + public String getBProperty() { + return ""; + } + + public String getB2Property() { + return ""; + } + + + public String getSomeProperty() { + return "SomeProperty"; + } + +} diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType new file mode 100644 index 0000000000..899f84b2dd --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java new file mode 100644 index 0000000000..fce89b7bb9 --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java @@ -0,0 +1,29 @@ +/* + * 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.vtest.assembly.component.impl; + +public class DServiceImpl { + + public String sayHello() { + return "hello"; + } + +} + diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType new file mode 100644 index 0000000000..86a7be9cc0 --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java new file mode 100644 index 0000000000..4adb361ee5 --- /dev/null +++ b/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.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 org.apache.tuscany.sca.vtest.assembly.component.impl; + +import org.apache.tuscany.sca.vtest.assembly.component.EService; +import org.osoa.sca.annotations.Service; + + +@Service(EService.class) +public class EServiceImpl { + + public String method1() { + + return "method1" ; + } + + public String method2() { + + return "method2" ; + } + +} -- cgit v1.2.3