001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class ShoppingCouponServiceUtil {
033 public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
034 java.lang.String code, boolean autoCode, java.lang.String name,
035 java.lang.String description, int startDateMonth, int startDateDay,
036 int startDateYear, int startDateHour, int startDateMinute,
037 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
038 int endDateMinute, boolean neverExpire, boolean active,
039 java.lang.String limitCategories, java.lang.String limitSkus,
040 double minOrder, double discount, java.lang.String discountType,
041 com.liferay.portal.service.ServiceContext serviceContext)
042 throws com.liferay.portal.kernel.exception.PortalException,
043 com.liferay.portal.kernel.exception.SystemException {
044 return getService()
045 .addCoupon(code, autoCode, name, description,
046 startDateMonth, startDateDay, startDateYear, startDateHour,
047 startDateMinute, endDateMonth, endDateDay, endDateYear,
048 endDateHour, endDateMinute, neverExpire, active, limitCategories,
049 limitSkus, minOrder, discount, discountType, serviceContext);
050 }
051
052 public static void deleteCoupon(long groupId, long couponId)
053 throws com.liferay.portal.kernel.exception.PortalException,
054 com.liferay.portal.kernel.exception.SystemException {
055 getService().deleteCoupon(groupId, couponId);
056 }
057
058 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
059 long groupId, long couponId)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 return getService().getCoupon(groupId, couponId);
063 }
064
065 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
066 long groupId, long companyId, java.lang.String code, boolean active,
067 java.lang.String discountType, boolean andOperator, int start, int end)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 return getService()
071 .search(groupId, companyId, code, active, discountType,
072 andOperator, start, end);
073 }
074
075 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
076 long couponId, java.lang.String name, java.lang.String description,
077 int startDateMonth, int startDateDay, int startDateYear,
078 int startDateHour, int startDateMinute, int endDateMonth,
079 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
080 boolean neverExpire, boolean active, java.lang.String limitCategories,
081 java.lang.String limitSkus, double minOrder, double discount,
082 java.lang.String discountType,
083 com.liferay.portal.service.ServiceContext serviceContext)
084 throws com.liferay.portal.kernel.exception.PortalException,
085 com.liferay.portal.kernel.exception.SystemException {
086 return getService()
087 .updateCoupon(couponId, name, description, startDateMonth,
088 startDateDay, startDateYear, startDateHour, startDateMinute,
089 endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute,
090 neverExpire, active, limitCategories, limitSkus, minOrder,
091 discount, discountType, serviceContext);
092 }
093
094 public static ShoppingCouponService getService() {
095 if (_service == null) {
096 _service = (ShoppingCouponService)PortalBeanLocatorUtil.locate(ShoppingCouponService.class.getName());
097 }
098
099 return _service;
100 }
101
102 public void setService(ShoppingCouponService service) {
103 _service = service;
104 }
105
106 private static ShoppingCouponService _service;
107 }