From 3cf294786a4a1da99139389a473b4216ef8205c4 Mon Sep 17 00:00:00 2001 From: nash Date: Sat, 15 May 2010 15:26:34 +0000 Subject: Merge revision r944274 from trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@944665 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/com/tuscanyscahotels/HotelOffers.java | 26 --- .../com/tuscanyscahotels/impl/HotelOffersImpl.java | 35 ----- .../src/main/java/com/tuscanyscatours/Address.java | 172 -------------------- .../java/com/tuscanyscatours/AirportCodes.java | 28 ---- .../java/com/tuscanyscatours/BillingAddress.java | 174 --------------------- .../main/java/com/tuscanyscatours/Bookings.java | 26 --- .../src/main/java/com/tuscanyscatours/Cars.java | 27 ---- .../com/tuscanyscatours/CurrencyConverter.java | 27 ---- .../java/com/tuscanyscatours/CustomerInfo.java | 27 ---- .../src/main/java/com/tuscanyscatours/Flights.java | 27 ---- .../src/main/java/com/tuscanyscatours/Hotels.java | 27 ---- .../tuscanyscatours/using/impl/CarPartnerImpl.java | 36 ----- .../tuscanyscatours/using/impl/CarVendorImpl.java | 34 ---- .../using/impl/CurrencyConverterImpl.java | 45 ------ .../tuscanyscatours/using/impl/CustomerImpl.java | 47 ------ .../using/impl/FlightPartnerImpl.java | 31 ---- .../using/impl/HotelPartnerImpl.java | 31 ---- .../using/impl/TripBookingImpl.java | 73 --------- 18 files changed, 893 deletions(-) delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Address.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Bookings.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Cars.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Flights.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Hotels.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/FlightPartnerImpl.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/HotelPartnerImpl.java delete mode 100644 sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java (limited to 'sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com') diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java deleted file mode 100644 index 8abc5af687..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java +++ /dev/null @@ -1,26 +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 com.tuscanyscahotels; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface HotelOffers { - String bookTodaysSpecial(); -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java deleted file mode 100644 index fccef2beed..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java +++ /dev/null @@ -1,35 +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 com.tuscanyscahotels.impl; - -import java.util.Date; -import org.osoa.sca.annotations.Reference; - -import com.tuscanyscahotels.HotelOffers; -import com.tuscanyscatours.Hotels; - -public class HotelOffersImpl implements HotelOffers { - - @Reference - protected Hotels hotels; - - public String bookTodaysSpecial() { - return hotels.bookHotel("LBH", new Date(), 3, "STD"); - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Address.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Address.java deleted file mode 100644 index 614da1e2ad..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Address.java +++ /dev/null @@ -1,172 +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. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2010.03.27 at 05:55:25 AM GMT -// - - -package com.tuscanyscatours; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for Address complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="Address">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="street" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="state" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="zip" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Address", propOrder = { - "street", - "city", - "state", - "zip" -}) -public class Address { - - @XmlElement(required = true) - protected String street; - @XmlElement(required = true) - protected String city; - @XmlElement(required = true) - protected String state; - @XmlElement(required = true) - protected String zip; - - /** - * Gets the value of the street property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStreet() { - return street; - } - - /** - * Sets the value of the street property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStreet(String value) { - this.street = value; - } - - /** - * Gets the value of the city property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCity() { - return city; - } - - /** - * Sets the value of the city property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCity(String value) { - this.city = value; - } - - /** - * Gets the value of the state property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getState() { - return state; - } - - /** - * Sets the value of the state property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setState(String value) { - this.state = value; - } - - /** - * Gets the value of the zip property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getZip() { - return zip; - } - - /** - * Sets the value of the zip property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setZip(String value) { - this.zip = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java deleted file mode 100644 index 577f22250a..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java +++ /dev/null @@ -1,28 +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 com.tuscanyscatours; - -public class AirportCodes { - public String getAirport(String code) { - if ("AAA".equals(code)) return "Anaa"; - else if ("AAB".equals(code)) return "Arrabury"; - // other airport codes and cities would follow here - else return null; - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java deleted file mode 100644 index 4687cf1116..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java +++ /dev/null @@ -1,174 +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. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2010.03.27 at 05:55:25 AM GMT -// - - -package com.tuscanyscatours; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="street" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="state" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="zip" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "street", - "city", - "state", - "zip" -}) -@XmlRootElement(name = "billingAddress") -public class BillingAddress { - - @XmlElement(required = true) - protected String street; - @XmlElement(required = true) - protected String city; - @XmlElement(required = true) - protected String state; - @XmlElement(required = true) - protected String zip; - - /** - * Gets the value of the street property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStreet() { - return street; - } - - /** - * Sets the value of the street property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStreet(String value) { - this.street = value; - } - - /** - * Gets the value of the city property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCity() { - return city; - } - - /** - * Sets the value of the city property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCity(String value) { - this.city = value; - } - - /** - * Gets the value of the state property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getState() { - return state; - } - - /** - * Sets the value of the state property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setState(String value) { - this.state = value; - } - - /** - * Gets the value of the zip property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getZip() { - return zip; - } - - /** - * Sets the value of the zip property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setZip(String value) { - this.zip = value; - } - -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Bookings.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Bookings.java deleted file mode 100644 index 9d54d46bb6..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Bookings.java +++ /dev/null @@ -1,26 +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 com.tuscanyscatours; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Bookings { - String newBooking(String trip, int people); -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Cars.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Cars.java deleted file mode 100644 index f58fa33c8d..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Cars.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 com.tuscanyscatours; - -import java.util.Date; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Cars { - String bookCar(Date pickup, int days, String carClass); -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java deleted file mode 100644 index 9c201813e1..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.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 com.tuscanyscatours; - -import java.math.BigDecimal; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CurrencyConverter { - BigDecimal convert(BigDecimal amount); -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java deleted file mode 100644 index 958ca6cf8c..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.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 com.tuscanyscatours; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CustomerInfo { - String getBillingAddress(); - String getDeliveryAddress(); -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Flights.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Flights.java deleted file mode 100644 index 873b0afc0c..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Flights.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 com.tuscanyscatours; - -import java.util.Date; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Flights { - String bookFlight(String flightNumber, Date date, int seats, String flightClass); -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Hotels.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Hotels.java deleted file mode 100644 index 85944ad1b6..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/Hotels.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 com.tuscanyscatours; - -import java.util.Date; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Hotels { - String bookHotel(String hotelCode, Date date, int days, String roomType); -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java deleted file mode 100644 index 687fc49230..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.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 com.tuscanyscatours.using.impl; - -import java.util.Date; -import org.osoa.sca.annotations.Reference; -import com.tuscanyscatours.Cars; - -public class CarPartnerImpl implements Cars { - - @Reference - protected Cars[] cars; - - @Reference(required=false) - protected Cars[] luxuryCars; - - public String bookCar(Date pickup, int days, String carClass) { - return cars[0].bookCar(pickup, days, carClass); - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java deleted file mode 100644 index f8644bab2c..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java +++ /dev/null @@ -1,34 +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 com.tuscanyscatours.using.impl; - -import java.util.Date; -import com.tuscanyscatours.Cars; - -public class CarVendorImpl implements Cars { - - protected int minAge; // implicitly defines an SCA property - - public String bookCar(Date pickup, int days, String carClass) { - System.out.println("Booking confirmed for pickup date " + pickup + - " duration " + days + " days in a " + carClass + - " class car"); - return "CV234"; - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java deleted file mode 100644 index 3749221aa9..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java +++ /dev/null @@ -1,45 +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 com.tuscanyscatours.using.impl; - -import java.math.BigDecimal; -import org.osoa.sca.annotations.Property; -import com.tuscanyscatours.CurrencyConverter; - -public class CurrencyConverterImpl implements CurrencyConverter { - - @Property - protected String fromCurrency; - - @Property - protected String toCurrency; - - public BigDecimal convert(BigDecimal amount) { - return amount.multiply(getRate(toCurrency)) - .divide(getRate(fromCurrency), 2, 0); - } - - private BigDecimal getRate(String currency) { - int rate = 0; - for (int i = 0; i < currency.length(); i++) { - rate += currency.codePointAt(i); - } - return new BigDecimal(rate).divide(new BigDecimal(100)); - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java deleted file mode 100644 index 84ca6c7593..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java +++ /dev/null @@ -1,47 +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 com.tuscanyscatours.using.impl; - -import org.osoa.sca.annotations.Property; -import com.tuscanyscatours.Address; -import com.tuscanyscatours.BillingAddress; -import com.tuscanyscatours.CustomerInfo; - -public class CustomerImpl implements CustomerInfo { - - @Property - protected BillingAddress billingAddress; - - @Property - protected Address deliveryAddress; - - public String getBillingAddress() { - return billingAddress.getStreet() + ", " + - billingAddress.getCity() + ", " + - billingAddress.getState() + " " + - billingAddress.getZip(); - } - - public String getDeliveryAddress() { - return deliveryAddress.getStreet() + ", " + - deliveryAddress.getCity() + ", " + - deliveryAddress.getState() + " " + - deliveryAddress.getZip(); - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/FlightPartnerImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/FlightPartnerImpl.java deleted file mode 100644 index c5d6747a6b..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/FlightPartnerImpl.java +++ /dev/null @@ -1,31 +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 com.tuscanyscatours.using.impl; - -import java.util.Date; -import com.tuscanyscatours.Flights; - -public class FlightPartnerImpl implements Flights { - - public String bookFlight(String flightNumber, Date date, int seats, String flightClass) { - System.out.println("Booking confirmed for flight " + flightNumber + " on date " + - date + " with " + seats + " seats in " + flightClass + " class"); - return "FP345"; - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/HotelPartnerImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/HotelPartnerImpl.java deleted file mode 100644 index 6cca73b0d0..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/HotelPartnerImpl.java +++ /dev/null @@ -1,31 +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 com.tuscanyscatours.using.impl; - -import java.util.Date; -import com.tuscanyscatours.Hotels; - -public class HotelPartnerImpl implements Hotels { - - public String bookHotel(String hotelCode, Date date, int days, String roomType) { - System.out.println("Booking confirmed for hotel " + hotelCode + " arriving on " + - date + " for " + days + " days in a " + roomType + " room"); - return "HP456"; - } -} diff --git a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java b/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java deleted file mode 100644 index 9d81a0d4ed..0000000000 --- a/sca-java-1.x/branches/sca-java-travelsample-1.0/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java +++ /dev/null @@ -1,73 +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 com.tuscanyscatours.using.impl; - -import java.text.DateFormat; -import java.util.Date; -import org.osoa.sca.annotations.Reference; - -import com.tuscanyscatours.Bookings; -import com.tuscanyscatours.Cars; -import com.tuscanyscatours.Flights; -import com.tuscanyscatours.Hotels; - -public class TripBookingImpl implements Bookings { - - public TripBookingImpl(@Reference(name="cars") Cars cars) { - this.cars = cars; - } - - protected Cars cars; - - @Reference - protected Flights flights; - - private Hotels hotels; - - @Reference - public void setHotels(Hotels hotels) { - this.hotels = hotels; - } - - public String newBooking(String trip, int people) { - /* In a real implementation this method would look up the trip code - in the travel catalog to get details of the car, flight and hotel - bookings needed. Instead these details are hard-wired here for - test purposes. */ - Date startDate = new Date(); //TEMP - need to fix - /* - try { - startDate = DateFormat.getInstance().parse("7 Jul, 2012"); - } catch (Exception e) { - e.printStackTrace(); - } - */ - - if (people > 0) { - cars.bookCar(startDate, 7, "B"); - flights.bookFlight("AA123", startDate, people, "Y"); - hotels.bookHotel("DBH", startDate, 7, "SUP"); - - return "HW3546"; - - } else { - return "NONE"; - } - } -} -- cgit v1.2.3