diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-25 18:00:45 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-25 18:00:45 +0000 |
commit | 3852b601e7c5d71282cb5e37e9c6ce6e648503a2 (patch) | |
tree | 65e9367a1a4e6b3386f3b745f0611fb13ac67396 /sandbox/travelsample/car-contribution/src/scatours/car/CarImpl.java | |
parent | fcc6917ad657da26eedccadf3e7b8d81d410b6a7 (diff) |
switch components so that the booking component talks directly to the trip suppliers.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@737553 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sandbox/travelsample/car-contribution/src/scatours/car/CarImpl.java | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/sandbox/travelsample/car-contribution/src/scatours/car/CarImpl.java b/sandbox/travelsample/car-contribution/src/scatours/car/CarImpl.java index dd28dc7498..059365a9ab 100644 --- a/sandbox/travelsample/car-contribution/src/scatours/car/CarImpl.java +++ b/sandbox/travelsample/car-contribution/src/scatours/car/CarImpl.java @@ -26,6 +26,7 @@ import org.osoa.sca.annotations.Init; import org.osoa.sca.annotations.Scope; import org.osoa.sca.annotations.Service; +import scatours.common.Book; import scatours.common.Search; import scatours.common.SearchCallback; import scatours.common.TripItem; @@ -35,8 +36,8 @@ import scatours.common.TripLeg; * An implementation of the Hotel service */ @Scope("STATELESS") -@Service(interfaces={Search.class}) -public class CarImpl implements Search { +@Service(interfaces={Search.class, Book.class}) +public class CarImpl implements Search, Book { private List<CarInfo> cars = new ArrayList<CarInfo>(); @@ -47,19 +48,19 @@ public class CarImpl implements Search { public void init() { cars.add(new CarInfo("Premier Cars", "BMW 5 Series", - "ANU", - "06/12/08", + "FLR", + "06/12/09", "5", 100.00, - "USD", + "EUR", "http://localhost:8085/tbd" )); cars.add(new CarInfo("Premier Cars", "Ford Focus", - "ANU", - "06/12/08", + "FLR", + "06/12/09", "4", 60.00, - "USD", + "EUR", "http://localhost:8085/tbd" )); } @@ -71,7 +72,7 @@ public class CarImpl implements Search { if (car.getLocation().equals(tripLeg.getToLocation())){ TripItem item = new TripItem("", "", - "Car", + TripItem.CAR, car.getName(), car.getDescription(), car.getLocation(), @@ -92,4 +93,8 @@ public class CarImpl implements Search { // return available hotels searchCallback.searchResults(searchSynch(tripLeg)); } + + public String book(TripItem tripItem) { + return "car1"; + } } |