001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for ShoppingCoupon. This utility wraps
024     * {@link com.liferay.portlet.shopping.service.impl.ShoppingCouponServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ShoppingCouponService
032     * @see com.liferay.portlet.shopping.service.base.ShoppingCouponServiceBaseImpl
033     * @see com.liferay.portlet.shopping.service.impl.ShoppingCouponServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ShoppingCouponServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.shopping.service.impl.ShoppingCouponServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
044                    java.lang.String code, boolean autoCode, java.lang.String name,
045                    java.lang.String description, int startDateMonth, int startDateDay,
046                    int startDateYear, int startDateHour, int startDateMinute,
047                    int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
048                    int endDateMinute, boolean neverExpire, boolean active,
049                    java.lang.String limitCategories, java.lang.String limitSkus,
050                    double minOrder, double discount, java.lang.String discountType,
051                    com.liferay.portal.service.ServiceContext serviceContext)
052                    throws com.liferay.portal.kernel.exception.PortalException {
053                    return getService()
054                                       .addCoupon(code, autoCode, name, description,
055                            startDateMonth, startDateDay, startDateYear, startDateHour,
056                            startDateMinute, endDateMonth, endDateDay, endDateYear,
057                            endDateHour, endDateMinute, neverExpire, active, limitCategories,
058                            limitSkus, minOrder, discount, discountType, serviceContext);
059            }
060    
061            public static void deleteCoupon(long groupId, long couponId)
062                    throws com.liferay.portal.kernel.exception.PortalException {
063                    getService().deleteCoupon(groupId, couponId);
064            }
065    
066            /**
067            * Returns the Spring bean ID for this bean.
068            *
069            * @return the Spring bean ID for this bean
070            */
071            public static java.lang.String getBeanIdentifier() {
072                    return getService().getBeanIdentifier();
073            }
074    
075            public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
076                    long groupId, long couponId)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    return getService().getCoupon(groupId, couponId);
079            }
080    
081            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
082                    long groupId, long companyId, java.lang.String code, boolean active,
083                    java.lang.String discountType, boolean andOperator, int start, int end)
084                    throws com.liferay.portal.kernel.exception.PortalException {
085                    return getService()
086                                       .search(groupId, companyId, code, active, discountType,
087                            andOperator, start, end);
088            }
089    
090            /**
091            * Sets the Spring bean ID for this bean.
092            *
093            * @param beanIdentifier the Spring bean ID for this bean
094            */
095            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
096                    getService().setBeanIdentifier(beanIdentifier);
097            }
098    
099            public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
100                    long couponId, java.lang.String name, java.lang.String description,
101                    int startDateMonth, int startDateDay, int startDateYear,
102                    int startDateHour, int startDateMinute, int endDateMonth,
103                    int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
104                    boolean neverExpire, boolean active, java.lang.String limitCategories,
105                    java.lang.String limitSkus, double minOrder, double discount,
106                    java.lang.String discountType,
107                    com.liferay.portal.service.ServiceContext serviceContext)
108                    throws com.liferay.portal.kernel.exception.PortalException {
109                    return getService()
110                                       .updateCoupon(couponId, name, description, startDateMonth,
111                            startDateDay, startDateYear, startDateHour, startDateMinute,
112                            endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute,
113                            neverExpire, active, limitCategories, limitSkus, minOrder,
114                            discount, discountType, serviceContext);
115            }
116    
117            public static ShoppingCouponService getService() {
118                    if (_service == null) {
119                            _service = (ShoppingCouponService)PortalBeanLocatorUtil.locate(ShoppingCouponService.class.getName());
120    
121                            ReferenceRegistry.registerReference(ShoppingCouponServiceUtil.class,
122                                    "_service");
123                    }
124    
125                    return _service;
126            }
127    
128            /**
129             * @deprecated As of 6.2.0
130             */
131            @Deprecated
132            public void setService(ShoppingCouponService service) {
133            }
134    
135            private static ShoppingCouponService _service;
136    }