1
14
15 package com.liferay.portlet.blogs.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
25
26
63 public class BlogsEntryServiceHttp {
64 public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
65 HttpPrincipal httpPrincipal, java.lang.String title,
66 java.lang.String content, int displayDateMonth, int displayDateDay,
67 int displayDateYear, int displayDateHour, int displayDateMinute,
68 boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
69 com.liferay.portal.service.ServiceContext serviceContext)
70 throws com.liferay.portal.PortalException,
71 com.liferay.portal.SystemException {
72 try {
73 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
74 "addEntry", _addEntryParameterTypes0);
75
76 MethodHandler methodHandler = new MethodHandler(methodKey, title,
77 content, displayDateMonth, displayDateDay, displayDateYear,
78 displayDateHour, displayDateMinute, draft, allowTrackbacks,
79 trackbacks, serviceContext);
80
81 Object returnObj = null;
82
83 try {
84 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
85 }
86 catch (Exception e) {
87 if (e instanceof com.liferay.portal.PortalException) {
88 throw (com.liferay.portal.PortalException)e;
89 }
90
91 if (e instanceof com.liferay.portal.SystemException) {
92 throw (com.liferay.portal.SystemException)e;
93 }
94
95 throw new com.liferay.portal.SystemException(e);
96 }
97
98 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
99 }
100 catch (com.liferay.portal.SystemException se) {
101 _log.error(se, se);
102
103 throw se;
104 }
105 }
106
107 public static void deleteEntry(HttpPrincipal httpPrincipal, long entryId)
108 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 try {
111 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
112 "deleteEntry", _deleteEntryParameterTypes1);
113
114 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
115
116 try {
117 TunnelUtil.invoke(httpPrincipal, methodHandler);
118 }
119 catch (Exception e) {
120 if (e instanceof com.liferay.portal.PortalException) {
121 throw (com.liferay.portal.PortalException)e;
122 }
123
124 if (e instanceof com.liferay.portal.SystemException) {
125 throw (com.liferay.portal.SystemException)e;
126 }
127
128 throw new com.liferay.portal.SystemException(e);
129 }
130 }
131 catch (com.liferay.portal.SystemException se) {
132 _log.error(se, se);
133
134 throw se;
135 }
136 }
137
138 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
139 HttpPrincipal httpPrincipal, long companyId, int max)
140 throws com.liferay.portal.PortalException,
141 com.liferay.portal.SystemException {
142 try {
143 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
144 "getCompanyEntries", _getCompanyEntriesParameterTypes2);
145
146 MethodHandler methodHandler = new MethodHandler(methodKey,
147 companyId, max);
148
149 Object returnObj = null;
150
151 try {
152 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
153 }
154 catch (Exception e) {
155 if (e instanceof com.liferay.portal.PortalException) {
156 throw (com.liferay.portal.PortalException)e;
157 }
158
159 if (e instanceof com.liferay.portal.SystemException) {
160 throw (com.liferay.portal.SystemException)e;
161 }
162
163 throw new com.liferay.portal.SystemException(e);
164 }
165
166 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
167 }
168 catch (com.liferay.portal.SystemException se) {
169 _log.error(se, se);
170
171 throw se;
172 }
173 }
174
175 public static java.lang.String getCompanyEntriesRSS(
176 HttpPrincipal httpPrincipal, long companyId, int max,
177 java.lang.String type, double version, java.lang.String displayStyle,
178 java.lang.String feedURL, java.lang.String entryURL,
179 com.liferay.portal.theme.ThemeDisplay themeDisplay)
180 throws com.liferay.portal.PortalException,
181 com.liferay.portal.SystemException {
182 try {
183 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
184 "getCompanyEntriesRSS", _getCompanyEntriesRSSParameterTypes3);
185
186 MethodHandler methodHandler = new MethodHandler(methodKey,
187 companyId, max, type, version, displayStyle, feedURL,
188 entryURL, themeDisplay);
189
190 Object returnObj = null;
191
192 try {
193 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
194 }
195 catch (Exception e) {
196 if (e instanceof com.liferay.portal.PortalException) {
197 throw (com.liferay.portal.PortalException)e;
198 }
199
200 if (e instanceof com.liferay.portal.SystemException) {
201 throw (com.liferay.portal.SystemException)e;
202 }
203
204 throw new com.liferay.portal.SystemException(e);
205 }
206
207 return (java.lang.String)returnObj;
208 }
209 catch (com.liferay.portal.SystemException se) {
210 _log.error(se, se);
211
212 throw se;
213 }
214 }
215
216 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
217 HttpPrincipal httpPrincipal, long entryId)
218 throws com.liferay.portal.PortalException,
219 com.liferay.portal.SystemException {
220 try {
221 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
222 "getEntry", _getEntryParameterTypes4);
223
224 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
225
226 Object returnObj = null;
227
228 try {
229 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
230 }
231 catch (Exception e) {
232 if (e instanceof com.liferay.portal.PortalException) {
233 throw (com.liferay.portal.PortalException)e;
234 }
235
236 if (e instanceof com.liferay.portal.SystemException) {
237 throw (com.liferay.portal.SystemException)e;
238 }
239
240 throw new com.liferay.portal.SystemException(e);
241 }
242
243 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
244 }
245 catch (com.liferay.portal.SystemException se) {
246 _log.error(se, se);
247
248 throw se;
249 }
250 }
251
252 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
253 HttpPrincipal httpPrincipal, long groupId, java.lang.String urlTitle)
254 throws com.liferay.portal.PortalException,
255 com.liferay.portal.SystemException {
256 try {
257 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
258 "getEntry", _getEntryParameterTypes5);
259
260 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
261 urlTitle);
262
263 Object returnObj = null;
264
265 try {
266 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
267 }
268 catch (Exception e) {
269 if (e instanceof com.liferay.portal.PortalException) {
270 throw (com.liferay.portal.PortalException)e;
271 }
272
273 if (e instanceof com.liferay.portal.SystemException) {
274 throw (com.liferay.portal.SystemException)e;
275 }
276
277 throw new com.liferay.portal.SystemException(e);
278 }
279
280 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
281 }
282 catch (com.liferay.portal.SystemException se) {
283 _log.error(se, se);
284
285 throw se;
286 }
287 }
288
289 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
290 HttpPrincipal httpPrincipal, long groupId, int max)
291 throws com.liferay.portal.PortalException,
292 com.liferay.portal.SystemException {
293 try {
294 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
295 "getGroupEntries", _getGroupEntriesParameterTypes6);
296
297 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
298 max);
299
300 Object returnObj = null;
301
302 try {
303 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
304 }
305 catch (Exception e) {
306 if (e instanceof com.liferay.portal.PortalException) {
307 throw (com.liferay.portal.PortalException)e;
308 }
309
310 if (e instanceof com.liferay.portal.SystemException) {
311 throw (com.liferay.portal.SystemException)e;
312 }
313
314 throw new com.liferay.portal.SystemException(e);
315 }
316
317 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
318 }
319 catch (com.liferay.portal.SystemException se) {
320 _log.error(se, se);
321
322 throw se;
323 }
324 }
325
326 public static java.lang.String getGroupEntriesRSS(
327 HttpPrincipal httpPrincipal, long groupId, int max,
328 java.lang.String type, double version, java.lang.String displayStyle,
329 java.lang.String feedURL, java.lang.String entryURL,
330 com.liferay.portal.theme.ThemeDisplay themeDisplay)
331 throws com.liferay.portal.PortalException,
332 com.liferay.portal.SystemException {
333 try {
334 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
335 "getGroupEntriesRSS", _getGroupEntriesRSSParameterTypes7);
336
337 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
338 max, type, version, displayStyle, feedURL, entryURL,
339 themeDisplay);
340
341 Object returnObj = null;
342
343 try {
344 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
345 }
346 catch (Exception e) {
347 if (e instanceof com.liferay.portal.PortalException) {
348 throw (com.liferay.portal.PortalException)e;
349 }
350
351 if (e instanceof com.liferay.portal.SystemException) {
352 throw (com.liferay.portal.SystemException)e;
353 }
354
355 throw new com.liferay.portal.SystemException(e);
356 }
357
358 return (java.lang.String)returnObj;
359 }
360 catch (com.liferay.portal.SystemException se) {
361 _log.error(se, se);
362
363 throw se;
364 }
365 }
366
367 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
368 HttpPrincipal httpPrincipal, long companyId, long groupId, int max)
369 throws com.liferay.portal.PortalException,
370 com.liferay.portal.SystemException {
371 try {
372 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
373 "getGroupsEntries", _getGroupsEntriesParameterTypes8);
374
375 MethodHandler methodHandler = new MethodHandler(methodKey,
376 companyId, groupId, max);
377
378 Object returnObj = null;
379
380 try {
381 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
382 }
383 catch (Exception e) {
384 if (e instanceof com.liferay.portal.PortalException) {
385 throw (com.liferay.portal.PortalException)e;
386 }
387
388 if (e instanceof com.liferay.portal.SystemException) {
389 throw (com.liferay.portal.SystemException)e;
390 }
391
392 throw new com.liferay.portal.SystemException(e);
393 }
394
395 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
396 }
397 catch (com.liferay.portal.SystemException se) {
398 _log.error(se, se);
399
400 throw se;
401 }
402 }
403
404 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
405 HttpPrincipal httpPrincipal, long organizationId, int max)
406 throws com.liferay.portal.PortalException,
407 com.liferay.portal.SystemException {
408 try {
409 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
410 "getOrganizationEntries",
411 _getOrganizationEntriesParameterTypes9);
412
413 MethodHandler methodHandler = new MethodHandler(methodKey,
414 organizationId, max);
415
416 Object returnObj = null;
417
418 try {
419 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
420 }
421 catch (Exception e) {
422 if (e instanceof com.liferay.portal.PortalException) {
423 throw (com.liferay.portal.PortalException)e;
424 }
425
426 if (e instanceof com.liferay.portal.SystemException) {
427 throw (com.liferay.portal.SystemException)e;
428 }
429
430 throw new com.liferay.portal.SystemException(e);
431 }
432
433 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
434 }
435 catch (com.liferay.portal.SystemException se) {
436 _log.error(se, se);
437
438 throw se;
439 }
440 }
441
442 public static java.lang.String getOrganizationEntriesRSS(
443 HttpPrincipal httpPrincipal, long organizationId, int max,
444 java.lang.String type, double version, java.lang.String displayStyle,
445 java.lang.String feedURL, java.lang.String entryURL,
446 com.liferay.portal.theme.ThemeDisplay themeDisplay)
447 throws com.liferay.portal.PortalException,
448 com.liferay.portal.SystemException {
449 try {
450 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
451 "getOrganizationEntriesRSS",
452 _getOrganizationEntriesRSSParameterTypes10);
453
454 MethodHandler methodHandler = new MethodHandler(methodKey,
455 organizationId, max, type, version, displayStyle, feedURL,
456 entryURL, themeDisplay);
457
458 Object returnObj = null;
459
460 try {
461 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
462 }
463 catch (Exception e) {
464 if (e instanceof com.liferay.portal.PortalException) {
465 throw (com.liferay.portal.PortalException)e;
466 }
467
468 if (e instanceof com.liferay.portal.SystemException) {
469 throw (com.liferay.portal.SystemException)e;
470 }
471
472 throw new com.liferay.portal.SystemException(e);
473 }
474
475 return (java.lang.String)returnObj;
476 }
477 catch (com.liferay.portal.SystemException se) {
478 _log.error(se, se);
479
480 throw se;
481 }
482 }
483
484 public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
485 HttpPrincipal httpPrincipal, long entryId, java.lang.String title,
486 java.lang.String content, int displayDateMonth, int displayDateDay,
487 int displayDateYear, int displayDateHour, int displayDateMinute,
488 boolean draft, boolean allowTrackbacks, java.lang.String[] trackbacks,
489 com.liferay.portal.service.ServiceContext serviceContext)
490 throws com.liferay.portal.PortalException,
491 com.liferay.portal.SystemException {
492 try {
493 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
494 "updateEntry", _updateEntryParameterTypes11);
495
496 MethodHandler methodHandler = new MethodHandler(methodKey, entryId,
497 title, content, displayDateMonth, displayDateDay,
498 displayDateYear, displayDateHour, displayDateMinute, draft,
499 allowTrackbacks, trackbacks, serviceContext);
500
501 Object returnObj = null;
502
503 try {
504 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
505 }
506 catch (Exception e) {
507 if (e instanceof com.liferay.portal.PortalException) {
508 throw (com.liferay.portal.PortalException)e;
509 }
510
511 if (e instanceof com.liferay.portal.SystemException) {
512 throw (com.liferay.portal.SystemException)e;
513 }
514
515 throw new com.liferay.portal.SystemException(e);
516 }
517
518 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
519 }
520 catch (com.liferay.portal.SystemException se) {
521 _log.error(se, se);
522
523 throw se;
524 }
525 }
526
527 private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceHttp.class);
528 private static final Class<?>[] _addEntryParameterTypes0 = new Class[] {
529 java.lang.String.class, java.lang.String.class, int.class, int.class,
530 int.class, int.class, int.class, boolean.class, boolean.class,
531 java.lang.String[].class,
532 com.liferay.portal.service.ServiceContext.class
533 };
534 private static final Class<?>[] _deleteEntryParameterTypes1 = new Class[] {
535 long.class
536 };
537 private static final Class<?>[] _getCompanyEntriesParameterTypes2 = new Class[] {
538 long.class, int.class
539 };
540 private static final Class<?>[] _getCompanyEntriesRSSParameterTypes3 = new Class[] {
541 long.class, int.class, java.lang.String.class, double.class,
542 java.lang.String.class, java.lang.String.class,
543 java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
544 };
545 private static final Class<?>[] _getEntryParameterTypes4 = new Class[] {
546 long.class
547 };
548 private static final Class<?>[] _getEntryParameterTypes5 = new Class[] {
549 long.class, java.lang.String.class
550 };
551 private static final Class<?>[] _getGroupEntriesParameterTypes6 = new Class[] {
552 long.class, int.class
553 };
554 private static final Class<?>[] _getGroupEntriesRSSParameterTypes7 = new Class[] {
555 long.class, int.class, java.lang.String.class, double.class,
556 java.lang.String.class, java.lang.String.class,
557 java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
558 };
559 private static final Class<?>[] _getGroupsEntriesParameterTypes8 = new Class[] {
560 long.class, long.class, int.class
561 };
562 private static final Class<?>[] _getOrganizationEntriesParameterTypes9 = new Class[] {
563 long.class, int.class
564 };
565 private static final Class<?>[] _getOrganizationEntriesRSSParameterTypes10 = new Class[] {
566 long.class, int.class, java.lang.String.class, double.class,
567 java.lang.String.class, java.lang.String.class,
568 java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
569 };
570 private static final Class<?>[] _updateEntryParameterTypes11 = new Class[] {
571 long.class, java.lang.String.class, java.lang.String.class,
572 int.class, int.class, int.class, int.class, int.class, boolean.class,
573 boolean.class, java.lang.String[].class,
574 com.liferay.portal.service.ServiceContext.class
575 };
576 }