001    /**
002     * Copyright (c) 2000-2011 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                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    getService()
047                            .completeOrder(groupId, number, ppTxnId, ppPaymentStatus,
048                            ppPaymentGross, ppReceiverEmail, ppPayerEmail);
049            }
050    
051            public static void deleteOrder(long groupId, long orderId)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException {
054                    getService().deleteOrder(groupId, orderId);
055            }
056    
057            public static com.liferay.portlet.shopping.model.ShoppingOrder getOrder(
058                    long groupId, long orderId)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    return getService().getOrder(groupId, orderId);
062            }
063    
064            public static void sendEmail(long groupId, long orderId,
065                    java.lang.String emailType)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    getService().sendEmail(groupId, orderId, emailType);
069            }
070    
071            public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
072                    long groupId, long orderId, java.lang.String ppTxnId,
073                    java.lang.String ppPaymentStatus, double ppPaymentGross,
074                    java.lang.String ppReceiverEmail, java.lang.String ppPayerEmail)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    return getService()
078                                       .updateOrder(groupId, orderId, ppTxnId, ppPaymentStatus,
079                            ppPaymentGross, ppReceiverEmail, ppPayerEmail);
080            }
081    
082            public static com.liferay.portlet.shopping.model.ShoppingOrder updateOrder(
083                    long groupId, long orderId, java.lang.String billingFirstName,
084                    java.lang.String billingLastName, java.lang.String billingEmailAddress,
085                    java.lang.String billingCompany, java.lang.String billingStreet,
086                    java.lang.String billingCity, java.lang.String billingState,
087                    java.lang.String billingZip, java.lang.String billingCountry,
088                    java.lang.String billingPhone, boolean shipToBilling,
089                    java.lang.String shippingFirstName, java.lang.String shippingLastName,
090                    java.lang.String shippingEmailAddress,
091                    java.lang.String shippingCompany, java.lang.String shippingStreet,
092                    java.lang.String shippingCity, java.lang.String shippingState,
093                    java.lang.String shippingZip, java.lang.String shippingCountry,
094                    java.lang.String shippingPhone, java.lang.String ccName,
095                    java.lang.String ccType, java.lang.String ccNumber, int ccExpMonth,
096                    int ccExpYear, java.lang.String ccVerNumber, java.lang.String comments)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    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                            ReferenceRegistry.registerReference(ShoppingOrderServiceUtil.class,
115                                    "_service");
116                            MethodCache.remove(ShoppingOrderService.class);
117                    }
118    
119                    return _service;
120            }
121    
122            public void setService(ShoppingOrderService service) {
123                    MethodCache.remove(ShoppingOrderService.class);
124    
125                    _service = service;
126    
127                    ReferenceRegistry.registerReference(ShoppingOrderServiceUtil.class,
128                            "_service");
129                    MethodCache.remove(ShoppingOrderService.class);
130            }
131    
132            private static ShoppingOrderService _service;
133    }