summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/common-contribution/src/scatours
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sandbox/travelsample/common-contribution/src/scatours/common/Book.java31
-rw-r--r--sandbox/travelsample/common-contribution/src/scatours/common/TripItem.java55
2 files changed, 86 insertions, 0 deletions
diff --git a/sandbox/travelsample/common-contribution/src/scatours/common/Book.java b/sandbox/travelsample/common-contribution/src/scatours/common/Book.java
new file mode 100644
index 0000000000..f42db4341b
--- /dev/null
+++ b/sandbox/travelsample/common-contribution/src/scatours/common/Book.java
@@ -0,0 +1,31 @@
+/*
+ * 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.common;
+
+import java.util.List;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.OneWay;
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Book {
+ String book(TripItem tripItem);
+}
diff --git a/sandbox/travelsample/common-contribution/src/scatours/common/TripItem.java b/sandbox/travelsample/common-contribution/src/scatours/common/TripItem.java
index f1e3581d86..e991668cbc 100644
--- a/sandbox/travelsample/common-contribution/src/scatours/common/TripItem.java
+++ b/sandbox/travelsample/common-contribution/src/scatours/common/TripItem.java
@@ -19,9 +19,16 @@
package scatours.common;
+import java.util.List;
+
public class TripItem {
+ public static String FLIGHT = "Flight";
+ public static String HOTEL = "Hotel";
+ public static String CAR = "Car";
+ public static String TRIP = "Trip";
+
private String id;
private String tripId;
private String type;
@@ -33,6 +40,10 @@ public class TripItem {
private double price;
private String currency;
private String link;
+ private TripItem[] tripItems; // used for a trip made up of trip items
+ private String customerDetails;
+ private String agentDetails;
+ private String bookingCode;
public TripItem() {
}
@@ -162,4 +173,48 @@ public class TripItem {
public void setLink(String link) {
this.link = link;
}
+
+ public TripItem[] getTripItems() {
+ return tripItems;
+ }
+
+ public void setTripItems(TripItem[] tripItems) {
+ this.tripItems = tripItems;
+ }
+
+ public String getCustomerDetails() {
+ return customerDetails;
+ }
+
+ public void setCustomerDetails(String customerDetails) {
+ this.customerDetails = customerDetails;
+ }
+
+ public String getAgentDetails() {
+ return agentDetails;
+ }
+
+ public void setAgentDetails(String agentDetails) {
+ this.agentDetails = agentDetails;
+ }
+
+ public String getBookingCode() {
+ return bookingCode;
+ }
+
+ public void setBookingCode(String bookingCode) {
+ this.bookingCode = bookingCode;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+
+ if (obj instanceof TripItem){
+ if (((TripItem)obj).getId().equals(getId())){
+ return true;
+ }
+ }
+
+ return super.equals(obj);
+ }
}