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