001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * 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.
021     *
022     * <p>
023     * 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.
024     * </p>
025     *
026     * <p>
027     * 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.
028     * </p>
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    public class ShoppingCouponServiceUtil {
037            public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
038                    java.lang.String code, boolean autoCode, java.lang.String name,
039                    java.lang.String description, int startDateMonth, int startDateDay,
040                    int startDateYear, int startDateHour, int startDateMinute,
041                    int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
042                    int endDateMinute, boolean neverExpire, boolean active,
043                    java.lang.String limitCategories, java.lang.String limitSkus,
044                    double minOrder, double discount, java.lang.String discountType,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    return getService()
049                                       .addCoupon(code, autoCode, name, description,
050                            startDateMonth, startDateDay, startDateYear, startDateHour,
051                            startDateMinute, endDateMonth, endDateDay, endDateYear,
052                            endDateHour, endDateMinute, neverExpire, active, limitCategories,
053                            limitSkus, minOrder, discount, discountType, serviceContext);
054            }
055    
056            public static void deleteCoupon(long groupId, long couponId)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    getService().deleteCoupon(groupId, couponId);
060            }
061    
062            public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
063                    long groupId, long couponId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService().getCoupon(groupId, couponId);
067            }
068    
069            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
070                    long groupId, long companyId, java.lang.String code, boolean active,
071                    java.lang.String discountType, boolean andOperator, int start, int end)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService()
075                                       .search(groupId, companyId, code, active, discountType,
076                            andOperator, start, end);
077            }
078    
079            public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
080                    long couponId, java.lang.String name, java.lang.String description,
081                    int startDateMonth, int startDateDay, int startDateYear,
082                    int startDateHour, int startDateMinute, int endDateMonth,
083                    int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
084                    boolean neverExpire, boolean active, java.lang.String limitCategories,
085                    java.lang.String limitSkus, double minOrder, double discount,
086                    java.lang.String discountType,
087                    com.liferay.portal.service.ServiceContext serviceContext)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService()
091                                       .updateCoupon(couponId, name, description, startDateMonth,
092                            startDateDay, startDateYear, startDateHour, startDateMinute,
093                            endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute,
094                            neverExpire, active, limitCategories, limitSkus, minOrder,
095                            discount, discountType, serviceContext);
096            }
097    
098            public static ShoppingCouponService getService() {
099                    if (_service == null) {
100                            _service = (ShoppingCouponService)PortalBeanLocatorUtil.locate(ShoppingCouponService.class.getName());
101                    }
102    
103                    return _service;
104            }
105    
106            public void setService(ShoppingCouponService service) {
107                    _service = service;
108            }
109    
110            private static ShoppingCouponService _service;
111    }