001
014
015 package com.liferay.portlet.shopping.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019
020 import com.liferay.portlet.shopping.service.ShoppingCouponServiceUtil;
021
022 import java.rmi.RemoteException;
023
024
064 public class ShoppingCouponServiceSoap {
065 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap addCoupon(
066 java.lang.String code, boolean autoCode, java.lang.String name,
067 java.lang.String description, int startDateMonth, int startDateDay,
068 int startDateYear, int startDateHour, int startDateMinute,
069 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
070 int endDateMinute, boolean neverExpire, boolean active,
071 java.lang.String limitCategories, java.lang.String limitSkus,
072 double minOrder, double discount, java.lang.String discountType,
073 com.liferay.portal.service.ServiceContext serviceContext)
074 throws RemoteException {
075 try {
076 com.liferay.portlet.shopping.model.ShoppingCoupon returnValue = ShoppingCouponServiceUtil.addCoupon(code,
077 autoCode, name, description, startDateMonth, startDateDay,
078 startDateYear, startDateHour, startDateMinute,
079 endDateMonth, endDateDay, endDateYear, endDateHour,
080 endDateMinute, neverExpire, active, limitCategories,
081 limitSkus, minOrder, discount, discountType, serviceContext);
082
083 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModel(returnValue);
084 }
085 catch (Exception e) {
086 _log.error(e, e);
087
088 throw new RemoteException(e.getMessage());
089 }
090 }
091
092 public static void deleteCoupon(long groupId, long couponId)
093 throws RemoteException {
094 try {
095 ShoppingCouponServiceUtil.deleteCoupon(groupId, couponId);
096 }
097 catch (Exception e) {
098 _log.error(e, e);
099
100 throw new RemoteException(e.getMessage());
101 }
102 }
103
104 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap getCoupon(
105 long groupId, long couponId) throws RemoteException {
106 try {
107 com.liferay.portlet.shopping.model.ShoppingCoupon returnValue = ShoppingCouponServiceUtil.getCoupon(groupId,
108 couponId);
109
110 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModel(returnValue);
111 }
112 catch (Exception e) {
113 _log.error(e, e);
114
115 throw new RemoteException(e.getMessage());
116 }
117 }
118
119 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap[] search(
120 long groupId, long companyId, java.lang.String code, boolean active,
121 java.lang.String discountType, boolean andOperator, int start, int end)
122 throws RemoteException {
123 try {
124 java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> returnValue =
125 ShoppingCouponServiceUtil.search(groupId, companyId, code,
126 active, discountType, andOperator, start, end);
127
128 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModels(returnValue);
129 }
130 catch (Exception e) {
131 _log.error(e, e);
132
133 throw new RemoteException(e.getMessage());
134 }
135 }
136
137 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap updateCoupon(
138 long couponId, java.lang.String name, java.lang.String description,
139 int startDateMonth, int startDateDay, int startDateYear,
140 int startDateHour, int startDateMinute, int endDateMonth,
141 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
142 boolean neverExpire, boolean active, java.lang.String limitCategories,
143 java.lang.String limitSkus, double minOrder, double discount,
144 java.lang.String discountType,
145 com.liferay.portal.service.ServiceContext serviceContext)
146 throws RemoteException {
147 try {
148 com.liferay.portlet.shopping.model.ShoppingCoupon returnValue = ShoppingCouponServiceUtil.updateCoupon(couponId,
149 name, description, startDateMonth, startDateDay,
150 startDateYear, startDateHour, startDateMinute,
151 endDateMonth, endDateDay, endDateYear, endDateHour,
152 endDateMinute, neverExpire, active, limitCategories,
153 limitSkus, minOrder, discount, discountType, serviceContext);
154
155 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModel(returnValue);
156 }
157 catch (Exception e) {
158 _log.error(e, e);
159
160 throw new RemoteException(e.getMessage());
161 }
162 }
163
164 private static Log _log = LogFactoryUtil.getLog(ShoppingCouponServiceSoap.class);
165 }