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