From cac430949436218c139f5790daadf4ec5d6ee5ee Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 6 Oct 2010 14:35:56 +0000 Subject: 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 --- .../tuscany/sca/itest/bindingsca/Client.java | 29 --------- .../tuscany/sca/itest/bindingsca/ClientImpl.java | 53 ---------------- .../tuscany/sca/itest/bindingsca/Customer.java | 70 ---------------------- .../bindingsca/CustomerNotFoundException.java | 64 -------------------- .../apache/tuscany/sca/itest/bindingsca/Local.java | 27 --------- .../sca/itest/bindingsca/LocalServiceImpl.java | 38 ------------ .../tuscany/sca/itest/bindingsca/Remote.java | 36 ----------- .../sca/itest/bindingsca/RemoteServiceImpl.java | 66 -------------------- .../sca/itest/bindingsca/SCAClientImpl.java | 57 ------------------ 9 files changed, 440 deletions(-) delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java delete mode 100644 sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java (limited to 'sca-java-2.x/trunk/itest/nodes/binding-sca-tribes/src/main/java/org/apache') 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 customers = new HashMap(); - - 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); - } - -} -- cgit v1.2.3