001    /**
002     * Copyright (c) 2000-2013 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    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
063                    java.lang.String code, boolean autoCode, java.lang.String name,
064                    java.lang.String description, int startDateMonth, int startDateDay,
065                    int startDateYear, int startDateHour, int startDateMinute,
066                    int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
067                    int endDateMinute, boolean neverExpire, boolean active,
068                    java.lang.String limitCategories, java.lang.String limitSkus,
069                    double minOrder, double discount, java.lang.String discountType,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService()
074                                       .addCoupon(code, autoCode, name, description,
075                            startDateMonth, startDateDay, startDateYear, startDateHour,
076                            startDateMinute, endDateMonth, endDateDay, endDateYear,
077                            endDateHour, endDateMinute, neverExpire, active, limitCategories,
078                            limitSkus, minOrder, discount, discountType, serviceContext);
079            }
080    
081            public static void deleteCoupon(long groupId, long couponId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    getService().deleteCoupon(groupId, couponId);
085            }
086    
087            public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
088                    long groupId, long couponId)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService().getCoupon(groupId, couponId);
092            }
093    
094            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
095                    long groupId, long companyId, java.lang.String code, boolean active,
096                    java.lang.String discountType, boolean andOperator, int start, int end)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    return getService()
100                                       .search(groupId, companyId, code, active, discountType,
101                            andOperator, start, end);
102            }
103    
104            public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
105                    long couponId, java.lang.String name, java.lang.String description,
106                    int startDateMonth, int startDateDay, int startDateYear,
107                    int startDateHour, int startDateMinute, int endDateMonth,
108                    int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
109                    boolean neverExpire, boolean active, java.lang.String limitCategories,
110                    java.lang.String limitSkus, double minOrder, double discount,
111                    java.lang.String discountType,
112                    com.liferay.portal.service.ServiceContext serviceContext)
113                    throws com.liferay.portal.kernel.exception.PortalException,
114                            com.liferay.portal.kernel.exception.SystemException {
115                    return getService()
116                                       .updateCoupon(couponId, name, description, startDateMonth,
117                            startDateDay, startDateYear, startDateHour, startDateMinute,
118                            endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute,
119                            neverExpire, active, limitCategories, limitSkus, minOrder,
120                            discount, discountType, serviceContext);
121            }
122    
123            public static ShoppingCouponService getService() {
124                    if (_service == null) {
125                            _service = (ShoppingCouponService)PortalBeanLocatorUtil.locate(ShoppingCouponService.class.getName());
126    
127                            ReferenceRegistry.registerReference(ShoppingCouponServiceUtil.class,
128                                    "_service");
129                    }
130    
131                    return _service;
132            }
133    
134            /**
135             * @deprecated As of 6.2.0
136             */
137            public void setService(ShoppingCouponService service) {
138            }
139    
140            private static ShoppingCouponService _service;
141    }