diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-27 10:12:24 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-27 10:12:24 +0000 |
commit | 46576bda96cf80886ed8bd811e79dee9b1e63f4c (patch) | |
tree | b8ac5e49c7c999f9a03425cab3e844a0a24e6d6a /sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client | |
parent | d3ab2b28493cecc4092814c3fd6873d74d1018d8 (diff) |
Move the travel sample tutorial from 2.x trunk to contrib as its not in the build, doesn't build, and no one is actively working on it. (and even if they were, i wonder if this should be released seperately like the 1.x version and so not in the trunk tree anyway
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@948750 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client')
5 files changed, 173 insertions, 0 deletions
diff --git a/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/build.xml b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/build.xml new file mode 100644 index 0000000000..6a85f2066e --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/build.xml @@ -0,0 +1,25 @@ +<!--
+ * 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.
+-->
+
+<project name="scatours-contribution-introducing-client" default="compile">
+ <import file="../../antdefs.xml"/>
+ <path id="compile-path">
+ <pathelement path="../introducing-tours/target/scatours-contribution-introducing-tours.jar"/>
+ </path>
+</project>
diff --git a/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/pom.xml b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/pom.xml new file mode 100644 index 0000000000..b163304934 --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/pom.xml @@ -0,0 +1,48 @@ +<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>scatours</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent><version>2.0-SNAPSHOT</version>
+ <artifactId>scatours-contribution-introducing-client</artifactId>
+ <name>Apache Tuscany SCA Tours Introducing Client Contribution</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>scatours-contribution-introducing-tours</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/java/scatours/client/impl/TestClientImpl.java b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/java/scatours/client/impl/TestClientImpl.java new file mode 100644 index 0000000000..c89eec07fe --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/java/scatours/client/impl/TestClientImpl.java @@ -0,0 +1,47 @@ +/*
+ * 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 scatours.client.impl;
+
+import java.math.BigDecimal;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+import com.tuscanyscatours.Bookings;
+import com.tuscanyscatours.Checkout;
+
+@Service(Runnable.class)
+public class TestClientImpl {
+ @Reference
+ protected Bookings bookings;
+
+ @Reference
+ protected Checkout checkout;
+
+ public TestClientImpl() {
+ }
+
+ public void run() {
+ String bookingCode = bookings.newBooking("FS1APR4", 1);
+ System.out.println("Booking code is " + bookingCode);
+
+ checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
+ }
+}
diff --git a/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..7548d3d99e --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,24 @@ +<?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.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:client="http://client.scatours/">
+ <deployable composite="client:Client" />
+ <import.java package="com.tuscanyscatours" />
+</contribution>
diff --git a/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/resources/client.composite b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/resources/client.composite new file mode 100644 index 0000000000..fbefc7b35b --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/contributions/introducing-client/src/main/resources/client.composite @@ -0,0 +1,29 @@ +<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://client.scatours/"
+ name="Client">
+
+ <component name="TestClient">
+ <implementation.java class="scatours.client.impl.TestClientImpl" />
+ <reference name="bookings" target="TripBooking/Bookings" />
+ <reference name="checkout" target="ShoppingCart/Checkout" />
+ </component>
+</composite>
|