001
014
015 package com.liferay.portlet.journal.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.journal.service.JournalTemplateServiceUtil;
025
026
056 public class JournalTemplateServiceHttp {
057 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
058 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
059 boolean autoTemplateId, java.lang.String structureId,
060 java.util.Map<java.util.Locale, java.lang.String> nameMap,
061 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062 java.lang.String xsl, boolean formatXsl, java.lang.String langType,
063 boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
064 java.io.File smallFile,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 try {
069 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
070 "addTemplate", _addTemplateParameterTypes0);
071
072 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
073 templateId, autoTemplateId, structureId, nameMap,
074 descriptionMap, xsl, formatXsl, langType, cacheable,
075 smallImage, smallImageURL, smallFile, serviceContext);
076
077 Object returnObj = null;
078
079 try {
080 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
081 }
082 catch (Exception e) {
083 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
084 throw (com.liferay.portal.kernel.exception.PortalException)e;
085 }
086
087 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
088 throw (com.liferay.portal.kernel.exception.SystemException)e;
089 }
090
091 throw new com.liferay.portal.kernel.exception.SystemException(e);
092 }
093
094 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
095 }
096 catch (com.liferay.portal.kernel.exception.SystemException se) {
097 _log.error(se, se);
098
099 throw se;
100 }
101 }
102
103 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
104 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
105 boolean autoTemplateId, java.lang.String structureId,
106 java.util.Map<java.util.Locale, java.lang.String> nameMap,
107 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
108 java.lang.String xsl, boolean formatXsl, java.lang.String langType,
109 boolean cacheable,
110 com.liferay.portal.service.ServiceContext serviceContext)
111 throws com.liferay.portal.kernel.exception.PortalException,
112 com.liferay.portal.kernel.exception.SystemException {
113 try {
114 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
115 "addTemplate", _addTemplateParameterTypes1);
116
117 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
118 templateId, autoTemplateId, structureId, nameMap,
119 descriptionMap, xsl, formatXsl, langType, cacheable,
120 serviceContext);
121
122 Object returnObj = null;
123
124 try {
125 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
126 }
127 catch (Exception e) {
128 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
129 throw (com.liferay.portal.kernel.exception.PortalException)e;
130 }
131
132 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
133 throw (com.liferay.portal.kernel.exception.SystemException)e;
134 }
135
136 throw new com.liferay.portal.kernel.exception.SystemException(e);
137 }
138
139 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
140 }
141 catch (com.liferay.portal.kernel.exception.SystemException se) {
142 _log.error(se, se);
143
144 throw se;
145 }
146 }
147
148 public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
149 HttpPrincipal httpPrincipal, long groupId,
150 java.lang.String oldTemplateId, java.lang.String newTemplateId,
151 boolean autoTemplateId)
152 throws com.liferay.portal.kernel.exception.PortalException,
153 com.liferay.portal.kernel.exception.SystemException {
154 try {
155 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
156 "copyTemplate", _copyTemplateParameterTypes2);
157
158 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
159 oldTemplateId, newTemplateId, autoTemplateId);
160
161 Object returnObj = null;
162
163 try {
164 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
165 }
166 catch (Exception e) {
167 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
168 throw (com.liferay.portal.kernel.exception.PortalException)e;
169 }
170
171 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
172 throw (com.liferay.portal.kernel.exception.SystemException)e;
173 }
174
175 throw new com.liferay.portal.kernel.exception.SystemException(e);
176 }
177
178 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
179 }
180 catch (com.liferay.portal.kernel.exception.SystemException se) {
181 _log.error(se, se);
182
183 throw se;
184 }
185 }
186
187 public static void deleteTemplate(HttpPrincipal httpPrincipal,
188 long groupId, java.lang.String templateId)
189 throws com.liferay.portal.kernel.exception.PortalException,
190 com.liferay.portal.kernel.exception.SystemException {
191 try {
192 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
193 "deleteTemplate", _deleteTemplateParameterTypes3);
194
195 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
196 templateId);
197
198 try {
199 TunnelUtil.invoke(httpPrincipal, methodHandler);
200 }
201 catch (Exception e) {
202 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
203 throw (com.liferay.portal.kernel.exception.PortalException)e;
204 }
205
206 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
207 throw (com.liferay.portal.kernel.exception.SystemException)e;
208 }
209
210 throw new com.liferay.portal.kernel.exception.SystemException(e);
211 }
212 }
213 catch (com.liferay.portal.kernel.exception.SystemException se) {
214 _log.error(se, se);
215
216 throw se;
217 }
218 }
219
220 public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
221 HttpPrincipal httpPrincipal, long groupId, java.lang.String structureId)
222 throws com.liferay.portal.kernel.exception.SystemException {
223 try {
224 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
225 "getStructureTemplates",
226 _getStructureTemplatesParameterTypes4);
227
228 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
229 structureId);
230
231 Object returnObj = null;
232
233 try {
234 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
235 }
236 catch (Exception e) {
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 (java.util.List<com.liferay.portlet.journal.model.JournalTemplate>)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.journal.model.JournalTemplate getTemplate(
254 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId)
255 throws com.liferay.portal.kernel.exception.PortalException,
256 com.liferay.portal.kernel.exception.SystemException {
257 try {
258 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
259 "getTemplate", _getTemplateParameterTypes5);
260
261 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
262 templateId);
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.journal.model.JournalTemplate)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 com.liferay.portlet.journal.model.JournalTemplate getTemplate(
291 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
292 boolean includeGlobalTemplates)
293 throws com.liferay.portal.kernel.exception.PortalException,
294 com.liferay.portal.kernel.exception.SystemException {
295 try {
296 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
297 "getTemplate", _getTemplateParameterTypes6);
298
299 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
300 templateId, includeGlobalTemplates);
301
302 Object returnObj = null;
303
304 try {
305 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
306 }
307 catch (Exception e) {
308 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
309 throw (com.liferay.portal.kernel.exception.PortalException)e;
310 }
311
312 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
313 throw (com.liferay.portal.kernel.exception.SystemException)e;
314 }
315
316 throw new com.liferay.portal.kernel.exception.SystemException(e);
317 }
318
319 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
320 }
321 catch (com.liferay.portal.kernel.exception.SystemException se) {
322 _log.error(se, se);
323
324 throw se;
325 }
326 }
327
328 public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
329 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
330 java.lang.String keywords, java.lang.String structureId,
331 java.lang.String structureIdComparator, int start, int end,
332 com.liferay.portal.kernel.util.OrderByComparator obc)
333 throws com.liferay.portal.kernel.exception.SystemException {
334 try {
335 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
336 "search", _searchParameterTypes7);
337
338 MethodHandler methodHandler = new MethodHandler(methodKey,
339 companyId, groupIds, keywords, structureId,
340 structureIdComparator, start, end, obc);
341
342 Object returnObj = null;
343
344 try {
345 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
346 }
347 catch (Exception e) {
348 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
349 throw (com.liferay.portal.kernel.exception.SystemException)e;
350 }
351
352 throw new com.liferay.portal.kernel.exception.SystemException(e);
353 }
354
355 return (java.util.List<com.liferay.portlet.journal.model.JournalTemplate>)returnObj;
356 }
357 catch (com.liferay.portal.kernel.exception.SystemException se) {
358 _log.error(se, se);
359
360 throw se;
361 }
362 }
363
364 public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> search(
365 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
366 java.lang.String templateId, java.lang.String structureId,
367 java.lang.String structureIdComparator, java.lang.String name,
368 java.lang.String description, boolean andOperator, int start, int end,
369 com.liferay.portal.kernel.util.OrderByComparator obc)
370 throws com.liferay.portal.kernel.exception.SystemException {
371 try {
372 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
373 "search", _searchParameterTypes8);
374
375 MethodHandler methodHandler = new MethodHandler(methodKey,
376 companyId, groupIds, templateId, structureId,
377 structureIdComparator, name, description, andOperator,
378 start, end, obc);
379
380 Object returnObj = null;
381
382 try {
383 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
384 }
385 catch (Exception e) {
386 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
387 throw (com.liferay.portal.kernel.exception.SystemException)e;
388 }
389
390 throw new com.liferay.portal.kernel.exception.SystemException(e);
391 }
392
393 return (java.util.List<com.liferay.portlet.journal.model.JournalTemplate>)returnObj;
394 }
395 catch (com.liferay.portal.kernel.exception.SystemException se) {
396 _log.error(se, se);
397
398 throw se;
399 }
400 }
401
402 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
403 long[] groupIds, java.lang.String keywords,
404 java.lang.String structureId, java.lang.String structureIdComparator)
405 throws com.liferay.portal.kernel.exception.SystemException {
406 try {
407 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
408 "searchCount", _searchCountParameterTypes9);
409
410 MethodHandler methodHandler = new MethodHandler(methodKey,
411 companyId, groupIds, keywords, structureId,
412 structureIdComparator);
413
414 Object returnObj = null;
415
416 try {
417 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
418 }
419 catch (Exception e) {
420 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
421 throw (com.liferay.portal.kernel.exception.SystemException)e;
422 }
423
424 throw new com.liferay.portal.kernel.exception.SystemException(e);
425 }
426
427 return ((Integer)returnObj).intValue();
428 }
429 catch (com.liferay.portal.kernel.exception.SystemException se) {
430 _log.error(se, se);
431
432 throw se;
433 }
434 }
435
436 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
437 long[] groupIds, java.lang.String templateId,
438 java.lang.String structureId, java.lang.String structureIdComparator,
439 java.lang.String name, java.lang.String description, boolean andOperator)
440 throws com.liferay.portal.kernel.exception.SystemException {
441 try {
442 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
443 "searchCount", _searchCountParameterTypes10);
444
445 MethodHandler methodHandler = new MethodHandler(methodKey,
446 companyId, groupIds, templateId, structureId,
447 structureIdComparator, name, description, andOperator);
448
449 Object returnObj = null;
450
451 try {
452 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
453 }
454 catch (Exception e) {
455 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
456 throw (com.liferay.portal.kernel.exception.SystemException)e;
457 }
458
459 throw new com.liferay.portal.kernel.exception.SystemException(e);
460 }
461
462 return ((Integer)returnObj).intValue();
463 }
464 catch (com.liferay.portal.kernel.exception.SystemException se) {
465 _log.error(se, se);
466
467 throw se;
468 }
469 }
470
471 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
472 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
473 java.lang.String structureId,
474 java.util.Map<java.util.Locale, java.lang.String> nameMap,
475 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
476 java.lang.String xsl, boolean formatXsl, java.lang.String langType,
477 boolean cacheable, boolean smallImage, java.lang.String smallImageURL,
478 java.io.File smallFile,
479 com.liferay.portal.service.ServiceContext serviceContext)
480 throws com.liferay.portal.kernel.exception.PortalException,
481 com.liferay.portal.kernel.exception.SystemException {
482 try {
483 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
484 "updateTemplate", _updateTemplateParameterTypes11);
485
486 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
487 templateId, structureId, nameMap, descriptionMap, xsl,
488 formatXsl, langType, cacheable, smallImage, smallImageURL,
489 smallFile, serviceContext);
490
491 Object returnObj = null;
492
493 try {
494 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
495 }
496 catch (Exception e) {
497 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
498 throw (com.liferay.portal.kernel.exception.PortalException)e;
499 }
500
501 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
502 throw (com.liferay.portal.kernel.exception.SystemException)e;
503 }
504
505 throw new com.liferay.portal.kernel.exception.SystemException(e);
506 }
507
508 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
509 }
510 catch (com.liferay.portal.kernel.exception.SystemException se) {
511 _log.error(se, se);
512
513 throw se;
514 }
515 }
516
517 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
518 HttpPrincipal httpPrincipal, long groupId, java.lang.String templateId,
519 java.lang.String structureId,
520 java.util.Map<java.util.Locale, java.lang.String> nameMap,
521 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
522 java.lang.String xsl, boolean formatXsl, java.lang.String langType,
523 boolean cacheable,
524 com.liferay.portal.service.ServiceContext serviceContext)
525 throws com.liferay.portal.kernel.exception.PortalException,
526 com.liferay.portal.kernel.exception.SystemException {
527 try {
528 MethodKey methodKey = new MethodKey(JournalTemplateServiceUtil.class.getName(),
529 "updateTemplate", _updateTemplateParameterTypes12);
530
531 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
532 templateId, structureId, nameMap, descriptionMap, xsl,
533 formatXsl, langType, cacheable, serviceContext);
534
535 Object returnObj = null;
536
537 try {
538 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
539 }
540 catch (Exception e) {
541 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
542 throw (com.liferay.portal.kernel.exception.PortalException)e;
543 }
544
545 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
546 throw (com.liferay.portal.kernel.exception.SystemException)e;
547 }
548
549 throw new com.liferay.portal.kernel.exception.SystemException(e);
550 }
551
552 return (com.liferay.portlet.journal.model.JournalTemplate)returnObj;
553 }
554 catch (com.liferay.portal.kernel.exception.SystemException se) {
555 _log.error(se, se);
556
557 throw se;
558 }
559 }
560
561 private static Log _log = LogFactoryUtil.getLog(JournalTemplateServiceHttp.class);
562 private static final Class<?>[] _addTemplateParameterTypes0 = new Class[] {
563 long.class, java.lang.String.class, boolean.class,
564 java.lang.String.class, java.util.Map.class, java.util.Map.class,
565 java.lang.String.class, boolean.class, java.lang.String.class,
566 boolean.class, boolean.class, java.lang.String.class,
567 java.io.File.class, com.liferay.portal.service.ServiceContext.class
568 };
569 private static final Class<?>[] _addTemplateParameterTypes1 = new Class[] {
570 long.class, java.lang.String.class, boolean.class,
571 java.lang.String.class, java.util.Map.class, java.util.Map.class,
572 java.lang.String.class, boolean.class, java.lang.String.class,
573 boolean.class, com.liferay.portal.service.ServiceContext.class
574 };
575 private static final Class<?>[] _copyTemplateParameterTypes2 = new Class[] {
576 long.class, java.lang.String.class, java.lang.String.class,
577 boolean.class
578 };
579 private static final Class<?>[] _deleteTemplateParameterTypes3 = new Class[] {
580 long.class, java.lang.String.class
581 };
582 private static final Class<?>[] _getStructureTemplatesParameterTypes4 = new Class[] {
583 long.class, java.lang.String.class
584 };
585 private static final Class<?>[] _getTemplateParameterTypes5 = new Class[] {
586 long.class, java.lang.String.class
587 };
588 private static final Class<?>[] _getTemplateParameterTypes6 = new Class[] {
589 long.class, java.lang.String.class, boolean.class
590 };
591 private static final Class<?>[] _searchParameterTypes7 = new Class[] {
592 long.class, long[].class, java.lang.String.class,
593 java.lang.String.class, java.lang.String.class, int.class, int.class,
594 com.liferay.portal.kernel.util.OrderByComparator.class
595 };
596 private static final Class<?>[] _searchParameterTypes8 = new Class[] {
597 long.class, long[].class, java.lang.String.class,
598 java.lang.String.class, java.lang.String.class,
599 java.lang.String.class, java.lang.String.class, boolean.class,
600 int.class, int.class,
601 com.liferay.portal.kernel.util.OrderByComparator.class
602 };
603 private static final Class<?>[] _searchCountParameterTypes9 = new Class[] {
604 long.class, long[].class, java.lang.String.class,
605 java.lang.String.class, java.lang.String.class
606 };
607 private static final Class<?>[] _searchCountParameterTypes10 = new Class[] {
608 long.class, long[].class, java.lang.String.class,
609 java.lang.String.class, java.lang.String.class,
610 java.lang.String.class, java.lang.String.class, boolean.class
611 };
612 private static final Class<?>[] _updateTemplateParameterTypes11 = new Class[] {
613 long.class, java.lang.String.class, java.lang.String.class,
614 java.util.Map.class, java.util.Map.class, java.lang.String.class,
615 boolean.class, java.lang.String.class, boolean.class, boolean.class,
616 java.lang.String.class, java.io.File.class,
617 com.liferay.portal.service.ServiceContext.class
618 };
619 private static final Class<?>[] _updateTemplateParameterTypes12 = new Class[] {
620 long.class, java.lang.String.class, java.lang.String.class,
621 java.util.Map.class, java.util.Map.class, java.lang.String.class,
622 boolean.class, java.lang.String.class, boolean.class,
623 com.liferay.portal.service.ServiceContext.class
624 };
625 }