Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SellingPresentationController {
- private BuyTicketController buyTicketC;
- private SeachPerformanceController searchPerformancesC;
- private AvailabilityOfPerformanceController availabilityOfPerformanceC;
- /**
- * Shows initial input form.
- * view: VSelectShowAndDate
- */
- public Result index(Params params) { }
- /**
- * Searchs performances and shows the results (performances and sessions)
- * view: VPerformanceInformation
- */
- public Result searchPerformance(Params params) { }
- /**
- * Shows form where user introduces the number of tickets he wants.
- * view: VNbEspectarorsInformation
- */
- public Result performanceSelection(Params params) { }
- /**
- * Checks wether the performance has enough seats left or not.
- * If it has enough seats, shows seats map
- * view: VAvailabilityOfSeats
- */
- public Result availabilityOfPerformance(Params params) { }
- /**
- * Checks availability of selected seats and shows payment form.
- * view: VPaymentData
- */
- public Result reserveSeats(Params params) { }
- /**
- * Calculates price and shows confirmation form with the final prize.
- * view: VConfirmPayment
- */
- public Result paymentDataInput(Params params) { }
- /**
- * Cancels payment proccess
- */
- public Result cancel(Params params) { }
- /**
- * Extracts seats information from params.
- * Returns Integer[number_of_seats][2]
- */
- private Integer[][] getSelectedSeats(Params params) { }
- /**
- * Proccess payment and shows ticket information
- * view: VTicketInformation
- */
- public Result confirmPayment(Params params) {
- // The domain controller already has all the information
- // about the payment, we just need to confirm it so
- // it will be stored.
- Ticket ticket = buyTicketC.confirmPayment();
- Result result = new Result('VTicketInformation');
- result.set('ticketID', ticket.getIdentifier());
- return result;
- }
- }
Add Comment
Please, Sign In to add comment