Guest User

Untitled

a guest
Apr 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. public class SellingPresentationController {
  2. private BuyTicketController buyTicketC;
  3. private SeachPerformanceController searchPerformancesC;
  4. private AvailabilityOfPerformanceController availabilityOfPerformanceC;
  5.  
  6. /**
  7. * Shows initial input form.
  8. * view: VSelectShowAndDate
  9. */
  10. public Result index(Params params) { }
  11.  
  12. /**
  13. * Searchs performances and shows the results (performances and sessions)
  14. * view: VPerformanceInformation
  15. */
  16. public Result searchPerformance(Params params) { }
  17.  
  18. /**
  19. * Shows form where user introduces the number of tickets he wants.
  20. * view: VNbEspectarorsInformation
  21. */
  22. public Result performanceSelection(Params params) { }
  23.  
  24. /**
  25. * Checks wether the performance has enough seats left or not.
  26. * If it has enough seats, shows seats map
  27. * view: VAvailabilityOfSeats
  28. */
  29. public Result availabilityOfPerformance(Params params) { }
  30.  
  31. /**
  32. * Checks availability of selected seats and shows payment form.
  33. * view: VPaymentData
  34. */
  35. public Result reserveSeats(Params params) { }
  36.  
  37. /**
  38. * Calculates price and shows confirmation form with the final prize.
  39. * view: VConfirmPayment
  40. */
  41. public Result paymentDataInput(Params params) { }
  42.  
  43. /**
  44. * Cancels payment proccess
  45. */
  46. public Result cancel(Params params) { }
  47.  
  48. /**
  49. * Extracts seats information from params.
  50. * Returns Integer[number_of_seats][2]
  51. */
  52. private Integer[][] getSelectedSeats(Params params) { }
  53.  
  54. /**
  55. * Proccess payment and shows ticket information
  56. * view: VTicketInformation
  57. */
  58. public Result confirmPayment(Params params) {
  59. // The domain controller already has all the information
  60. // about the payment, we just need to confirm it so
  61. // it will be stored.
  62. Ticket ticket = buyTicketC.confirmPayment();
  63.  
  64. Result result = new Result('VTicketInformation');
  65. result.set('ticketID', ticket.getIdentifier());
  66.  
  67. return result;
  68. }
  69. }
Add Comment
Please, Sign In to add comment