001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the shopping order remote service. This utility wraps {@link com.liferay.portlet.shopping.service.impl.ShoppingOrderServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see ShoppingOrderService
030     * @see com.liferay.portlet.shopping.service.base.ShoppingOrderServiceBaseImpl
031     * @see com.liferay.portlet.shopping.service.impl.ShoppingOrderServiceImpl
032     * @generated
033     */
034    public class ShoppingOrderServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.shopping.service.impl.ShoppingOrderServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static void completeOrder(long groupId, java.lang.String number,
041                    java.lang.String ppTxnId, java.lang.String ppPaymentStatus,
042                    double ppPaymentGross, java.lang.String ppReceiverEmail,
043                    java.lang.String ppPayerEmail,
044                    com.liferay.portal.service.ServiceContext serviceContext)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService()
048                            .completeOrder(groupId, number, ppTxnId, ppPaymentStatus,
049                            ppPaymentGross, ppReceiverEmail, ppPayerEmail, serviceContext);
050            }
051    
052            public static void deleteOrder(long groupId, long orderId)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    getService().deleteOrder(groupId, orderId);
056            }
057    
058            public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
059                    long groupId, long orderId)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().getOrder(groupId, orderId);
063            }
064    
065            public static void sendEmail(long groupId, long orderId,
066                    java.lang.String emailType,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    getService().sendEmail(groupId, orderId, emailType, serviceContext);
071            }
072    
073            public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
074                    long groupId, long orderId, java.lang.String ppTxnId,
075                    java.lang.String ppPaymentStatus, double ppPaymentGross,
076                    java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    return getService()
080                                       .updateOrder(groupId, orderId, ppTxnId, ppPaymentStatus,
081                            ppPaymentGross, ppReceiverEmail, ppPayerEmail);
082            }
083    
084            public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
085                    long groupId, long orderId, java.lang.String billingFirstName,
086                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
087                    java.lang.String billingCompany, java.lang.String billingStreet,
088                    java.lang.String billingCity, java.lang.String billingState,
089                    java.lang.String billingZip, java.lang.String billingCountry,
090                    java.lang.String billingPhone, boolean shipToBilling,
091                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
092                    java.lang.String shippingEmailAddress,
093                    java.lang.String shippingCompany, java.lang.String shippingStreet,
094                    java.lang.String shippingCity, java.lang.String shippingState,
095                    java.lang.String shippingZip, java.lang.String shippingCountry,
096                    java.lang.String shippingPhone, java.lang.String ccName,
097                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
098                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.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    }