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  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="ShoppingOrderServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link ShoppingOrderService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       ShoppingOrderService
39   * @generated
40   */
41  public class ShoppingOrderServiceUtil {
42      public static void completeOrder(long groupId, java.lang.String number,
43          java.lang.String ppTxnId, java.lang.String ppPaymentStatus,
44          double ppPaymentGross, java.lang.String ppReceiverEmail,
45          java.lang.String ppPayerEmail)
46          throws com.liferay.portal.PortalException,
47              com.liferay.portal.SystemException {
48          getService()
49              .completeOrder(groupId, number, ppTxnId, ppPaymentStatus,
50              ppPaymentGross, ppReceiverEmail, ppPayerEmail);
51      }
52  
53      public static void deleteOrder(long groupId, long orderId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteOrder(groupId, orderId);
57      }
58  
59      public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
60          long groupId, long orderId)
61          throws com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException {
63          return getService().getOrder(groupId, orderId);
64      }
65  
66      public static void sendEmail(long groupId, long orderId,
67          java.lang.String emailType)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException {
70          getService().sendEmail(groupId, orderId, emailType);
71      }
72  
73      public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
74          long groupId, long orderId, java.lang.String ppTxnId,
75          java.lang.String ppPaymentStatus, double ppPaymentGross,
76          java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          return getService()
80                     .updateOrder(groupId, orderId, ppTxnId, ppPaymentStatus,
81              ppPaymentGross, ppReceiverEmail, ppPayerEmail);
82      }
83  
84      public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
85          long groupId, long orderId, java.lang.String billingFirstName,
86          java.lang.String billingLastName, java.lang.String billingEmailAddress,
87          java.lang.String billingCompany, java.lang.String billingStreet,
88          java.lang.String billingCity, java.lang.String billingState,
89          java.lang.String billingZip, java.lang.String billingCountry,
90          java.lang.String billingPhone, boolean shipToBilling,
91          java.lang.String shippingFirstName, java.lang.String shippingLastName,
92          java.lang.String shippingEmailAddress,
93          java.lang.String shippingCompany, java.lang.String shippingStreet,
94          java.lang.String shippingCity, java.lang.String shippingState,
95          java.lang.String shippingZip, java.lang.String shippingCountry,
96          java.lang.String shippingPhone, java.lang.String ccName,
97          java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
98          int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException {
101         return getService()
102                    .updateOrder(groupId, orderId, billingFirstName,
103             billingLastName, billingEmailAddress, billingCompany,
104             billingStreet, billingCity, billingState, billingZip,
105             billingCountry, billingPhone, shipToBilling, shippingFirstName,
106             shippingLastName, shippingEmailAddress, shippingCompany,
107             shippingStreet, shippingCity, shippingState, shippingZip,
108             shippingCountry, shippingPhone, ccName, ccType, ccNumber,
109             ccExpMonth, ccExpYear, ccVerNumber, comments);
110     }
111 
112     public static ShoppingOrderService getService() {
113         if (_service == null) {
114             _service = (ShoppingOrderService)PortalBeanLocatorUtil.locate(ShoppingOrderService.class.getName());
115 
116             ReferenceRegistry.registerReference(ShoppingOrderServiceUtil.class,
117                 "_service");
118             MethodCache.remove(ShoppingOrderService.class);
119         }
120 
121         return _service;
122     }
123 
124     public void setService(ShoppingOrderService service) {
125         MethodCache.remove(ShoppingOrderService.class);
126 
127         _service = service;
128 
129         ReferenceRegistry.registerReference(ShoppingOrderServiceUtil.class,
130             "_service");
131         MethodCache.remove(ShoppingOrderService.class);
132     }
133 
134     private static ShoppingOrderService _service;
135 }