From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- branches/sca-java-1.0/itest/admin/pom.xml | 60 ++++++++++ branches/sca-java-1.0/itest/admin/readme.txt | 28 +++++ .../tuscany/sca/itest/admin/MyListService.java | 28 +++++ .../sca/itest/admin/MyListServiceByYear.java | 27 +++++ .../tuscany/sca/itest/admin/MyListServiceImpl.java | 88 ++++++++++++++ .../apache/tuscany/sca/itest/admin/MyLogger.java | 36 ++++++ .../apache/tuscany/sca/itest/admin/MyService.java | 28 +++++ .../tuscany/sca/itest/admin/MyServiceByDate.java | 29 +++++ .../tuscany/sca/itest/admin/MyServiceImpl.java | 132 +++++++++++++++++++++ .../tuscany/sca/itest/admin/MyTotalService.java | 25 ++++ .../sca/itest/admin/MyTotalServiceImpl.java | 93 +++++++++++++++ .../sca/itest/admin/SCAComponentService.java | 28 +++++ .../admin/MySimpleServiceInRecursiveTestCase.java | 80 +++++++++++++ .../sca/itest/admin/MySimpleServiceTestCase.java | 76 ++++++++++++ .../sca/itest/admin/MyTotalServiceTestCase.java | 67 +++++++++++ .../test/resources/Iteration1Composite.composite | 43 +++++++ .../test/resources/Iteration3Composite.composite | 68 +++++++++++ .../src/test/resources/MySimpleService.composite | 59 +++++++++ 18 files changed, 995 insertions(+) create mode 100644 branches/sca-java-1.0/itest/admin/pom.xml create mode 100644 branches/sca-java-1.0/itest/admin/readme.txt create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyLogger.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyService.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyServiceByDate.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyServiceImpl.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyTotalService.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyTotalServiceImpl.java create mode 100644 branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/SCAComponentService.java create mode 100644 branches/sca-java-1.0/itest/admin/src/test/java/org/apache/tuscany/sca/itest/admin/MySimpleServiceInRecursiveTestCase.java create mode 100644 branches/sca-java-1.0/itest/admin/src/test/java/org/apache/tuscany/sca/itest/admin/MySimpleServiceTestCase.java create mode 100644 branches/sca-java-1.0/itest/admin/src/test/java/org/apache/tuscany/sca/itest/admin/MyTotalServiceTestCase.java create mode 100644 branches/sca-java-1.0/itest/admin/src/test/resources/Iteration1Composite.composite create mode 100644 branches/sca-java-1.0/itest/admin/src/test/resources/Iteration3Composite.composite create mode 100644 branches/sca-java-1.0/itest/admin/src/test/resources/MySimpleService.composite (limited to 'branches/sca-java-1.0/itest/admin') diff --git a/branches/sca-java-1.0/itest/admin/pom.xml b/branches/sca-java-1.0/itest/admin/pom.xml new file mode 100644 index 0000000000..d3ffdc0dd4 --- /dev/null +++ b/branches/sca-java-1.0/itest/admin/pom.xml @@ -0,0 +1,60 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 1.0-incubating-SNAPSHOT + ../pom.xml + + tuscany-itest-admin + Apache Tuscany Admin Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.0-incubating-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.0-incubating-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-core-databinding + 1.0-incubating-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-databinding-sdo + 1.0-incubating-SNAPSHOT + compile + + + + diff --git a/branches/sca-java-1.0/itest/admin/readme.txt b/branches/sca-java-1.0/itest/admin/readme.txt new file mode 100644 index 0000000000..c4e96d7af0 --- /dev/null +++ b/branches/sca-java-1.0/itest/admin/readme.txt @@ -0,0 +1,28 @@ +This is a simple test compiled to test simple features of SCA + +There are interfaces to different services that have been included + +1. MyListService +2. MyListServiceByYear +3. MyService +4. MyServiceByDate +5. MyTotalservice + +The service that has been used in the tests primarily is MyService/MyTotalService. +in the test cases. + +There are three test cases and three composites (MySimppleService,Iteration1,Iteration3). + +1. MySimpleServiceTestCase - Checks if the components in MySimpleService.composite are initialized properly. + It tries to call simple functions implemented in MySimpleServiceImpl. + +2. MyTotalServiceTestCase - Initializes the components in the Iteration3Composite.composite file. + tries to call simple functions implemented in MyTotalServiceImpl. + +3. MySimpleServiceInRecursiveTestCase - Initializes the components in the Iteration1Composite.composite file. + It initializes its components using implementation:composite tag in the + composite file which points to MySimpleService.composite. + The test case recursively calls functions initialized in MySimpleService.composite. + + + diff --git a/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.java b/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.java new file mode 100644 index 0000000000..af9234b9bc --- /dev/null +++ b/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.java @@ -0,0 +1,28 @@ +/* + * 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.admin; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface MyListService { + String[] getHolidays(); + String getYear(); +} diff --git a/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.java b/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.java new file mode 100644 index 0000000000..4197007519 --- /dev/null +++ b/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.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 org.apache.tuscany.sca.itest.admin; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface MyListServiceByYear { + String[] getHolidays(int year); +} diff --git a/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java b/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java new file mode 100644 index 0000000000..21b38e734a --- /dev/null +++ b/branches/sca-java-1.0/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java @@ -0,0 +1,88 @@ +/* + * 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.admin; + + +import java.util.List; + +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +import org.apache.tuscany.sca.itest.admin.MyListService; +import org.apache.tuscany.sca.itest.admin.MyListServiceByYear; + +@Service(interfaces={MyListService.class,MyListServiceByYear.class}) + +public class MyListServiceImpl implements MyListService,MyListServiceByYear +{ + + // This is multiplicity=1:n + @Reference(name="myListServiceList",required=true) + public List myListServicesList; + + // This is multiplicity=0:n + @Reference(name="myListServiceArray",required=false) + public MyListService[] myListServicesArray; + + @Property(name="serviceYear") + protected String year = "2006"; + + public String[] getHolidays() + { + return getHolidays(new Integer(year).intValue()); + } + + public String[] getHolidays(int year) + { + MyListService myService; + if (myListServicesList!=null) + { + for (int i=0; i=0 && index + + + + Raleigh + 2008 + + Durham + 2009 + + + + + + + + Durham + 2009 + + + diff --git a/branches/sca-java-1.0/itest/admin/src/test/resources/Iteration3Composite.composite b/branches/sca-java-1.0/itest/admin/src/test/resources/Iteration3Composite.composite new file mode 100644 index 0000000000..dd06d030d6 --- /dev/null +++ b/branches/sca-java-1.0/itest/admin/src/test/resources/Iteration3Composite.composite @@ -0,0 +1,68 @@ + + + + + Raleigh + 2008 + + + + + + + + CARY + 2007 + + + + + + + + + + + + + + + + + + + + + Durham + 2009 + + + + + + + + Durham + 2009 + + diff --git a/branches/sca-java-1.0/itest/admin/src/test/resources/MySimpleService.composite b/branches/sca-java-1.0/itest/admin/src/test/resources/MySimpleService.composite new file mode 100644 index 0000000000..a1f8abb8da --- /dev/null +++ b/branches/sca-java-1.0/itest/admin/src/test/resources/MySimpleService.composite @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + Raleigh + 2008 + + + + + + + + CARY + 2007 + + + + + + + + + -- cgit v1.2.3