1 37 38 package com.sun.j2ee.blueprints.consumerwebsite.handlers; 39 40 import java.io.*; 41 import java.util.*; 42 43 44 import javax.servlet.http.HttpServletRequest ; 46 47 import com.sun.j2ee.blueprints.waf.controller.web.*; 49 50 import com.sun.j2ee.blueprints.consumerwebsite.*; 52 53 58 public class CartFlowHandler implements FlowHandler { 59 60 public void doStart(HttpServletRequest request){ 61 } 62 63 public String processFlow(HttpServletRequest request) 64 throws FlowHandlerException { 65 66 String actionType= (String )request.getParameter("target_action"); 67 if (actionType == null) return "CART"; 68 if (actionType.equals("select_package")) { 71 return "PACKAGE_OPTIONS"; 72 } else if (actionType.equals("set_package_options")) { 73 return "SELECT_TRANSPORT"; 74 } else if (actionType.equals("update_package_options")) { 75 return "CART"; 76 } else if (actionType.equals("update_activities")) { 77 return "CART-ACTIVITIES"; 78 } else if (actionType.equals("purchase_activities")) { 79 return "CART-ACTIVITIES"; 80 } else if (actionType.equals("update_lodging_room_count")) { 81 return "CART-LODGING"; 82 } else if (actionType.equals("purchase_lodging")) { 83 return "CART-LODGING"; 84 } else if (actionType.equals("cancel_return_flight")) { 85 return "CART_TRANSPORT"; 86 } else if (actionType.equals("cancel_departure_flight")) { 87 return "CART_TRANSPORT"; 88 } else if (actionType.equals("purchase_transportation")) { 89 return "CART_TRANSPORT"; 90 } else if (actionType.equals("no_transportation")) { 91 return "CART"; 92 } else if (actionType.equals("purchase_activity")) { 93 return "CART-ACTIVITIES"; 94 } else if (actionType.equals("cancel")) { 95 return "CANCEL"; 96 } else { 97 return "CART"; 98 } 99 } 100 101 102 public void doEnd(HttpServletRequest request) { 103 } 104 105 } 106 107 | Popular Tags |