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", java.lang.String.class, java.lang.String.class,
069 int.class, int.class, int.class, int.class, int.class,
070 boolean.class, boolean.class, java.lang.String[].class,
071 com.liferay.portal.service.ServiceContext.class);
072
073 MethodHandler methodHandler = new MethodHandler(methodKey, title,
074 content, displayDateMonth, displayDateDay, displayDateYear,
075 displayDateHour, displayDateMinute, allowPingbacks,
076 allowTrackbacks, trackbacks, serviceContext);
077
078 Object returnObj = null;
079
080 try {
081 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
082 }
083 catch (Exception e) {
084 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
085 throw (com.liferay.portal.kernel.exception.PortalException)e;
086 }
087
088 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
089 throw (com.liferay.portal.kernel.exception.SystemException)e;
090 }
091
092 throw new com.liferay.portal.kernel.exception.SystemException(e);
093 }
094
095 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
096 }
097 catch (com.liferay.portal.kernel.exception.SystemException se) {
098 _log.error(se, se);
099
100 throw se;
101 }
102 }
103
104 public static void deleteEntry(HttpPrincipal httpPrincipal, long entryId)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 try {
108 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
109 "deleteEntry", long.class);
110
111 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
112
113 try {
114 TunnelUtil.invoke(httpPrincipal, methodHandler);
115 }
116 catch (Exception e) {
117 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
118 throw (com.liferay.portal.kernel.exception.PortalException)e;
119 }
120
121 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
122 throw (com.liferay.portal.kernel.exception.SystemException)e;
123 }
124
125 throw new com.liferay.portal.kernel.exception.SystemException(e);
126 }
127 }
128 catch (com.liferay.portal.kernel.exception.SystemException se) {
129 _log.error(se, se);
130
131 throw se;
132 }
133 }
134
135 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getCompanyEntries(
136 HttpPrincipal httpPrincipal, long companyId, int status, int max)
137 throws com.liferay.portal.kernel.exception.PortalException,
138 com.liferay.portal.kernel.exception.SystemException {
139 try {
140 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
141 "getCompanyEntries", long.class, int.class, int.class);
142
143 MethodHandler methodHandler = new MethodHandler(methodKey,
144 companyId, status, max);
145
146 Object returnObj = null;
147
148 try {
149 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
150 }
151 catch (Exception e) {
152 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
153 throw (com.liferay.portal.kernel.exception.PortalException)e;
154 }
155
156 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
157 throw (com.liferay.portal.kernel.exception.SystemException)e;
158 }
159
160 throw new com.liferay.portal.kernel.exception.SystemException(e);
161 }
162
163 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
164 }
165 catch (com.liferay.portal.kernel.exception.SystemException se) {
166 _log.error(se, se);
167
168 throw se;
169 }
170 }
171
172 public static java.lang.String getCompanyEntriesRSS(
173 HttpPrincipal httpPrincipal, long companyId, int status, int max,
174 java.lang.String type, double version, java.lang.String displayStyle,
175 java.lang.String feedURL, java.lang.String entryURL,
176 com.liferay.portal.theme.ThemeDisplay themeDisplay)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 try {
180 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
181 "getCompanyEntriesRSS", long.class, int.class, int.class,
182 java.lang.String.class, double.class,
183 java.lang.String.class, java.lang.String.class,
184 java.lang.String.class,
185 com.liferay.portal.theme.ThemeDisplay.class);
186
187 MethodHandler methodHandler = new MethodHandler(methodKey,
188 companyId, status, max, type, version, displayStyle,
189 feedURL, entryURL, themeDisplay);
190
191 Object returnObj = null;
192
193 try {
194 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
195 }
196 catch (Exception e) {
197 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
198 throw (com.liferay.portal.kernel.exception.PortalException)e;
199 }
200
201 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
202 throw (com.liferay.portal.kernel.exception.SystemException)e;
203 }
204
205 throw new com.liferay.portal.kernel.exception.SystemException(e);
206 }
207
208 return (java.lang.String)returnObj;
209 }
210 catch (com.liferay.portal.kernel.exception.SystemException se) {
211 _log.error(se, se);
212
213 throw se;
214 }
215 }
216
217 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
218 HttpPrincipal httpPrincipal, long entryId)
219 throws com.liferay.portal.kernel.exception.PortalException,
220 com.liferay.portal.kernel.exception.SystemException {
221 try {
222 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
223 "getEntry", long.class);
224
225 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
226
227 Object returnObj = null;
228
229 try {
230 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
231 }
232 catch (Exception e) {
233 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
234 throw (com.liferay.portal.kernel.exception.PortalException)e;
235 }
236
237 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
238 throw (com.liferay.portal.kernel.exception.SystemException)e;
239 }
240
241 throw new com.liferay.portal.kernel.exception.SystemException(e);
242 }
243
244 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
245 }
246 catch (com.liferay.portal.kernel.exception.SystemException se) {
247 _log.error(se, se);
248
249 throw se;
250 }
251 }
252
253 public static com.liferay.portlet.blogs.model.BlogsEntry getEntry(
254 HttpPrincipal httpPrincipal, long groupId, java.lang.String urlTitle)
255 throws com.liferay.portal.kernel.exception.PortalException,
256 com.liferay.portal.kernel.exception.SystemException {
257 try {
258 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
259 "getEntry", long.class, java.lang.String.class);
260
261 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
262 urlTitle);
263
264 Object returnObj = null;
265
266 try {
267 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
268 }
269 catch (Exception e) {
270 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
271 throw (com.liferay.portal.kernel.exception.PortalException)e;
272 }
273
274 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
275 throw (com.liferay.portal.kernel.exception.SystemException)e;
276 }
277
278 throw new com.liferay.portal.kernel.exception.SystemException(e);
279 }
280
281 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
282 }
283 catch (com.liferay.portal.kernel.exception.SystemException se) {
284 _log.error(se, se);
285
286 throw se;
287 }
288 }
289
290 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupEntries(
291 HttpPrincipal httpPrincipal, long groupId, int status, int max)
292 throws com.liferay.portal.kernel.exception.PortalException,
293 com.liferay.portal.kernel.exception.SystemException {
294 try {
295 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
296 "getGroupEntries", long.class, int.class, int.class);
297
298 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
299 status, max);
300
301 Object returnObj = null;
302
303 try {
304 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
305 }
306 catch (Exception e) {
307 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
308 throw (com.liferay.portal.kernel.exception.PortalException)e;
309 }
310
311 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
312 throw (com.liferay.portal.kernel.exception.SystemException)e;
313 }
314
315 throw new com.liferay.portal.kernel.exception.SystemException(e);
316 }
317
318 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
319 }
320 catch (com.liferay.portal.kernel.exception.SystemException se) {
321 _log.error(se, se);
322
323 throw se;
324 }
325 }
326
327 public static java.lang.String getGroupEntriesRSS(
328 HttpPrincipal httpPrincipal, long groupId, int status, int max,
329 java.lang.String type, double version, java.lang.String displayStyle,
330 java.lang.String feedURL, java.lang.String entryURL,
331 com.liferay.portal.theme.ThemeDisplay themeDisplay)
332 throws com.liferay.portal.kernel.exception.PortalException,
333 com.liferay.portal.kernel.exception.SystemException {
334 try {
335 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
336 "getGroupEntriesRSS", long.class, int.class, int.class,
337 java.lang.String.class, double.class,
338 java.lang.String.class, java.lang.String.class,
339 java.lang.String.class,
340 com.liferay.portal.theme.ThemeDisplay.class);
341
342 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
343 status, max, type, version, displayStyle, feedURL,
344 entryURL, themeDisplay);
345
346 Object returnObj = null;
347
348 try {
349 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
350 }
351 catch (Exception e) {
352 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
353 throw (com.liferay.portal.kernel.exception.PortalException)e;
354 }
355
356 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
357 throw (com.liferay.portal.kernel.exception.SystemException)e;
358 }
359
360 throw new com.liferay.portal.kernel.exception.SystemException(e);
361 }
362
363 return (java.lang.String)returnObj;
364 }
365 catch (com.liferay.portal.kernel.exception.SystemException se) {
366 _log.error(se, se);
367
368 throw se;
369 }
370 }
371
372 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getGroupsEntries(
373 HttpPrincipal httpPrincipal, long companyId, long groupId, int status,
374 int max)
375 throws com.liferay.portal.kernel.exception.PortalException,
376 com.liferay.portal.kernel.exception.SystemException {
377 try {
378 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
379 "getGroupsEntries", long.class, long.class, int.class,
380 int.class);
381
382 MethodHandler methodHandler = new MethodHandler(methodKey,
383 companyId, groupId, status, max);
384
385 Object returnObj = null;
386
387 try {
388 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
389 }
390 catch (Exception e) {
391 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
392 throw (com.liferay.portal.kernel.exception.PortalException)e;
393 }
394
395 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
396 throw (com.liferay.portal.kernel.exception.SystemException)e;
397 }
398
399 throw new com.liferay.portal.kernel.exception.SystemException(e);
400 }
401
402 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
403 }
404 catch (com.liferay.portal.kernel.exception.SystemException se) {
405 _log.error(se, se);
406
407 throw se;
408 }
409 }
410
411 public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> getOrganizationEntries(
412 HttpPrincipal httpPrincipal, long organizationId, int status, int max)
413 throws com.liferay.portal.kernel.exception.PortalException,
414 com.liferay.portal.kernel.exception.SystemException {
415 try {
416 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
417 "getOrganizationEntries", long.class, int.class, int.class);
418
419 MethodHandler methodHandler = new MethodHandler(methodKey,
420 organizationId, status, max);
421
422 Object returnObj = null;
423
424 try {
425 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
426 }
427 catch (Exception e) {
428 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
429 throw (com.liferay.portal.kernel.exception.PortalException)e;
430 }
431
432 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
433 throw (com.liferay.portal.kernel.exception.SystemException)e;
434 }
435
436 throw new com.liferay.portal.kernel.exception.SystemException(e);
437 }
438
439 return (java.util.List<com.liferay.portlet.blogs.model.BlogsEntry>)returnObj;
440 }
441 catch (com.liferay.portal.kernel.exception.SystemException se) {
442 _log.error(se, se);
443
444 throw se;
445 }
446 }
447
448 public static java.lang.String getOrganizationEntriesRSS(
449 HttpPrincipal httpPrincipal, long organizationId, int status, int max,
450 java.lang.String type, double version, java.lang.String displayStyle,
451 java.lang.String feedURL, java.lang.String entryURL,
452 com.liferay.portal.theme.ThemeDisplay themeDisplay)
453 throws com.liferay.portal.kernel.exception.PortalException,
454 com.liferay.portal.kernel.exception.SystemException {
455 try {
456 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
457 "getOrganizationEntriesRSS", long.class, int.class,
458 int.class, java.lang.String.class, double.class,
459 java.lang.String.class, java.lang.String.class,
460 java.lang.String.class,
461 com.liferay.portal.theme.ThemeDisplay.class);
462
463 MethodHandler methodHandler = new MethodHandler(methodKey,
464 organizationId, status, max, type, version, displayStyle,
465 feedURL, entryURL, themeDisplay);
466
467 Object returnObj = null;
468
469 try {
470 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
471 }
472 catch (Exception e) {
473 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
474 throw (com.liferay.portal.kernel.exception.PortalException)e;
475 }
476
477 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
478 throw (com.liferay.portal.kernel.exception.SystemException)e;
479 }
480
481 throw new com.liferay.portal.kernel.exception.SystemException(e);
482 }
483
484 return (java.lang.String)returnObj;
485 }
486 catch (com.liferay.portal.kernel.exception.SystemException se) {
487 _log.error(se, se);
488
489 throw se;
490 }
491 }
492
493 public static com.liferay.portlet.blogs.model.BlogsEntry updateEntry(
494 HttpPrincipal httpPrincipal, long entryId, java.lang.String title,
495 java.lang.String content, int displayDateMonth, int displayDateDay,
496 int displayDateYear, int displayDateHour, int displayDateMinute,
497 boolean allowPingbacks, boolean allowTrackbacks,
498 java.lang.String[] trackbacks,
499 com.liferay.portal.service.ServiceContext serviceContext)
500 throws com.liferay.portal.kernel.exception.PortalException,
501 com.liferay.portal.kernel.exception.SystemException {
502 try {
503 MethodKey methodKey = new MethodKey(BlogsEntryServiceUtil.class.getName(),
504 "updateEntry", long.class, java.lang.String.class,
505 java.lang.String.class, int.class, int.class, int.class,
506 int.class, int.class, boolean.class, boolean.class,
507 java.lang.String[].class,
508 com.liferay.portal.service.ServiceContext.class);
509
510 MethodHandler methodHandler = new MethodHandler(methodKey, entryId,
511 title, content, displayDateMonth, displayDateDay,
512 displayDateYear, displayDateHour, displayDateMinute,
513 allowPingbacks, allowTrackbacks, trackbacks, serviceContext);
514
515 Object returnObj = null;
516
517 try {
518 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
519 }
520 catch (Exception e) {
521 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
522 throw (com.liferay.portal.kernel.exception.PortalException)e;
523 }
524
525 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
526 throw (com.liferay.portal.kernel.exception.SystemException)e;
527 }
528
529 throw new com.liferay.portal.kernel.exception.SystemException(e);
530 }
531
532 return (com.liferay.portlet.blogs.model.BlogsEntry)returnObj;
533 }
534 catch (com.liferay.portal.kernel.exception.SystemException se) {
535 _log.error(se, se);
536
537 throw se;
538 }
539 }
540
541 private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceHttp.class);
542 }