From 3a569a2f00bf172cddfd567149774ee808a2a242 Mon Sep 17 00:00:00 2001 From: nash Date: Wed, 30 Mar 2011 19:50:51 +0000 Subject: Create branch for 1.6.2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1087059 13f79535-47bb-0310-9956-ffa450edef68 --- .../vtest/javaapi/annotations/init/AService.java | 30 ++++++++++++ .../annotations/init/impl/AServiceErr1Impl.java | 43 ++++++++++++++++++ .../annotations/init/impl/AServiceErr2Impl.java | 43 ++++++++++++++++++ .../annotations/init/impl/AServiceErr3Impl.java | 44 ++++++++++++++++++ .../annotations/init/impl/AServiceErr4Impl.java | 43 ++++++++++++++++++ .../annotations/init/impl/AServiceImpl.java | 53 ++++++++++++++++++++++ 6 files changed, 256 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java (limited to 'sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest') diff --git a/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java new file mode 100644 index 0000000000..edf13010f5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java @@ -0,0 +1,30 @@ +/* + * 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.javaapi.annotations.init; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for AService + */ +@Remotable +public interface AService { + public String getGreetings(String name); + public boolean isInitProper(); +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java new file mode 100644 index 0000000000..5d53510462 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java @@ -0,0 +1,43 @@ +/* + * 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.javaapi.annotations.init.impl; + +import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Service; + +/** + * This class implements AService. The implementation has an error since it annotates a protected + * method with "@Init". + */ +@Service(AService.class) +public class AServiceErr1Impl implements AService { + + @Init + protected void init() { + } + + public String getGreetings(String name) { + return "Hello " + name; + } + + public boolean isInitProper() { + return false; + } +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java new file mode 100644 index 0000000000..43c1a8cffa --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java @@ -0,0 +1,43 @@ +/* + * 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.javaapi.annotations.init.impl; + +import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Service; + +/** + * This class implements AService. The implementation has an error since it annotates a private + * method with "@Init". + */ +@Service(AService.class) +public class AServiceErr2Impl implements AService { + + @Init + private void init() { + } + + public String getGreetings(String name) { + return "Hello " + name; + } + + public boolean isInitProper() { + return false; + } +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java new file mode 100644 index 0000000000..f5cac472c0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java @@ -0,0 +1,44 @@ +/* + * 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.javaapi.annotations.init.impl; + +import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Service; + +/** + * This class implements AService. The implementation has an error since it annotates a + * method with non-void return type with "@Init". + */ +@Service(AService.class) +public class AServiceErr3Impl implements AService { + + @Init + public String init() { + return null; + } + + public String getGreetings(String name) { + return "Hello " + name; + } + + public boolean isInitProper() { + return false; + } +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java new file mode 100644 index 0000000000..b7c17ee535 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java @@ -0,0 +1,43 @@ +/* + * 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.javaapi.annotations.init.impl; + +import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Service; + +/** + * This class implements AService. The implementation has an error since it annotates a + * method with arguments with "@Init". + */ +@Service(AService.class) +public class AServiceErr4Impl implements AService { + + @Init + public void init(int x) { + } + + public String getGreetings(String name) { + return "Hello " + name; + } + + public boolean isInitProper() { + return false; + } +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java new file mode 100644 index 0000000000..c2adea1426 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java @@ -0,0 +1,53 @@ +/* + * 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.javaapi.annotations.init.impl; + +import org.apache.tuscany.sca.vtest.javaapi.annotations.init.AService; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * This class implements AService. + */ +@Service(AService.class) +public class AServiceImpl implements AService { + + private boolean initProper; + + @Property + public String someProperty; + + @Reference + public AService someReference; + + @Init + public void init() { + initProper = someProperty != null && someReference != null; + } + + public String getGreetings(String name) { + return "Hello " + name; + } + + public boolean isInitProper() { + return initProper; + } +} -- cgit v1.2.3