From ecaed8ff741ea67c33c93cf571557db0837fa689 Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 20 Mar 2009 09:41:17 +0000 Subject: [maven-release-plugin] copy for branch tb7 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@756391 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 sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java create mode 100644 sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java create mode 100644 sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java create mode 100644 sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java create mode 100644 sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java create mode 100644 sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java (limited to 'sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany') diff --git a/sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java b/sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java new file mode 100644 index 0000000000..9f6b9bcffd --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/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.oasisopen.sca.annotation.Remotable; + +/** + * The interface for AService + */ +@Remotable +public interface AService { + public String getGreetings(String name); + public boolean isInitProper(); +} diff --git a/sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java b/sandbox/ant/sca/branches/tb7/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..c48b2e2070 --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/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.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.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/sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java b/sandbox/ant/sca/branches/tb7/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..532b1d16eb --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/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.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.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/sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java b/sandbox/ant/sca/branches/tb7/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..b69a2541b0 --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/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.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.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/sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java b/sandbox/ant/sca/branches/tb7/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..76f905cff0 --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/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.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.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/sandbox/ant/sca/branches/tb7/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java b/sandbox/ant/sca/branches/tb7/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..14c0e9c2da --- /dev/null +++ b/sandbox/ant/sca/branches/tb7/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.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Property; +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.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