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 plid, 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, java.rmi.RemoteException {
53          getService()
54              .completeOrder(plid, number, ppTxnId, ppPaymentStatus,
55              ppPaymentGross, ppReceiverEmail, ppPayerEmail);
56      }
57  
58      public static void deleteOrder(long plid, long orderId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException, java.rmi.RemoteException {
61          getService().deleteOrder(plid, orderId);
62      }
63  
64      public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
65          long plid, long orderId)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          return getService().getOrder(plid, orderId);
69      }
70  
71      public static void sendEmail(long plid, long orderId,
72          java.lang.String emailType)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException, java.rmi.RemoteException {
75          getService().sendEmail(plid, orderId, emailType);
76      }
77  
78      public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
79          long plid, long orderId, java.lang.String billingFirstName,
80          java.lang.String billingLastName, java.lang.String billingEmailAddress,
81          java.lang.String billingCompany, java.lang.String billingStreet,
82          java.lang.String billingCity, java.lang.String billingState,
83          java.lang.String billingZip, java.lang.String billingCountry,
84          java.lang.String billingPhone, boolean shipToBilling,
85          java.lang.String shippingFirstName, java.lang.String shippingLastName,
86          java.lang.String shippingEmailAddress,
87          java.lang.String shippingCompany, java.lang.String shippingStreet,
88          java.lang.String shippingCity, java.lang.String shippingState,
89          java.lang.String shippingZip, java.lang.String shippingCountry,
90          java.lang.String shippingPhone, java.lang.String ccName,
91          java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
92          int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException, java.rmi.RemoteException {
95          return getService()
96                     .updateOrder(plid, orderId, billingFirstName,
97              billingLastName, billingEmailAddress, billingCompany,
98              billingStreet, billingCity, billingState, billingZip,
99              billingCountry, billingPhone, shipToBilling, shippingFirstName,
100             shippingLastName, shippingEmailAddress, shippingCompany,
101             shippingStreet, shippingCity, shippingState, shippingZip,
102             shippingCountry, shippingPhone, ccName, ccType, ccNumber,
103             ccExpMonth, ccExpYear, ccVerNumber, comments);
104     }
105 
106     public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
107         long plid, long orderId, java.lang.String ppTxnId,
108         java.lang.String ppPaymentStatus, double ppPaymentGross,
109         java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException, java.rmi.RemoteException {
112         return getService()
113                    .updateOrder(plid, orderId, ppTxnId, ppPaymentStatus,
114             ppPaymentGross, ppReceiverEmail, ppPayerEmail);
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 }