1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.shopping.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="ShoppingOrderServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link ShoppingOrderService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       ShoppingOrderService
37   * @generated
38   */
39  public class ShoppingOrderServiceUtil {
40      public static void completeOrder(long plid, java.lang.String number,
41          java.lang.String ppTxnId, java.lang.String ppPaymentStatus,
42          double ppPaymentGross, java.lang.String ppReceiverEmail,
43          java.lang.String ppPayerEmail)
44          throws com.liferay.portal.PortalException,
45              com.liferay.portal.SystemException, java.rmi.RemoteException {
46          getService()
47              .completeOrder(plid, number, ppTxnId, ppPaymentStatus,
48              ppPaymentGross, ppReceiverEmail, ppPayerEmail);
49      }
50  
51      public static void deleteOrder(long plid, long orderId)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException, java.rmi.RemoteException {
54          getService().deleteOrder(plid, orderId);
55      }
56  
57      public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
58          long plid, long orderId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException, java.rmi.RemoteException {
61          return getService().getOrder(plid, orderId);
62      }
63  
64      public static void sendEmail(long plid, long orderId,
65          java.lang.String emailType)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          getService().sendEmail(plid, orderId, emailType);
69      }
70  
71      public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
72          long plid, long orderId, java.lang.String ppTxnId,
73          java.lang.String ppPaymentStatus, double ppPaymentGross,
74          java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException, java.rmi.RemoteException {
77          return getService()
78                     .updateOrder(plid, orderId, ppTxnId, ppPaymentStatus,
79              ppPaymentGross, ppReceiverEmail, ppPayerEmail);
80      }
81  
82      public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
83          long plid, long orderId, java.lang.String billingFirstName,
84          java.lang.String billingLastName, java.lang.String billingEmailAddress,
85          java.lang.String billingCompany, java.lang.String billingStreet,
86          java.lang.String billingCity, java.lang.String billingState,
87          java.lang.String billingZip, java.lang.String billingCountry,
88          java.lang.String billingPhone, boolean shipToBilling,
89          java.lang.String shippingFirstName, java.lang.String shippingLastName,
90          java.lang.String shippingEmailAddress,
91          java.lang.String shippingCompany, java.lang.String shippingStreet,
92          java.lang.String shippingCity, java.lang.String shippingState,
93          java.lang.String shippingZip, java.lang.String shippingCountry,
94          java.lang.String shippingPhone, java.lang.String ccName,
95          java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
96          int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException, java.rmi.RemoteException {
99          return getService()
100                    .updateOrder(plid, orderId, billingFirstName,
101             billingLastName, billingEmailAddress, billingCompany,
102             billingStreet, billingCity, billingState, billingZip,
103             billingCountry, billingPhone, shipToBilling, shippingFirstName,
104             shippingLastName, shippingEmailAddress, shippingCompany,
105             shippingStreet, shippingCity, shippingState, shippingZip,
106             shippingCountry, shippingPhone, ccName, ccType, ccNumber,
107             ccExpMonth, ccExpYear, ccVerNumber, comments);
108     }
109 
110     public static ShoppingOrderService getService() {
111         if (_service == null) {
112             _service = (ShoppingOrderService)PortalBeanLocatorUtil.locate(ShoppingOrderService.class.getName());
113         }
114 
115         return _service;
116     }
117 
118     public void setService(ShoppingOrderService service) {
119         _service = service;
120     }
121 
122     private static ShoppingOrderService _service;
123 }