亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? checkouthtmlaction.java

?? ejb克斯人隨風俗
?? JAVA
字號:
/* Copyright 2004 Sun Microsystems, Inc. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  - Redistributions of source code must retain the above copyright   notice, this list of conditions and the following disclaimer.  - Redistribution in binary form must reproduce the above copyright   notice, this list of conditions and the following disclaimer in   the documentation and/or other materials provided with the   distribution.  Neither the name of Sun Microsystems, Inc. or the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.  This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  You acknowledge that Software is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility. $Id: CheckoutHTMLAction.java,v 1.2 2003/11/05 22:02:07 smitha Exp $ */package com.sun.j2ee.blueprints.consumerwebsite.actions;import java.io.*;import java.util.*;// j2ee importsimport javax.naming.*;import javax.servlet.http.*;import javax.xml.rpc.*;// WAF importsimport com.sun.j2ee.blueprints.waf.controller.Event;import com.sun.j2ee.blueprints.waf.controller.web.html.*;// signon filter - for the userIdimport com.sun.j2ee.blueprints.signon.web.SignOnFilter;// customer component importsimport com.sun.j2ee.blueprints.customer.*;//adventure importsimport com.sun.j2ee.blueprints.consumerwebsite.*;import com.sun.j2ee.blueprints.consumerwebsite.exceptions.*;// Catalog importsimport com.sun.j2ee.blueprints.catalog.CatalogFacade;/** * Implementation of HTMLAction that processes a * checkout. */public final class CheckoutHTMLAction extends HTMLActionSupport {       public Event perform(HttpServletRequest request)  throws HTMLActionException {                    buildPurchaseOrder(request);        return null;     }        private void buildPurchaseOrder(HttpServletRequest request)         throws HTMLActionException {        HttpSession session = request.getSession();        AdventureComponentManager acm =             (AdventureComponentManager)session.getAttribute(AdventureKeys.COMPONENT_MANAGER);        // get the customer and cart         String userId = (String)request.getSession().getAttribute(SignOnFilter.USER_NAME);        CatalogFacade catalog = acm.getCatalogFacade(session);        CustomerFacade cfacade = acm.getCustomerFacade(session);        Cart cart = acm.getCart(session);        try {            Locale locale = new Locale("en","us");             double totalPrice = 0;            ContactInfo shippingInfo = extractContactInfo(request, "_b");            ContactInfo billingInfo = extractContactInfo(request, "_a");            CreditCard card = new CreditCard();            card.setCardNumber(request.getParameter("credit_card_number"));            card.setCardExpiryDate(request.getParameter("credit_card_month") + "/" + request.getParameter("credit_card_year"));            card.setCardType(request.getParameter("credit_card_name"));            com.sun.j2ee.blueprints.catalog.Lodging lodging = catalog.getLodging(cart.getLodgingId(), locale);            Lodging lodgingPO = new Lodging();            lodgingPO.setLodgingId(lodging.getLodgingId());            lodgingPO.setName(lodging.getName());            lodgingPO.setPricePerNight((new Double(lodging.getPrice())).floatValue());            lodgingPO.setLocation(lodging.getLocation());            lodgingPO.setStartDate(cart.getDepartureDate());            lodgingPO.setEndDate(cart.getReturnDate());            lodgingPO.setNoNights(cart.getLodgingDays());            lodgingPO.setNoRooms(cart.getLodgingRoomCount());            totalPrice += lodging.getPrice();            // set the transportation info            Transportation dF = null;            if (cart.getDepartureFlight() != null) {                dF= new Transportation();                com.sun.j2ee.blueprints.catalog.Transportation departureFlight =                    catalog.getTransportation(cart.getDepartureFlight(), locale);                dF.setTransportationId(departureFlight.getTransportationId());                dF.setCarrier(departureFlight.getCarrier());                dF.setOrigin(departureFlight.getOrigin());                dF.setDestination(departureFlight.getDestination());                dF.setDepartureDate(cart.getDepartureDate());                dF.setDepartureTime(departureFlight.getDepartureTime());                dF.setPrice((new Double(departureFlight.getPrice())).floatValue());                dF.setTravelClass(departureFlight.getTravelClass());                dF.setHeadCount(cart.getHeadCount());                totalPrice += departureFlight.getPrice();            }            Transportation rF = null;            if (cart.getReturnFlight() != null) {                rF = new Transportation();                com.sun.j2ee.blueprints.catalog.Transportation returnFlight =                    catalog.getTransportation(cart.getReturnFlight(), locale);                            rF.setTransportationId(returnFlight.getTransportationId());                rF.setCarrier(returnFlight.getCarrier());                rF.setOrigin(returnFlight.getOrigin());                rF.setDestination(returnFlight.getDestination());                rF.setDepartureDate(cart.getReturnDate());                rF.setDepartureTime(returnFlight.getDepartureTime());                rF.setPrice((new Double(returnFlight.getPrice())).floatValue());                rF.setTravelClass(returnFlight.getTravelClass());                rF.setHeadCount(cart.getHeadCount());                totalPrice += returnFlight.getPrice();            }                        ArrayList poActivities = new ArrayList();            HashMap activities = cart.getActivities();            Iterator it = null;            if (activities != null) {                it = activities.keySet().iterator();                 while ((it != null) && it.hasNext()) {                    String itemId = (String)it.next();                    int headCount = ((Integer)activities.get(itemId)).intValue();                    com.sun.j2ee.blueprints.catalog.Activity item = catalog.getActivity(itemId, locale);                    Activity a1 = new Activity();                    a1.setActivityId(item.getActivityId());                    a1.setName(item.getName());                    a1.setPrice((new Double(item.getPrice())).floatValue());                    a1.setLocation(item.getLocation());                    a1.setStartDate(cart.getDepartureDate());                    a1.setEndDate(cart.getReturnDate());                    a1.setHeadCount(headCount);                    totalPrice += item.getPrice();                    poActivities.add(a1);                }        }       Activity[] myPoActivities = new  Activity[poActivities.size()];       poActivities.toArray(myPoActivities);        //  create a new po        PurchaseOrder mypo = new PurchaseOrder();        String poId = "AB-" +userId + "-" + System.currentTimeMillis();        mypo.setPoId(poId);        mypo.setUserId(userId);        mypo.setEmailId(shippingInfo.getEmail());        mypo.setLocale("US");        mypo.setOrderDate(Calendar.getInstance());        mypo.setShippingInfo(shippingInfo);        mypo.setBillingInfo(billingInfo);        mypo.setTotalPrice((new Double(totalPrice)).floatValue());        mypo.setCreditCard(card);        mypo.setHeadCount(cart.getHeadCount());        mypo.setStartDate(Calendar.getInstance());        mypo.setEndDate(Calendar.getInstance());        mypo.setDepartureCity(cart.getOrigin());        mypo.setActivities(myPoActivities);        mypo.setLodging(lodgingPO);        if (dF != null) mypo.setDepartureFlightInfo(dF);        if (rF != null) mypo.setReturnFlightInfo(rF);        Context ic = new InitialContext();        Service opcPurchaseOrderSvc =          (Service) ic.lookup("java:comp/env/service/OpcPurchaseOrderService");        PurchaseOrderIntf port = (PurchaseOrderIntf)opcPurchaseOrderSvc.getPort(PurchaseOrderIntf.class);  String server = (request.getServerPort() != 0) ?      (request.getServerName()+":"+request.getServerPort()) :    (request.getServerName());        ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,          "http://" + server + "/webservice/PoEndpointBean");        String ret = port.submitPurchaseOrder(mypo);        CheckoutBean checkoutBean = new CheckoutBean(ret);        request.setAttribute(AdventureKeys.CHECKOUT_BEAN, checkoutBean);      } catch (Exception e) {        throw new HTMLActionException("CheckoutHTMLAction Exception : " + e.getMessage(),e);      }        // clear the adventure package        cart.clear();    }          /* parse address form and generate a ContactInfo object */    private ContactInfo extractContactInfo(HttpServletRequest request, String suffix)  throws HTMLActionException {        ArrayList missingFields = null;        String familyName =  request.getParameter("family_name" +suffix).trim();        if (familyName.equals("")) {            if (missingFields == null) {                missingFields = new ArrayList();            }            missingFields.add("Last Name");        }        String givenName =  request.getParameter("given_name" +suffix).trim();        if (givenName.equals("")) {            if (missingFields == null) {                missingFields = new ArrayList();            }            missingFields.add("First Name");        }        String address1 = request.getParameter("address_1" +suffix).trim();        if (address1.equals("")){            if (missingFields == null) {                missingFields = new ArrayList();            }            missingFields.add("Street Address");        }        String address2 = request.getParameter("address_2" +suffix).trim();        if (address2.equals("")) {          address2 = null;        }        String city =   request.getParameter("city"  +suffix).trim();        if (city.equals("")){            if (missingFields == null) {                missingFields = new ArrayList();            }            missingFields.add("City");        }        String stateOrProvince = request.getParameter("state_or_province" +suffix).trim();        if (stateOrProvince.equals("")) {            if (missingFields == null) {                missingFields = new ArrayList();            }            missingFields.add("State or Province" +suffix);        }        String postalCode = request.getParameter("postal_code" +suffix).trim();        if (postalCode.equals("")){            if (missingFields == null) {                missingFields = new ArrayList();            }            missingFields.add("Postal Code");        }        String country = request.getParameter("country" + suffix).trim();        String telephone = request.getParameter("telephone_number" +suffix).trim();        if (telephone.equals("")){            if (missingFields == null) {                missingFields = new ArrayList();            }            missingFields.add("Telephone Number");        }        String email = null;        if (request.getParameter("email"  +suffix) != null) {            email = request.getParameter("email" +suffix).trim();        }        if (missingFields != null) {            MissingFormDataException ex = new MissingFormDataException("Missing Address Data", missingFields);            request.setAttribute(AdventureKeys.MISSING_FORM_DATA_EXCEPTION_KEY, ex);            return null;        }  ContactInfo cInfo = new ContactInfo();  Address addr = new Address();  addr.setStreetName1(address1);  addr.setStreetName2(address2);  addr.setCity(city);  addr.setState(stateOrProvince);  addr.setCountry(country);  addr.setPostalCode(postalCode);  cInfo.setFamilyName(familyName);  cInfo.setGivenName(givenName);  cInfo.setAddress(addr);  cInfo.setEmail(email);  cInfo.setPhone(telephone);  return(cInfo);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品成人一区二区三区夜夜夜| 91香蕉视频污在线| 日韩一区二区在线观看视频 | 91久久免费观看| 一区2区3区在线看| 欧美人伦禁忌dvd放荡欲情| 午夜欧美电影在线观看| 91精品国模一区二区三区| 蜜桃久久久久久久| 国产欧美综合色| 色系网站成人免费| 无吗不卡中文字幕| 久久综合久久鬼色| av电影在线不卡| 亚洲成人免费电影| 久久奇米777| 99久久777色| 午夜国产精品影院在线观看| 欧美tickling挠脚心丨vk| 成人午夜av影视| 樱桃国产成人精品视频| 91麻豆精品国产91久久久久| 国产原创一区二区| 亚洲欧美二区三区| 欧美一级xxx| 国产99久久久国产精品| 亚洲伊人伊色伊影伊综合网| 精品免费视频一区二区| 97成人超碰视| 伦理电影国产精品| 亚洲精品欧美专区| 精品久久99ma| 欧美在线小视频| 国产69精品久久777的优势| 亚洲午夜精品网| 国产欧美在线观看一区| 欧美日韩色综合| 成人美女在线观看| 日韩av网站免费在线| 国产精品欧美精品| 日韩一区二区高清| 欧美三级韩国三级日本一级| 国产aⅴ综合色| 日本亚洲一区二区| 亚洲最新在线观看| 国产精品免费视频观看| 日韩欧美一区电影| 欧美亚洲日本国产| 成人黄色av网站在线| 蜜臀久久99精品久久久久久9| 1024亚洲合集| 国产视频一区在线观看| 日韩一区二区三区在线视频| 色综合天天综合在线视频| 国产69精品久久99不卡| 精品写真视频在线观看| 午夜电影一区二区| 亚洲美女屁股眼交3| 国产亚洲欧美日韩俺去了| 日韩欧美中文字幕公布| 欧美色网站导航| 在线欧美日韩国产| 一本色道久久综合亚洲aⅴ蜜桃| 久久国产乱子精品免费女| 图片区小说区国产精品视频| 亚洲蜜臀av乱码久久精品蜜桃| 久久久精品综合| www激情久久| 欧美一区二区视频在线观看| 欧美男女性生活在线直播观看| 在线视频你懂得一区二区三区| 99视频精品在线| 成人免费视频播放| 国产丶欧美丶日本不卡视频| 国产一区中文字幕| 韩国成人在线视频| 国内不卡的二区三区中文字幕| 久久精品二区亚洲w码| 免费在线视频一区| 青娱乐精品视频| 视频一区中文字幕| 日韩激情一区二区| 男人的天堂亚洲一区| 久久精品免费看| 国产一区 二区| 国产 欧美在线| jlzzjlzz国产精品久久| 91视频在线看| 在线免费视频一区二区| 欧美日本一区二区| 欧美不卡视频一区| 久久久五月婷婷| 国产精品视频第一区| 亚洲品质自拍视频| 午夜精品一区二区三区三上悠亚| 亚洲高清在线视频| 免费成人你懂的| 国产麻豆日韩欧美久久| 夫妻av一区二区| 91片黄在线观看| 欧美伦理电影网| 欧美mv和日韩mv的网站| 欧美激情一区二区三区四区| 亚洲欧洲日韩在线| 亚洲一卡二卡三卡四卡| 蜜臀久久久99精品久久久久久| 国内成+人亚洲+欧美+综合在线| 懂色一区二区三区免费观看| 91久久精品一区二区三| 欧美一区二视频| 久久天堂av综合合色蜜桃网| 自拍偷拍亚洲综合| 日本va欧美va欧美va精品| 国产成人99久久亚洲综合精品| 99久久久久久| 日韩欧美色综合| 中文字幕在线一区二区三区| 亚洲成a人片在线观看中文| 久久97超碰国产精品超碰| 99久久er热在这里只有精品15 | 欧美一区二区女人| 国产精品伦理一区二区| 亚洲成av人片一区二区梦乃| 国产传媒日韩欧美成人| 欧美丝袜自拍制服另类| 久久久亚洲综合| 亚洲高清不卡在线观看| 国产成人免费视频精品含羞草妖精 | 国产亚洲女人久久久久毛片| 亚洲一二三四久久| 韩国三级中文字幕hd久久精品| 色综合视频在线观看| 日韩精品一区国产麻豆| 亚洲免费观看高清完整版在线观看 | 久久激五月天综合精品| 91精彩视频在线观看| 国产亚洲综合性久久久影院| 亚洲国产综合91精品麻豆| 国产在线播放一区| 欧美一区二区三区视频| 亚洲激情一二三区| 国产成人综合亚洲91猫咪| 欧美精品色综合| 日韩一区日韩二区| 国产成人a级片| 欧美不卡在线视频| 首页综合国产亚洲丝袜| 日本二三区不卡| 国产精品动漫网站| 国产麻豆精品视频| 日韩色在线观看| 午夜在线电影亚洲一区| 91在线小视频| 亚洲国产成人一区二区三区| 久久不见久久见中文字幕免费| 欧美日韩一区二区三区四区五区| 国产精品久久久久影视| 国产在线乱码一区二区三区| 91精品国产黑色紧身裤美女| 亚洲一区二区精品视频| 色综合 综合色| 亚洲色图在线看| 成人听书哪个软件好| 国产欧美日本一区二区三区| 精品一区二区免费看| 日韩欧美中文一区二区| 蜜桃av一区二区| 日韩午夜在线观看| 美女在线观看视频一区二区| 欧美一激情一区二区三区| 免费成人结看片| 久久综合色播五月| 国产精品一区一区| 中文字幕乱码日本亚洲一区二区| 国产乱人伦偷精品视频不卡| 国产亚洲一本大道中文在线| 国产91高潮流白浆在线麻豆| 国产日产亚洲精品系列| 成人高清免费观看| 中文字幕在线一区免费| 在线国产亚洲欧美| 亚洲va天堂va国产va久| 6080亚洲精品一区二区| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩一级黄色大片| 国产精一品亚洲二区在线视频| 久久精品视频免费观看| 99久久99久久精品国产片果冻| 一区二区不卡在线视频 午夜欧美不卡在| 欧美日韩亚州综合| 日本不卡视频一二三区| 久久久99久久| 91小视频在线免费看| 午夜伦欧美伦电影理论片| 精品欧美一区二区久久| 成人伦理片在线| 亚洲一区二区三区在线看 | 精品国产免费久久| 粉嫩13p一区二区三区| 亚洲精品久久嫩草网站秘色|