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 --- .../tuscany/sca/itest/admin/MyListService.java | 27 +++++ .../sca/itest/admin/MyListServiceByYear.java | 26 +++++ .../tuscany/sca/itest/admin/MyListServiceImpl.java | 87 ++++++++++++++ .../apache/tuscany/sca/itest/admin/MyLogger.java | 35 ++++++ .../apache/tuscany/sca/itest/admin/MyService.java | 27 +++++ .../tuscany/sca/itest/admin/MyServiceByDate.java | 28 +++++ .../tuscany/sca/itest/admin/MyServiceImpl.java | 125 +++++++++++++++++++++ .../tuscany/sca/itest/admin/MyTotalService.java | 24 ++++ .../sca/itest/admin/MyTotalServiceImpl.java | 92 +++++++++++++++ .../sca/itest/admin/SCAComponentService.java | 25 +++++ 10 files changed, 496 insertions(+) create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyLogger.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyService.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyServiceByDate.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyServiceImpl.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyTotalService.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyTotalServiceImpl.java create mode 100644 branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/SCAComponentService.java (limited to 'branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache') diff --git a/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.java b/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.java new file mode 100644 index 0000000000..d307e0f9a2 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListService.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 MyListService { + String[] getHolidays(); + String getYear(); +} diff --git a/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.java b/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.java new file mode 100644 index 0000000000..143f860644 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceByYear.java @@ -0,0 +1,26 @@ +/* + * 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.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java b/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java new file mode 100644 index 0000000000..80f319f7c1 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/admin/src/main/java/org/apache/tuscany/sca/itest/admin/MyListServiceImpl.java @@ -0,0 +1,87 @@ +/* + * 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