001
014
015 package com.liferay.portlet.blogs.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
025
026
056 public class BlogsEntryServiceHttp {
057 public static com.liferay.portlet.blogs.model.BlogsEntry addEntry(
058 HttpPrincipal httpPrincipal, java.lang.String title,
059 java.lang.String content, int displayDateMonth, int displayDateDay,
060 int displayDateYear, int displayDateHour, int displayDateMinute,
061 boolean allowPingbacks, boolean allowTrackbacks,
062 java.lang.String[] trackbacks,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 try {
067 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
068 "addEntry", _addEntryParameterTypes0);
069
070 MethodHandler methodHandler = new MethodHandler(methodKey, title,
071 content, displayDateMonth, displayDateDay, displayDateYear,
072 displayDateHour, displayDateMinute, allowPingbacks,
073 allowTrackbacks, trackbacks, serviceContext);
074
075 Object returnObj = null;
076
077 try {
078 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
079 }
080 catch (Exception e) {
081 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
082 throw (com.liferay.portal.kernel.exception.PortalException)e;
083 }
084
085 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
086 throw (com.liferay.portal.kernel.exception.SystemException)e;
087 }
088
089 throw new com.liferay.portal.kernel.exception.SystemException(e);
090 }
091
092 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
093 }
094 catch (com.liferay.portal.kernel.exception.SystemException se) {
095 _log.error(se, se);
096
097 throw se;
098 }
099 }
100
101 public static void deleteEntry(HttpPrincipal httpPrincipal, long entryId)
102 throws com.liferay.portal.kernel.exception.PortalException,
103 com.liferay.portal.kernel.exception.SystemException {
104 try {
105 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
106 "deleteEntry", _deleteEntryParameterTypes1);
107
108 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
109
110 try {
111 TunnelUtil.invoke(httpPrincipal, methodHandler);
112 }
113 catch (Exception e) {
114 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
115 throw (com.liferay.portal.kernel.exception.PortalException)e;
116 }
117
118 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
119 throw (com.liferay.portal.kernel.exception.SystemException)e;
120 }
121
122 throw new com.liferay.portal.kernel.exception.SystemException(e);
123 }
124 }
125 catch (com.liferay.portal.kernel.exception.SystemException se) {
126 _log.error(se, se);
127
128 throw se;
129 }
130 }
131
132 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
133 HttpPrincipal httpPrincipal, long companyId, int status, int max)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 try {
137 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
138 "getCompanyEntries", _getCompanyEntriesParameterTypes2);
139
140 MethodHandler methodHandler = new MethodHandler(methodKey,
141 companyId, status, max);
142
143 Object returnObj = null;
144
145 try {
146 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
147 }
148 catch (Exception e) {
149 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
150 throw (com.liferay.portal.kernel.exception.PortalException)e;
151 }
152
153 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
154 throw (com.liferay.portal.kernel.exception.SystemException)e;
155 }
156
157 throw new com.liferay.portal.kernel.exception.SystemException(e);
158 }
159
160 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
161 }
162 catch (com.liferay.portal.kernel.exception.SystemException se) {
163 _log.error(se, se);
164
165 throw se;
166 }
167 }
168
169 public static java.lang.String getCompanyEntriesRSS(
170 HttpPrincipal httpPrincipal, long companyId, int status, int max,
171 java.lang.String type, double version, java.lang.String displayStyle,
172 java.lang.String feedURL, java.lang.String entryURL,
173 com.liferay.portal.theme.ThemeDisplay themeDisplay)
174 throws com.liferay.portal.kernel.exception.PortalException,
175 com.liferay.portal.kernel.exception.SystemException {
176 try {
177 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
178 "getCompanyEntriesRSS", _getCompanyEntriesRSSParameterTypes3);
179
180 MethodHandler methodHandler = new MethodHandler(methodKey,
181 companyId, status, max, type, version, displayStyle,
182 feedURL, entryURL, themeDisplay);
183
184 Object returnObj = null;
185
186 try {
187 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
188 }
189 catch (Exception e) {
190 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
191 throw (com.liferay.portal.kernel.exception.PortalException)e;
192 }
193
194 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
195 throw (com.liferay.portal.kernel.exception.SystemException)e;
196 }
197
198 throw new com.liferay.portal.kernel.exception.SystemException(e);
199 }
200
201 return (java.lang.String)returnObj;
202 }
203 catch (com.liferay.portal.kernel.exception.SystemException se) {
204 _log.error(se, se);
205
206 throw se;
207 }
208 }
209
210 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
211 HttpPrincipal httpPrincipal, long entryId)
212 throws com.liferay.portal.kernel.exception.PortalException,
213 com.liferay.portal.kernel.exception.SystemException {
214 try {
215 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
216 "getEntry", _getEntryParameterTypes4);
217
218 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
219
220 Object returnObj = null;
221
222 try {
223 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
224 }
225 catch (Exception e) {
226 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
227 throw (com.liferay.portal.kernel.exception.PortalException)e;
228 }
229
230 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
231 throw (com.liferay.portal.kernel.exception.SystemException)e;
232 }
233
234 throw new com.liferay.portal.kernel.exception.SystemException(e);
235 }
236
237 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
238 }
239 catch (com.liferay.portal.kernel.exception.SystemException se) {
240 _log.error(se, se);
241
242 throw se;
243 }
244 }
245
246 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
247 HttpPrincipal httpPrincipal, long groupId, java.lang.String urlTitle)
248 throws com.liferay.portal.kernel.exception.PortalException,
249 com.liferay.portal.kernel.exception.SystemException {
250 try {
251 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
252 "getEntry", _getEntryParameterTypes5);
253
254 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
255 urlTitle);
256
257 Object returnObj = null;
258
259 try {
260 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
261 }
262 catch (Exception e) {
263 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
264 throw (com.liferay.portal.kernel.exception.PortalException)e;
265 }
266
267 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
268 throw (com.liferay.portal.kernel.exception.SystemException)e;
269 }
270
271 throw new com.liferay.portal.kernel.exception.SystemException(e);
272 }
273
274 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
275 }
276 catch (com.liferay.portal.kernel.exception.SystemException se) {
277 _log.error(se, se);
278
279 throw se;
280 }
281 }
282
283 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
284 HttpPrincipal httpPrincipal, long groupId, int status, int max)
285 throws com.liferay.portal.kernel.exception.SystemException {
286 try {
287 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
288 "getGroupEntries", _getGroupEntriesParameterTypes6);
289
290 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
291 status, max);
292
293 Object returnObj = null;
294
295 try {
296 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
297 }
298 catch (Exception e) {
299 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
300 throw (com.liferay.portal.kernel.exception.SystemException)e;
301 }
302
303 throw new com.liferay.portal.kernel.exception.SystemException(e);
304 }
305
306 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
307 }
308 catch (com.liferay.portal.kernel.exception.SystemException se) {
309 _log.error(se, se);
310
311 throw se;
312 }
313 }
314
315 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
316 HttpPrincipal httpPrincipal, long groupId, int status, int start,
317 int end) throws com.liferay.portal.kernel.exception.SystemException {
318 try {
319 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
320 "getGroupEntries", _getGroupEntriesParameterTypes7);
321
322 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
323 status, start, end);
324
325 Object returnObj = null;
326
327 try {
328 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
329 }
330 catch (Exception e) {
331 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
332 throw (com.liferay.portal.kernel.exception.SystemException)e;
333 }
334
335 throw new com.liferay.portal.kernel.exception.SystemException(e);
336 }
337
338 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
339 }
340 catch (com.liferay.portal.kernel.exception.SystemException se) {
341 _log.error(se, se);
342
343 throw se;
344 }
345 }
346
347 public static int getGroupEntriesCount(HttpPrincipal httpPrincipal,
348 long groupId, int status)
349 throws com.liferay.portal.kernel.exception.SystemException {
350 try {
351 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
352 "getGroupEntriesCount", _getGroupEntriesCountParameterTypes8);
353
354 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
355 status);
356
357 Object returnObj = null;
358
359 try {
360 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
361 }
362 catch (Exception e) {
363 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
364 throw (com.liferay.portal.kernel.exception.SystemException)e;
365 }
366
367 throw new com.liferay.portal.kernel.exception.SystemException(e);
368 }
369
370 return ((Integer)returnObj).intValue();
371 }
372 catch (com.liferay.portal.kernel.exception.SystemException se) {
373 _log.error(se, se);
374
375 throw se;
376 }
377 }
378
379 public static java.lang.String getGroupEntriesRSS(
380 HttpPrincipal httpPrincipal, long groupId, int status, int max,
381 java.lang.String type, double version, java.lang.String displayStyle,
382 java.lang.String feedURL, java.lang.String entryURL,
383 com.liferay.portal.theme.ThemeDisplay themeDisplay)
384 throws com.liferay.portal.kernel.exception.PortalException,
385 com.liferay.portal.kernel.exception.SystemException {
386 try {
387 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
388 "getGroupEntriesRSS", _getGroupEntriesRSSParameterTypes9);
389
390 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
391 status, max, type, version, displayStyle, feedURL,
392 entryURL, themeDisplay);
393
394 Object returnObj = null;
395
396 try {
397 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
398 }
399 catch (Exception e) {
400 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
401 throw (com.liferay.portal.kernel.exception.PortalException)e;
402 }
403
404 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
405 throw (com.liferay.portal.kernel.exception.SystemException)e;
406 }
407
408 throw new com.liferay.portal.kernel.exception.SystemException(e);
409 }
410
411 return (java.lang.String)returnObj;
412 }
413 catch (com.liferay.portal.kernel.exception.SystemException se) {
414 _log.error(se, se);
415
416 throw se;
417 }
418 }
419
420 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
421 HttpPrincipal httpPrincipal, long companyId, long groupId, int status,
422 int max)
423 throws com.liferay.portal.kernel.exception.PortalException,
424 com.liferay.portal.kernel.exception.SystemException {
425 try {
426 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
427 "getGroupsEntries", _getGroupsEntriesParameterTypes10);
428
429 MethodHandler methodHandler = new MethodHandler(methodKey,
430 companyId, groupId, status, max);
431
432 Object returnObj = null;
433
434 try {
435 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
436 }
437 catch (Exception e) {
438 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
439 throw (com.liferay.portal.kernel.exception.PortalException)e;
440 }
441
442 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
443 throw (com.liferay.portal.kernel.exception.SystemException)e;
444 }
445
446 throw new com.liferay.portal.kernel.exception.SystemException(e);
447 }
448
449 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
450 }
451 catch (com.liferay.portal.kernel.exception.SystemException se) {
452 _log.error(se, se);
453
454 throw se;
455 }
456 }
457
458 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
459 HttpPrincipal httpPrincipal, long organizationId, int status, int max)
460 throws com.liferay.portal.kernel.exception.PortalException,
461 com.liferay.portal.kernel.exception.SystemException {
462 try {
463 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
464 "getOrganizationEntries",
465 _getOrganizationEntriesParameterTypes11);
466
467 MethodHandler methodHandler = new MethodHandler(methodKey,
468 organizationId, status, max);
469
470 Object returnObj = null;
471
472 try {
473 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
474 }
475 catch (Exception e) {
476 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
477 throw (com.liferay.portal.kernel.exception.PortalException)e;
478 }
479
480 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
481 throw (com.liferay.portal.kernel.exception.SystemException)e;
482 }
483
484 throw new com.liferay.portal.kernel.exception.SystemException(e);
485 }
486
487 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
488 }
489 catch (com.liferay.portal.kernel.exception.SystemException se) {
490 _log.error(se, se);
491
492 throw se;
493 }
494 }
495
496 public static java.lang.String getOrganizationEntriesRSS(
497 HttpPrincipal httpPrincipal, long organizationId, int status, int max,
498 java.lang.String type, double version, java.lang.String displayStyle,
499 java.lang.String feedURL, java.lang.String entryURL,
500 com.liferay.portal.theme.ThemeDisplay themeDisplay)
501 throws com.liferay.portal.kernel.exception.PortalException,
502 com.liferay.portal.kernel.exception.SystemException {
503 try {
504 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
505 "getOrganizationEntriesRSS",
506 _getOrganizationEntriesRSSParameterTypes12);
507
508 MethodHandler methodHandler = new MethodHandler(methodKey,
509 organizationId, status, max, type, version, displayStyle,
510 feedURL, entryURL, themeDisplay);
511
512 Object returnObj = null;
513
514 try {
515 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
516 }
517 catch (Exception e) {
518 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
519 throw (com.liferay.portal.kernel.exception.PortalException)e;
520 }
521
522 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
523 throw (com.liferay.portal.kernel.exception.SystemException)e;
524 }
525
526 throw new com.liferay.portal.kernel.exception.SystemException(e);
527 }
528
529 return (java.lang.String)returnObj;
530 }
531 catch (com.liferay.portal.kernel.exception.SystemException se) {
532 _log.error(se, se);
533
534 throw se;
535 }
536 }
537
538 public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
539 HttpPrincipal httpPrincipal, long entryId, java.lang.String title,
540 java.lang.String content, int displayDateMonth, int displayDateDay,
541 int displayDateYear, int displayDateHour, int displayDateMinute,
542 boolean allowPingbacks, boolean allowTrackbacks,
543 java.lang.String[] trackbacks,
544 com.liferay.portal.service.ServiceContext serviceContext)
545 throws com.liferay.portal.kernel.exception.PortalException,
546 com.liferay.portal.kernel.exception.SystemException {
547 try {
548 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
549 "updateEntry", _updateEntryParameterTypes13);
550
551 MethodHandler methodHandler = new MethodHandler(methodKey, entryId,
552 title, content, displayDateMonth, displayDateDay,
553 displayDateYear, displayDateHour, displayDateMinute,
554 allowPingbacks, allowTrackbacks, trackbacks, serviceContext);
555
556 Object returnObj = null;
557
558 try {
559 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
560 }
561 catch (Exception e) {
562 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
563 throw (com.liferay.portal.kernel.exception.PortalException)e;
564 }
565
566 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
567 throw (com.liferay.portal.kernel.exception.SystemException)e;
568 }
569
570 throw new com.liferay.portal.kernel.exception.SystemException(e);
571 }
572
573 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
574 }
575 catch (com.liferay.portal.kernel.exception.SystemException se) {
576 _log.error(se, se);
577
578 throw se;
579 }
580 }
581
582 private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceHttp.class);
583 private static final Class<?>[] _addEntryParameterTypes0 = new Class[] {
584 java.lang.String.class, java.lang.String.class, int.class, int.class,
585 int.class, int.class, int.class, boolean.class, boolean.class,
586 java.lang.String[].class,
587 com.liferay.portal.service.ServiceContext.class
588 };
589 private static final Class<?>[] _deleteEntryParameterTypes1 = new Class[] {
590 long.class
591 };
592 private static final Class<?>[] _getCompanyEntriesParameterTypes2 = new Class[] {
593 long.class, int.class, int.class
594 };
595 private static final Class<?>[] _getCompanyEntriesRSSParameterTypes3 = new Class[] {
596 long.class, int.class, int.class, java.lang.String.class,
597 double.class, java.lang.String.class, java.lang.String.class,
598 java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
599 };
600 private static final Class<?>[] _getEntryParameterTypes4 = new Class[] {
601 long.class
602 };
603 private static final Class<?>[] _getEntryParameterTypes5 = new Class[] {
604 long.class, java.lang.String.class
605 };
606 private static final Class<?>[] _getGroupEntriesParameterTypes6 = new Class[] {
607 long.class, int.class, int.class
608 };
609 private static final Class<?>[] _getGroupEntriesParameterTypes7 = new Class[] {
610 long.class, int.class, int.class, int.class
611 };
612 private static final Class<?>[] _getGroupEntriesCountParameterTypes8 = new Class[] {
613 long.class, int.class
614 };
615 private static final Class<?>[] _getGroupEntriesRSSParameterTypes9 = new Class[] {
616 long.class, int.class, int.class, java.lang.String.class,
617 double.class, java.lang.String.class, java.lang.String.class,
618 java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
619 };
620 private static final Class<?>[] _getGroupsEntriesParameterTypes10 = new Class[] {
621 long.class, long.class, int.class, int.class
622 };
623 private static final Class<?>[] _getOrganizationEntriesParameterTypes11 = new Class[] {
624 long.class, int.class, int.class
625 };
626 private static final Class<?>[] _getOrganizationEntriesRSSParameterTypes12 = new Class[] {
627 long.class, int.class, int.class, java.lang.String.class,
628 double.class, java.lang.String.class, java.lang.String.class,
629 java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
630 };
631 private static final Class<?>[] _updateEntryParameterTypes13 = new Class[] {
632 long.class, java.lang.String.class, java.lang.String.class,
633 int.class, int.class, int.class, int.class, int.class, boolean.class,
634 boolean.class, java.lang.String[].class,
635 com.liferay.portal.service.ServiceContext.class
636 };
637 }