001
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
036 @ProviderType
037 public class ShoppingCouponServiceUtil {
038
043
044
049 public static java.lang.String getBeanIdentifier() {
050 return getService().getBeanIdentifier();
051 }
052
053
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
137 public void setService(ShoppingCouponService service) {
138 }
139
140 private static ShoppingCouponService _service;
141 }