1
14
15 package com.liferay.portlet.shopping.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19
20 import com.liferay.portlet.shopping.service.ShoppingCouponServiceUtil;
21
22 import java.rmi.RemoteException;
23
24
74 public class ShoppingCouponServiceSoap {
75 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap addCoupon(
76 long plid, java.lang.String code, boolean autoCode,
77 java.lang.String name, java.lang.String description,
78 int startDateMonth, int startDateDay, int startDateYear,
79 int startDateHour, int startDateMinute, int endDateMonth,
80 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
81 boolean neverExpire, boolean active, java.lang.String limitCategories,
82 java.lang.String limitSkus, double minOrder, double discount,
83 java.lang.String discountType) throws RemoteException {
84 try {
85 com.liferay.portlet.shopping.model.ShoppingCoupon returnValue = ShoppingCouponServiceUtil.addCoupon(plid,
86 code, autoCode, name, description, startDateMonth,
87 startDateDay, startDateYear, startDateHour,
88 startDateMinute, endDateMonth, endDateDay, endDateYear,
89 endDateHour, endDateMinute, neverExpire, active,
90 limitCategories, limitSkus, minOrder, discount, discountType);
91
92 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModel(returnValue);
93 }
94 catch (Exception e) {
95 _log.error(e, e);
96
97 throw new RemoteException(e.getMessage());
98 }
99 }
100
101 public static void deleteCoupon(long plid, long couponId)
102 throws RemoteException {
103 try {
104 ShoppingCouponServiceUtil.deleteCoupon(plid, couponId);
105 }
106 catch (Exception e) {
107 _log.error(e, e);
108
109 throw new RemoteException(e.getMessage());
110 }
111 }
112
113 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap getCoupon(
114 long plid, long couponId) throws RemoteException {
115 try {
116 com.liferay.portlet.shopping.model.ShoppingCoupon returnValue = ShoppingCouponServiceUtil.getCoupon(plid,
117 couponId);
118
119 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModel(returnValue);
120 }
121 catch (Exception e) {
122 _log.error(e, e);
123
124 throw new RemoteException(e.getMessage());
125 }
126 }
127
128 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap[] search(
129 long plid, long companyId, java.lang.String code, boolean active,
130 java.lang.String discountType, boolean andOperator, int start, int end)
131 throws RemoteException {
132 try {
133 java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> returnValue =
134 ShoppingCouponServiceUtil.search(plid, companyId, code, active,
135 discountType, andOperator, start, end);
136
137 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModels(returnValue);
138 }
139 catch (Exception e) {
140 _log.error(e, e);
141
142 throw new RemoteException(e.getMessage());
143 }
144 }
145
146 public static com.liferay.portlet.shopping.model.ShoppingCouponSoap updateCoupon(
147 long plid, long couponId, java.lang.String name,
148 java.lang.String description, int startDateMonth, int startDateDay,
149 int startDateYear, int startDateHour, int startDateMinute,
150 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
151 int endDateMinute, boolean neverExpire, boolean active,
152 java.lang.String limitCategories, java.lang.String limitSkus,
153 double minOrder, double discount, java.lang.String discountType)
154 throws RemoteException {
155 try {
156 com.liferay.portlet.shopping.model.ShoppingCoupon returnValue = ShoppingCouponServiceUtil.updateCoupon(plid,
157 couponId, name, description, startDateMonth, startDateDay,
158 startDateYear, startDateHour, startDateMinute,
159 endDateMonth, endDateDay, endDateYear, endDateHour,
160 endDateMinute, neverExpire, active, limitCategories,
161 limitSkus, minOrder, discount, discountType);
162
163 return com.liferay.portlet.shopping.model.ShoppingCouponSoap.toSoapModel(returnValue);
164 }
165 catch (Exception e) {
166 _log.error(e, e);
167
168 throw new RemoteException(e.getMessage());
169 }
170 }
171
172 private static Log _log = LogFactoryUtil.getLog(ShoppingCouponServiceSoap.class);
173 }