1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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 groupId, 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.kernel.exception.PortalException,
45              com.liferay.portal.kernel.exception.SystemException {
46          getService()
47              .completeOrder(groupId, number, ppTxnId, ppPaymentStatus,
48              ppPaymentGross, ppReceiverEmail, ppPayerEmail);
49      }
50  
51      public static void deleteOrder(long groupId, long orderId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteOrder(groupId, orderId);
55      }
56  
57      public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
58          long groupId, long orderId)
59          throws com.liferay.portal.kernel.exception.PortalException,
60              com.liferay.portal.kernel.exception.SystemException {
61          return getService().getOrder(groupId, orderId);
62      }
63  
64      public static void sendEmail(long groupId, long orderId,
65          java.lang.String emailType)
66          throws com.liferay.portal.kernel.exception.PortalException,
67              com.liferay.portal.kernel.exception.SystemException {
68          getService().sendEmail(groupId, orderId, emailType);
69      }
70  
71      public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
72          long groupId, 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.kernel.exception.PortalException,
76              com.liferay.portal.kernel.exception.SystemException {
77          return getService()
78                     .updateOrder(groupId, orderId, ppTxnId, ppPaymentStatus,
79              ppPaymentGross, ppReceiverEmail, ppPayerEmail);
80      }
81  
82      public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
83          long groupId, 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.kernel.exception.PortalException,
98              com.liferay.portal.kernel.exception.SystemException {
99          return getService()
100                    .updateOrder(groupId, 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 }