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