diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-06 14:35:56 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-06 14:35:56 +0000 |
commit | cac430949436218c139f5790daadf4ec5d6ee5ee (patch) | |
tree | 56124aece308f62131068fcd72028d28233be499 /sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main | |
parent | 6071f17763f89f716cd5d1f25a9973d91a293fbf (diff) |
Delete itests folder as its now in testing folder
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1005062 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main')
11 files changed, 0 insertions, 501 deletions
diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java deleted file mode 100644 index ef2565b750..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java +++ /dev/null @@ -1,29 +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.itest.bindingsca; - -/** - * - */ -public interface Client { - String getName(String id); - - String create(String name); -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java deleted file mode 100644 index 96a0f2dadd..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.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.itest.bindingsca; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * - */ -@Service(Client.class) -public class ClientImpl implements Client { - @Reference - protected Local local; - - @Reference - protected Remote remote; - - public String getName(String id) { - Customer customer = null; - try { - customer = remote.getCustomer(id); - } catch (CustomerNotFoundException e) { - return null; - } - customer.dump("Client.getName()"); - return local.getName(customer); - } - - public String create(String name) { - String id = remote.generateId(); - Customer customer = remote.createCustomer(id, name); - customer.dump("Client.create()"); - return remote.getId(customer); - } -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java deleted file mode 100644 index f2b7b1e41d..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java +++ /dev/null @@ -1,70 +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.itest.bindingsca; - -/** - * - */ -public class Customer { - private String id; - private String name; - - public Customer() { - } - - /** - * @param id - * @param name - */ - public Customer(String id, String name) { - super(); - this.id = id; - this.name = name; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Customer [id=" + id + ", name=" + name + "]"; - } - - public void dump(String prefix) { - System.out.print(prefix); - System.out.print(": "); - System.out.print(toString()); - System.out.println(" @" + System.identityHashCode(this)); - System.out.println(getClass().getClassLoader()); - } -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java deleted file mode 100644 index a6e80c9eca..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java +++ /dev/null @@ -1,64 +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.itest.bindingsca; - -/** - * - */ -public class CustomerNotFoundException extends Exception { - private String customerId; - - /** - * - */ - public CustomerNotFoundException() { - } - - /** - * @param message - */ - public CustomerNotFoundException(String message) { - super(message); - } - - /** - * @param cause - */ - public CustomerNotFoundException(Throwable cause) { - super(cause); - } - - /** - * @param message - * @param cause - */ - public CustomerNotFoundException(String message, Throwable cause) { - super(message, cause); - } - - public String getCustomerId() { - return customerId; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java deleted file mode 100644 index 0fe30c9d53..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java +++ /dev/null @@ -1,27 +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.itest.bindingsca; - -/** - * - */ -public interface Local { - String getName(Customer customer); -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java deleted file mode 100644 index 8783808334..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java +++ /dev/null @@ -1,38 +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.itest.bindingsca; - -import org.oasisopen.sca.annotation.Service; - -/** - * - */ -@Service(Local.class) -public class LocalServiceImpl implements Local { - - public String getName(Customer customer) { - if (customer == null) { - return null; - } - customer.dump("Local.getName()"); - return customer.getName(); - } - -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java deleted file mode 100644 index 050d35007b..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java +++ /dev/null @@ -1,36 +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.itest.bindingsca; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * - */ -@Remotable -public interface Remote { - String generateId(); - - String getId(Customer customer); - - Customer getCustomer(String id) throws CustomerNotFoundException; - - Customer createCustomer(String id, String name); -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java deleted file mode 100644 index 6c432a500a..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java +++ /dev/null @@ -1,66 +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.itest.bindingsca; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import org.oasisopen.sca.annotation.AllowsPassByReference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * - */ -@Service(Remote.class) -@Scope("COMPOSITE") -public class RemoteServiceImpl implements Remote { - private Map<String, Customer> customers = new HashMap<String, Customer>(); - - public String generateId() { - return UUID.randomUUID().toString(); - } - - @AllowsPassByReference - public String getId(Customer customer) { - customer.dump("Remote.getId()"); - return customer.getId(); - } - - public Customer getCustomer(String id) throws CustomerNotFoundException { - Customer customer = customers.get(id); - if (customer == null) { - CustomerNotFoundException ex = new CustomerNotFoundException("Customer not found"); - ex.setCustomerId(id); - throw ex; - } - customer.dump("Remote.getCustomer()"); - return customer; - } - - public Customer createCustomer(String id, String name) { - Customer customer = new Customer(id, name); - customer.dump("Remote.createCustomer()"); - customers.put(id, customer); - return customer; - } - -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java deleted file mode 100644 index 3573eea978..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java +++ /dev/null @@ -1,57 +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.itest.bindingsca; - -import java.net.URI; - -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * - */ -public class SCAClientImpl implements Client { - private Local local; - private Remote remote; - - public SCAClientImpl(String domainURI) throws Exception { - SCAClientFactory factory = SCAClientFactory.newInstance(URI.create(domainURI)); - local = factory.getService(Local.class, "LocalComponent/Local"); - remote = factory.getService(Remote.class, "RemoteComponent/Remote"); - } - - public String getName(String id) { - Customer customer = null; - try { - customer = remote.getCustomer(id); - } catch (CustomerNotFoundException e) { - return null; - } - customer.dump("Client.getName()"); - return local.getName(customer); - } - - public String create(String name) { - String id = remote.generateId(); - Customer customer = remote.createCustomer(id, name); - customer.dump("Client.create()"); - return remote.getId(customer); - } - -} diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite deleted file mode 100644 index b04cc33023..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite +++ /dev/null @@ -1,30 +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 - * 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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://client" - name="Client"> - - <component name="ClientComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.ClientImpl" /> - <reference name="local" target="LocalComponent" /> - <reference name="remote" target="RemoteComponent" /> - </component> - - -</composite>
\ No newline at end of file diff --git a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite b/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite deleted file mode 100644 index fe282d291c..0000000000 --- a/sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite +++ /dev/null @@ -1,31 +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 - * 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://docs.oasis-open.org/ns/opencsa/sca/200912" - targetNamespace="http://service" - name="Service"> - - <component name="LocalComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.LocalServiceImpl" /> - </component> - - <component name="RemoteComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.RemoteServiceImpl" /> - </component> - -</composite>
\ No newline at end of file |