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