diff options
Diffstat (limited to 'branches/sca-java-1.x/vtest/java-api/annotations/init/src/main')
11 files changed, 0 insertions, 401 deletions
diff --git a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java deleted file mode 100644 index edf13010f5..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/AService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java deleted file mode 100644 index 5d53510462..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr1Impl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java deleted file mode 100644 index 43c1a8cffa..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr2Impl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java deleted file mode 100644 index f5cac472c0..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr3Impl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java deleted file mode 100644 index b7c17ee535..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceErr4Impl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java deleted file mode 100644 index c2adea1426..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/init/impl/AServiceImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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; - } -} diff --git a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err1/AServiceErr1.composite b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err1/AServiceErr1.composite deleted file mode 100644 index 01b8e101e0..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err1/AServiceErr1.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr1"> - - <component name="AServiceComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr1Impl"/> - </component> -</composite> diff --git a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err2/AServiceErr2.composite b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err2/AServiceErr2.composite deleted file mode 100644 index 4ae38d44b6..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err2/AServiceErr2.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr2"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr2Impl"/> - </component> -</composite> diff --git a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err3/AServiceErr3.composite b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err3/AServiceErr3.composite deleted file mode 100644 index 6bc3d8e7fc..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err3/AServiceErr3.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr3"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr3Impl"/> - </component> -</composite> diff --git a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err4/AServiceErr4.composite b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err4/AServiceErr4.composite deleted file mode 100644 index 7ade16e6d3..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/err4/AServiceErr4.composite +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AServiceErr4"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceErr4Impl"/> - </component> -</composite> diff --git a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/proper/AService.composite b/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/proper/AService.composite deleted file mode 100644 index 35f13a2ae6..0000000000 --- a/branches/sca-java-1.x/vtest/java-api/annotations/init/src/main/resources/proper/AService.composite +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://vtest" - xmlns:vtest="http://vtest" - name="AService"> - - <component name="AComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceImpl"/> - <property name="someProperty">hello</property> - <reference name="someReference" target="AnotherAComponent"/> - </component> - <component name="AnotherAComponent"> - <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.init.impl.AServiceImpl"/> - </component> -</composite> |