001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.shopping.service;
022:
023: /**
024: * <a href="ShoppingOrderServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.shopping.service.ShoppingOrderService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.shopping.service.ShoppingOrderServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.shopping.service.ShoppingOrderService
047: * @see com.liferay.portlet.shopping.service.ShoppingOrderServiceFactory
048: *
049: */
050: public class ShoppingOrderServiceUtil {
051: public static void completeOrder(long plid,
052: java.lang.String number, java.lang.String ppTxnId,
053: java.lang.String ppPaymentStatus, double ppPaymentGross,
054: java.lang.String ppReceiverEmail,
055: java.lang.String ppPayerEmail)
056: throws com.liferay.portal.PortalException,
057: com.liferay.portal.SystemException,
058: java.rmi.RemoteException {
059: ShoppingOrderService shoppingOrderService = ShoppingOrderServiceFactory
060: .getService();
061:
062: shoppingOrderService.completeOrder(plid, number, ppTxnId,
063: ppPaymentStatus, ppPaymentGross, ppReceiverEmail,
064: ppPayerEmail);
065: }
066:
067: public static void deleteOrder(long plid, long orderId)
068: throws com.liferay.portal.PortalException,
069: com.liferay.portal.SystemException,
070: java.rmi.RemoteException {
071: ShoppingOrderService shoppingOrderService = ShoppingOrderServiceFactory
072: .getService();
073:
074: shoppingOrderService.deleteOrder(plid, orderId);
075: }
076:
077: public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
078: long plid, long orderId)
079: throws com.liferay.portal.PortalException,
080: com.liferay.portal.SystemException,
081: java.rmi.RemoteException {
082: ShoppingOrderService shoppingOrderService = ShoppingOrderServiceFactory
083: .getService();
084:
085: return shoppingOrderService.getOrder(plid, orderId);
086: }
087:
088: public static void sendEmail(long plid, long orderId,
089: java.lang.String emailType)
090: throws com.liferay.portal.PortalException,
091: com.liferay.portal.SystemException,
092: java.rmi.RemoteException {
093: ShoppingOrderService shoppingOrderService = ShoppingOrderServiceFactory
094: .getService();
095:
096: shoppingOrderService.sendEmail(plid, orderId, emailType);
097: }
098:
099: public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
100: long plid, long orderId, java.lang.String billingFirstName,
101: java.lang.String billingLastName,
102: java.lang.String billingEmailAddress,
103: java.lang.String billingCompany,
104: java.lang.String billingStreet,
105: java.lang.String billingCity,
106: java.lang.String billingState, java.lang.String billingZip,
107: java.lang.String billingCountry,
108: java.lang.String billingPhone, boolean shipToBilling,
109: java.lang.String shippingFirstName,
110: java.lang.String shippingLastName,
111: java.lang.String shippingEmailAddress,
112: java.lang.String shippingCompany,
113: java.lang.String shippingStreet,
114: java.lang.String shippingCity,
115: java.lang.String shippingState,
116: java.lang.String shippingZip,
117: java.lang.String shippingCountry,
118: java.lang.String shippingPhone, java.lang.String ccName,
119: java.lang.String ccType, java.lang.String ccNumber,
120: int ccExpMonth, int ccExpYear,
121: java.lang.String ccVerNumber, java.lang.String comments)
122: throws com.liferay.portal.PortalException,
123: com.liferay.portal.SystemException,
124: java.rmi.RemoteException {
125: ShoppingOrderService shoppingOrderService = ShoppingOrderServiceFactory
126: .getService();
127:
128: return shoppingOrderService.updateOrder(plid, orderId,
129: billingFirstName, billingLastName, billingEmailAddress,
130: billingCompany, billingStreet, billingCity,
131: billingState, billingZip, billingCountry, billingPhone,
132: shipToBilling, shippingFirstName, shippingLastName,
133: shippingEmailAddress, shippingCompany, shippingStreet,
134: shippingCity, shippingState, shippingZip,
135: shippingCountry, shippingPhone, ccName, ccType,
136: ccNumber, ccExpMonth, ccExpYear, ccVerNumber, comments);
137: }
138:
139: public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
140: long plid, long orderId, java.lang.String ppTxnId,
141: java.lang.String ppPaymentStatus, double ppPaymentGross,
142: java.lang.String ppReceiverEmail,
143: java.lang.String ppPayerEmail)
144: throws com.liferay.portal.PortalException,
145: com.liferay.portal.SystemException,
146: java.rmi.RemoteException {
147: ShoppingOrderService shoppingOrderService = ShoppingOrderServiceFactory
148: .getService();
149:
150: return shoppingOrderService.updateOrder(plid, orderId, ppTxnId,
151: ppPaymentStatus, ppPaymentGross, ppReceiverEmail,
152: ppPayerEmail);
153: }
154: }
|