diff options
Diffstat (limited to 'sandbox/travelsample/contributions/common')
4 files changed, 99 insertions, 102 deletions
diff --git a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Search.java b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Search.java index b8af6ba93f..db0377a779 100644 --- a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Search.java +++ b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/Search.java @@ -29,9 +29,9 @@ import org.osoa.sca.annotations.Remotable; @Callback(SearchCallback.class)
public interface Search {
TripItem[] searchSynch(TripLeg tripLeg);
-
+
@OneWay
void searchAsynch(TripLeg tripLeg);
-
+
int getPercentComplete();
}
diff --git a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/SearchCallback.java b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/SearchCallback.java index fea43c6261..ddab27c3dd 100644 --- a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/SearchCallback.java +++ b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/SearchCallback.java @@ -28,5 +28,6 @@ import org.osoa.sca.annotations.Remotable; public interface SearchCallback {
@EndsConversation
void searchResults(TripItem[] items);
+
void setPercentComplete(String searchComponent, int percentComplete);
}
diff --git a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripItem.java b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripItem.java index 3458cd9d27..2f2a6299f9 100644 --- a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripItem.java +++ b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripItem.java @@ -19,16 +19,14 @@ package com.tuscanyscatours.common;
-
-
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 id;
private String tripId;
private String type;
private String name;
@@ -43,10 +41,10 @@ public class TripItem { private String customerDetails;
private String agentDetails;
private String bookingCode;
-
+
public TripItem() {
- }
-
+ }
+
public TripItem(TripItem item) {
this.id = item.getId();
this.tripId = item.getTripId();
@@ -59,18 +57,18 @@ public class TripItem { this.price = item.getPrice();
this.currency = item.getCurrency();
this.link = item.getLink();
- }
-
- public TripItem(String id,
+ }
+
+ public TripItem(String id,
String tripId,
- String type,
- String name,
- String description,
- String location,
- String fromDate,
- String toDate,
- double price,
- String currency,
+ String type,
+ String name,
+ String description,
+ String location,
+ String fromDate,
+ String toDate,
+ double price,
+ String currency,
String link) {
this.id = id;
this.tripId = tripId;
@@ -83,148 +81,158 @@ public class TripItem { this.price = price;
this.currency = currency;
this.link = link;
- }
-
+ }
+
public String getId() {
return id;
}
-
+
public void setId(String id) {
this.id = id;
}
-
+
public String getTripId() {
return tripId;
}
-
+
public void setTripId(String tripId) {
this.tripId = tripId;
}
-
+
public String getType() {
return type;
}
-
+
public void setType(String type) {
this.type = type;
}
-
+
public String getName() {
return name;
}
-
+
public void setName(String name) {
this.name = name;
- }
-
+ }
+
public String getDescription() {
return description;
}
-
+
public void setDescription(String description) {
- this.description = description;
- }
-
+ this.description = description;
+ }
+
public String getLocation() {
return location;
- }
-
+ }
+
public void setLocation(String location) {
this.location = location;
}
-
+
public String getFromDate() {
return fromDate;
}
-
+
public void setFromDate(String fromDate) {
this.fromDate = fromDate;
}
-
+
public String getToDate() {
return toDate;
}
-
+
public void setToDate(String toDate) {
this.toDate = toDate;
}
-
+
public double getPrice() {
return price;
}
-
+
public void setPrice(double price) {
this.price = price;
}
-
+
public String getCurrency() {
return currency;
}
-
+
public void setCurrency(String currency) {
this.currency = currency;
}
-
+
public String getLink() {
return link;
}
-
+
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 String toString(){
- String tripString = "Trip: id " + this.tripId +
- " type " + this.type +
- " name " + this.name +
- " description " + this.description +
- " location " + this.location +
- " fromDate " + this.fromDate +
- " toDate " + this.toDate +
- " price " + this.price +
- " currency " + this.currency +
- " link " + this.link;
+ public String toString() {
+ String tripString =
+ "Trip: id " + this.tripId
+ + " type "
+ + this.type
+ + " name "
+ + this.name
+ + " description "
+ + this.description
+ + " location "
+ + this.location
+ + " fromDate "
+ + this.fromDate
+ + " toDate "
+ + this.toDate
+ + " price "
+ + this.price
+ + " currency "
+ + this.currency
+ + " link "
+ + this.link;
return tripString;
}
-
+
@Override
public boolean equals(Object obj) {
-
- if (obj instanceof TripItem){
- if (((TripItem)obj).getId().equals(getId())){
+
+ if (obj instanceof TripItem) {
+ if (((TripItem)obj).getId().equals(getId())) {
return true;
}
}
diff --git a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripLeg.java b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripLeg.java index ea549da52f..663634b1e9 100644 --- a/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripLeg.java +++ b/sandbox/travelsample/contributions/common/src/main/java/com/tuscanyscatours/common/TripLeg.java @@ -19,9 +19,8 @@ package com.tuscanyscatours.common;
-
public class TripLeg {
-
+
private String id;
private String fromLocation;
private String toLocation;
@@ -29,69 +28,58 @@ public class TripLeg { private String toDate;
private String noOfPeople;
-
public TripLeg() {
}
-
- public TripLeg(String id,
- String fromLocation,
- String toLocation,
- String fromDate,
- String toDate,
- String noOfPeople) {
- }
-
+
+ public TripLeg(String id, String fromLocation, String toLocation, String fromDate, String toDate, String noOfPeople) {
+ }
+
public String getId() {
return id;
}
-
+
public void setId(String id) {
this.id = id;
- }
-
+ }
+
public String getFromLocation() {
return fromLocation;
}
-
+
public void setFromLocation(String fromLocation) {
this.fromLocation = fromLocation;
}
-
+
public String getToLocation() {
return toLocation;
}
-
+
public void setToLocation(String toLocation) {
this.toLocation = toLocation;
- }
-
+ }
+
public String getFromDate() {
return fromDate;
}
-
+
public void setFromDate(String fromDate) {
this.fromDate = fromDate;
}
-
+
public String getToDate() {
return toDate;
}
-
+
public void setToDate(String toDate) {
this.toDate = toDate;
- }
+ }
public String getNoOfPeople() {
return noOfPeople;
}
-
+
public void setNoOfPeople(String noOfPeople) {
this.noOfPeople = noOfPeople;
}
-
-
-
-
-
}
|