diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-13 01:23:01 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-13 01:23:01 +0000 |
commit | b055ebe9fe44990f9dad2ed8c1c789aa43b2538d (patch) | |
tree | 56c7f76a85d043ae6eaebdc4ecacc96ff17c565d /sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main | |
parent | b06ab7880cc36a63d7c2aef2a883227a5fbda092 (diff) |
Removing obsolete release candidate tags
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835692 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main')
6 files changed, 0 insertions, 356 deletions
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/Crawler.java b/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/Crawler.java deleted file mode 100644 index 2607e9aabc..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/Crawler.java +++ /dev/null @@ -1,46 +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 crawler; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Conversational -public interface Crawler -{ - /** - * Returns the crawler Id. - * @return a String containing the CrawlerId - */ - String getCrawlerId(); - - /** - * Starts a crawl process. - * @return a message that the crawl was started - */ - String crawl(); - - /** - * Closes the conversation. - */ - @EndsConversation - String close(); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/CrawlerController.java b/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/CrawlerController.java deleted file mode 100644 index 11b1b6b580..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/CrawlerController.java +++ /dev/null @@ -1,41 +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 crawler; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CrawlerController -{ - /** - * Tries to return a Crawler with the given Id in the list of crawlers. - * It uses the getServiceReference() method which should throw an exception because of multiplicity 0..n - * @param crawlerId the id of the Crawler - * @return the Crawler - */ - Crawler getCrawler(String crawlerId); - - /** - * Tries to return a Crawler with the given Id in the list of crawlers. - * It uses the getServiceReferences() method which shoulkd work properly with multiplicity 0..n - * @param crawlerId the id of the Crawler - * @return the Crawler - */ - Crawler findCrawler(String crawlerId); -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/CrawlerControllerImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/CrawlerControllerImpl.java deleted file mode 100644 index 1ca2a3797a..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/CrawlerControllerImpl.java +++ /dev/null @@ -1,80 +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 crawler.impl; - -import crawler.Crawler; -import crawler.CrawlerController; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sca.api.ComponentContextExtension; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(CrawlerController.class) -@Scope("COMPOSITE") -@AllowsPassByReference -public class CrawlerControllerImpl implements CrawlerController -{ - @Context - protected ComponentContext componentContext; - - @Reference - public List<Crawler> crawlers; - - /** - * @see CrawlerController#getCrawler(String) - */ - public Crawler getCrawler(String crawlerId) - { - for (int i = 0; i < crawlers.size(); i++) - { - Crawler crawler = crawlers.get(i); - String id = crawler.getCrawlerId(); - if (crawlerId.equals(id)) - { - Crawler newCrawler = componentContext.getService(Crawler.class, "crawlers"); - return newCrawler; - } - } - throw new RuntimeException("No crawler with id " + crawlerId + " found"); - } - - /** - * @see CrawlerController#findCrawler(String) - */ - public Crawler findCrawler(String crawlerId) - { - Collection<Crawler> crawlers = ((ComponentContextExtension)componentContext).getServices(Crawler.class, "crawlers"); - for (Crawler crawler : crawlers) - { - String id = crawler.getCrawlerId(); - if (crawlerId.equals(id)) - { - return crawler; - } - } - throw new RuntimeException("No crawler with id " + crawlerId + " found"); - } -} diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/CrawlerImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/CrawlerImpl.java deleted file mode 100644 index 0224d7750e..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/CrawlerImpl.java +++ /dev/null @@ -1,69 +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 crawler.impl; - -import crawler.Crawler; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(Crawler.class) -@AllowsPassByReference -@Scope("CONVERSATION") -public class CrawlerImpl implements Crawler -{ - @ConversationID - protected String conversationId; - - @Property - protected String crawlerId; - - @Context - protected ComponentContext componentContext; - - /** - * @see Crawler#getCrawlerId() - */ - public String getCrawlerId() - { - return crawlerId; - } - - /** - * @see Crawler#crawl() - */ - public String crawl() - { - System.out.println("started crawl with conversation " + conversationId); - return "started crawl with id " + getCrawlerId(); - } - - /** - * @see Crawler#close() - */ - public String close() - { - return "ended conversation with id " + getCrawlerId(); - } -}
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/SpecialCrawlerImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/SpecialCrawlerImpl.java deleted file mode 100644 index e486a23e23..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/java/crawler/impl/SpecialCrawlerImpl.java +++ /dev/null @@ -1,69 +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 crawler.impl; - -import crawler.Crawler; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(Crawler.class) -@AllowsPassByReference -@Scope("CONVERSATION") -public class SpecialCrawlerImpl implements Crawler -{ - @ConversationID - protected String conversationId; - - @Property - protected String crawlerId; - - @Context - protected ComponentContext componentContext; - - /** - * @see Crawler#getCrawlerId() - */ - public String getCrawlerId() - { - return crawlerId; - } - - /** - * @see Crawler#crawl() - */ - public String crawl() - { - System.out.println("started crawl with conversation " + conversationId); - return "started crawl with id " + getCrawlerId(); - } - - /** - * @see Crawler#close() - */ - public String close() - { - return "ended conversation with id " + getCrawlerId(); - } -}
\ No newline at end of file diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/resources/test.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/resources/test.composite deleted file mode 100644 index ed3adfc7ae..0000000000 --- a/sca-java-1.x/tags/1.5.1-RC3/itest/references-collection/src/main/resources/test.composite +++ /dev/null @@ -1,51 +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" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" - targetNamespace="http://crawler" - xmlns:crawler="http://crawler" - name="crawler"> - - <component name="CrawlerControllerComponent"> - <implementation.java class="crawler.impl.CrawlerControllerImpl"/> - <service name="CrawlerController"> - <interface.java interface="crawler.CrawlerController" /> - </service> - <reference name="crawlers" multiplicity="1..n" target="CrawlerComponent SpecialCrawlerComponent" /> - </component> - - <component name="CrawlerComponent"> - <implementation.java class="crawler.impl.CrawlerImpl"/> - <property name="crawlerId">normalcrawler</property> - <service name="Crawler"> - <interface.java interface="crawler.Crawler" /> - </service> - </component> - - <component name="SpecialCrawlerComponent"> - <implementation.java class="crawler.impl.SpecialCrawlerImpl"/> - <property name="crawlerId">specialcrawler</property> - <service name="Crawler"> - <interface.java interface="crawler.Crawler" /> - </service> - </component> - -</composite>
\ No newline at end of file |