1
22
23 package com.liferay.portlet.softwarecatalog.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.LongWrapper;
28 import com.liferay.portal.kernel.util.MethodWrapper;
29 import com.liferay.portal.kernel.util.NullWrapper;
30 import com.liferay.portal.security.auth.HttpPrincipal;
31 import com.liferay.portal.service.http.TunnelUtil;
32
33 import com.liferay.portlet.softwarecatalog.service.SCProductEntryServiceUtil;
34
35
74 public class SCProductEntryServiceHttp {
75 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
76 HttpPrincipal httpPrincipal, java.lang.String name,
77 java.lang.String type, java.lang.String tags,
78 java.lang.String shortDescription, java.lang.String longDescription,
79 java.lang.String pageURL, java.lang.String author,
80 java.lang.String repoGroupId, java.lang.String repoArtifactId,
81 long[] licenseIds, java.util.List<byte[]> thumbnails,
82 java.util.List<byte[]> fullImages,
83 com.liferay.portal.service.ServiceContext serviceContext)
84 throws com.liferay.portal.PortalException,
85 com.liferay.portal.SystemException {
86 try {
87 Object paramObj0 = name;
88
89 if (name == null) {
90 paramObj0 = new NullWrapper("java.lang.String");
91 }
92
93 Object paramObj1 = type;
94
95 if (type == null) {
96 paramObj1 = new NullWrapper("java.lang.String");
97 }
98
99 Object paramObj2 = tags;
100
101 if (tags == null) {
102 paramObj2 = new NullWrapper("java.lang.String");
103 }
104
105 Object paramObj3 = shortDescription;
106
107 if (shortDescription == null) {
108 paramObj3 = new NullWrapper("java.lang.String");
109 }
110
111 Object paramObj4 = longDescription;
112
113 if (longDescription == null) {
114 paramObj4 = new NullWrapper("java.lang.String");
115 }
116
117 Object paramObj5 = pageURL;
118
119 if (pageURL == null) {
120 paramObj5 = new NullWrapper("java.lang.String");
121 }
122
123 Object paramObj6 = author;
124
125 if (author == null) {
126 paramObj6 = new NullWrapper("java.lang.String");
127 }
128
129 Object paramObj7 = repoGroupId;
130
131 if (repoGroupId == null) {
132 paramObj7 = new NullWrapper("java.lang.String");
133 }
134
135 Object paramObj8 = repoArtifactId;
136
137 if (repoArtifactId == null) {
138 paramObj8 = new NullWrapper("java.lang.String");
139 }
140
141 Object paramObj9 = licenseIds;
142
143 if (licenseIds == null) {
144 paramObj9 = new NullWrapper("[J");
145 }
146
147 Object paramObj10 = thumbnails;
148
149 if (thumbnails == null) {
150 paramObj10 = new NullWrapper("java.util.List");
151 }
152
153 Object paramObj11 = fullImages;
154
155 if (fullImages == null) {
156 paramObj11 = new NullWrapper("java.util.List");
157 }
158
159 Object paramObj12 = serviceContext;
160
161 if (serviceContext == null) {
162 paramObj12 = new NullWrapper(
163 "com.liferay.portal.service.ServiceContext");
164 }
165
166 MethodWrapper methodWrapper = new MethodWrapper(SCProductEntryServiceUtil.class.getName(),
167 "addProductEntry",
168 new Object[] {
169 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
170 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
171 paramObj10, paramObj11, paramObj12
172 });
173
174 Object returnObj = null;
175
176 try {
177 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
178 }
179 catch (Exception e) {
180 if (e instanceof com.liferay.portal.PortalException) {
181 throw (com.liferay.portal.PortalException)e;
182 }
183
184 if (e instanceof com.liferay.portal.SystemException) {
185 throw (com.liferay.portal.SystemException)e;
186 }
187
188 throw new com.liferay.portal.SystemException(e);
189 }
190
191 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
192 }
193 catch (com.liferay.portal.SystemException se) {
194 _log.error(se, se);
195
196 throw se;
197 }
198 }
199
200 public static void deleteProductEntry(HttpPrincipal httpPrincipal,
201 long productEntryId)
202 throws com.liferay.portal.PortalException,
203 com.liferay.portal.SystemException {
204 try {
205 Object paramObj0 = new LongWrapper(productEntryId);
206
207 MethodWrapper methodWrapper = new MethodWrapper(SCProductEntryServiceUtil.class.getName(),
208 "deleteProductEntry", new Object[] { paramObj0 });
209
210 try {
211 TunnelUtil.invoke(httpPrincipal, methodWrapper);
212 }
213 catch (Exception e) {
214 if (e instanceof com.liferay.portal.PortalException) {
215 throw (com.liferay.portal.PortalException)e;
216 }
217
218 if (e instanceof com.liferay.portal.SystemException) {
219 throw (com.liferay.portal.SystemException)e;
220 }
221
222 throw new com.liferay.portal.SystemException(e);
223 }
224 }
225 catch (com.liferay.portal.SystemException se) {
226 _log.error(se, se);
227
228 throw se;
229 }
230 }
231
232 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
233 HttpPrincipal httpPrincipal, long productEntryId)
234 throws com.liferay.portal.PortalException,
235 com.liferay.portal.SystemException {
236 try {
237 Object paramObj0 = new LongWrapper(productEntryId);
238
239 MethodWrapper methodWrapper = new MethodWrapper(SCProductEntryServiceUtil.class.getName(),
240 "getProductEntry", new Object[] { paramObj0 });
241
242 Object returnObj = null;
243
244 try {
245 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
246 }
247 catch (Exception e) {
248 if (e instanceof com.liferay.portal.PortalException) {
249 throw (com.liferay.portal.PortalException)e;
250 }
251
252 if (e instanceof com.liferay.portal.SystemException) {
253 throw (com.liferay.portal.SystemException)e;
254 }
255
256 throw new com.liferay.portal.SystemException(e);
257 }
258
259 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
260 }
261 catch (com.liferay.portal.SystemException se) {
262 _log.error(se, se);
263
264 throw se;
265 }
266 }
267
268 public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
269 HttpPrincipal httpPrincipal, long productEntryId,
270 java.lang.String name, java.lang.String type, java.lang.String tags,
271 java.lang.String shortDescription, java.lang.String longDescription,
272 java.lang.String pageURL, java.lang.String author,
273 java.lang.String repoGroupId, java.lang.String repoArtifactId,
274 long[] licenseIds, java.util.List<byte[]> thumbnails,
275 java.util.List<byte[]> fullImages)
276 throws com.liferay.portal.PortalException,
277 com.liferay.portal.SystemException {
278 try {
279 Object paramObj0 = new LongWrapper(productEntryId);
280
281 Object paramObj1 = name;
282
283 if (name == null) {
284 paramObj1 = new NullWrapper("java.lang.String");
285 }
286
287 Object paramObj2 = type;
288
289 if (type == null) {
290 paramObj2 = new NullWrapper("java.lang.String");
291 }
292
293 Object paramObj3 = tags;
294
295 if (tags == null) {
296 paramObj3 = new NullWrapper("java.lang.String");
297 }
298
299 Object paramObj4 = shortDescription;
300
301 if (shortDescription == null) {
302 paramObj4 = new NullWrapper("java.lang.String");
303 }
304
305 Object paramObj5 = longDescription;
306
307 if (longDescription == null) {
308 paramObj5 = new NullWrapper("java.lang.String");
309 }
310
311 Object paramObj6 = pageURL;
312
313 if (pageURL == null) {
314 paramObj6 = new NullWrapper("java.lang.String");
315 }
316
317 Object paramObj7 = author;
318
319 if (author == null) {
320 paramObj7 = new NullWrapper("java.lang.String");
321 }
322
323 Object paramObj8 = repoGroupId;
324
325 if (repoGroupId == null) {
326 paramObj8 = new NullWrapper("java.lang.String");
327 }
328
329 Object paramObj9 = repoArtifactId;
330
331 if (repoArtifactId == null) {
332 paramObj9 = new NullWrapper("java.lang.String");
333 }
334
335 Object paramObj10 = licenseIds;
336
337 if (licenseIds == null) {
338 paramObj10 = new NullWrapper("[J");
339 }
340
341 Object paramObj11 = thumbnails;
342
343 if (thumbnails == null) {
344 paramObj11 = new NullWrapper("java.util.List");
345 }
346
347 Object paramObj12 = fullImages;
348
349 if (fullImages == null) {
350 paramObj12 = new NullWrapper("java.util.List");
351 }
352
353 MethodWrapper methodWrapper = new MethodWrapper(SCProductEntryServiceUtil.class.getName(),
354 "updateProductEntry",
355 new Object[] {
356 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
357 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
358 paramObj10, paramObj11, paramObj12
359 });
360
361 Object returnObj = null;
362
363 try {
364 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
365 }
366 catch (Exception e) {
367 if (e instanceof com.liferay.portal.PortalException) {
368 throw (com.liferay.portal.PortalException)e;
369 }
370
371 if (e instanceof com.liferay.portal.SystemException) {
372 throw (com.liferay.portal.SystemException)e;
373 }
374
375 throw new com.liferay.portal.SystemException(e);
376 }
377
378 return (com.liferay.portlet.softwarecatalog.model.SCProductEntry)returnObj;
379 }
380 catch (com.liferay.portal.SystemException se) {
381 _log.error(se, se);
382
383 throw se;
384 }
385 }
386
387 private static Log _log = LogFactoryUtil.getLog(SCProductEntryServiceHttp.class);
388 }