1
22
23 package com.liferay.portlet.tags.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.BooleanWrapper;
28 import com.liferay.portal.kernel.util.DoubleWrapper;
29 import com.liferay.portal.kernel.util.IntegerWrapper;
30 import com.liferay.portal.kernel.util.LongWrapper;
31 import com.liferay.portal.kernel.util.MethodWrapper;
32 import com.liferay.portal.kernel.util.NullWrapper;
33 import com.liferay.portal.security.auth.HttpPrincipal;
34 import com.liferay.portal.service.http.TunnelUtil;
35
36 import com.liferay.portlet.tags.service.TagsAssetServiceUtil;
37
38
77 public class TagsAssetServiceHttp {
78 public static void deleteAsset(HttpPrincipal httpPrincipal, long assetId)
79 throws com.liferay.portal.PortalException,
80 com.liferay.portal.SystemException {
81 try {
82 Object paramObj0 = new LongWrapper(assetId);
83
84 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
85 "deleteAsset", new Object[] { paramObj0 });
86
87 try {
88 TunnelUtil.invoke(httpPrincipal, methodWrapper);
89 }
90 catch (Exception e) {
91 if (e instanceof com.liferay.portal.PortalException) {
92 throw (com.liferay.portal.PortalException)e;
93 }
94
95 if (e instanceof com.liferay.portal.SystemException) {
96 throw (com.liferay.portal.SystemException)e;
97 }
98
99 throw new com.liferay.portal.SystemException(e);
100 }
101 }
102 catch (com.liferay.portal.SystemException se) {
103 _log.error(se, se);
104
105 throw se;
106 }
107 }
108
109 public static com.liferay.portlet.tags.model.TagsAsset getAsset(
110 HttpPrincipal httpPrincipal, long assetId)
111 throws com.liferay.portal.PortalException,
112 com.liferay.portal.SystemException {
113 try {
114 Object paramObj0 = new LongWrapper(assetId);
115
116 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
117 "getAsset", new Object[] { paramObj0 });
118
119 Object returnObj = null;
120
121 try {
122 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
123 }
124 catch (Exception e) {
125 if (e instanceof com.liferay.portal.PortalException) {
126 throw (com.liferay.portal.PortalException)e;
127 }
128
129 if (e instanceof com.liferay.portal.SystemException) {
130 throw (com.liferay.portal.SystemException)e;
131 }
132
133 throw new com.liferay.portal.SystemException(e);
134 }
135
136 return (com.liferay.portlet.tags.model.TagsAsset)returnObj;
137 }
138 catch (com.liferay.portal.SystemException se) {
139 _log.error(se, se);
140
141 throw se;
142 }
143 }
144
145 public static java.lang.String getAssetsRSS(HttpPrincipal httpPrincipal,
146 long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
147 boolean andOperator, java.lang.String orderByCol1,
148 java.lang.String orderByCol2, java.lang.String orderByType1,
149 java.lang.String orderByType2, boolean excludeZeroViewCount,
150 java.util.Date publishDate, java.util.Date expirationDate, int max,
151 java.lang.String type, double version, java.lang.String displayStyle,
152 java.lang.String feedURL, java.lang.String entryURL)
153 throws com.liferay.portal.PortalException,
154 com.liferay.portal.SystemException {
155 try {
156 Object paramObj0 = new LongWrapper(groupId);
157
158 Object paramObj1 = classNameIds;
159
160 if (classNameIds == null) {
161 paramObj1 = new NullWrapper("[J");
162 }
163
164 Object paramObj2 = entryIds;
165
166 if (entryIds == null) {
167 paramObj2 = new NullWrapper("[J");
168 }
169
170 Object paramObj3 = notEntryIds;
171
172 if (notEntryIds == null) {
173 paramObj3 = new NullWrapper("[J");
174 }
175
176 Object paramObj4 = new BooleanWrapper(andOperator);
177
178 Object paramObj5 = orderByCol1;
179
180 if (orderByCol1 == null) {
181 paramObj5 = new NullWrapper("java.lang.String");
182 }
183
184 Object paramObj6 = orderByCol2;
185
186 if (orderByCol2 == null) {
187 paramObj6 = new NullWrapper("java.lang.String");
188 }
189
190 Object paramObj7 = orderByType1;
191
192 if (orderByType1 == null) {
193 paramObj7 = new NullWrapper("java.lang.String");
194 }
195
196 Object paramObj8 = orderByType2;
197
198 if (orderByType2 == null) {
199 paramObj8 = new NullWrapper("java.lang.String");
200 }
201
202 Object paramObj9 = new BooleanWrapper(excludeZeroViewCount);
203
204 Object paramObj10 = publishDate;
205
206 if (publishDate == null) {
207 paramObj10 = new NullWrapper("java.util.Date");
208 }
209
210 Object paramObj11 = expirationDate;
211
212 if (expirationDate == null) {
213 paramObj11 = new NullWrapper("java.util.Date");
214 }
215
216 Object paramObj12 = new IntegerWrapper(max);
217
218 Object paramObj13 = type;
219
220 if (type == null) {
221 paramObj13 = new NullWrapper("java.lang.String");
222 }
223
224 Object paramObj14 = new DoubleWrapper(version);
225
226 Object paramObj15 = displayStyle;
227
228 if (displayStyle == null) {
229 paramObj15 = new NullWrapper("java.lang.String");
230 }
231
232 Object paramObj16 = feedURL;
233
234 if (feedURL == null) {
235 paramObj16 = new NullWrapper("java.lang.String");
236 }
237
238 Object paramObj17 = entryURL;
239
240 if (entryURL == null) {
241 paramObj17 = new NullWrapper("java.lang.String");
242 }
243
244 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
245 "getAssetsRSS",
246 new Object[] {
247 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
248 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
249 paramObj10, paramObj11, paramObj12, paramObj13,
250 paramObj14, paramObj15, paramObj16, paramObj17
251 });
252
253 Object returnObj = null;
254
255 try {
256 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
257 }
258 catch (Exception e) {
259 if (e instanceof com.liferay.portal.PortalException) {
260 throw (com.liferay.portal.PortalException)e;
261 }
262
263 if (e instanceof com.liferay.portal.SystemException) {
264 throw (com.liferay.portal.SystemException)e;
265 }
266
267 throw new com.liferay.portal.SystemException(e);
268 }
269
270 return (java.lang.String)returnObj;
271 }
272 catch (com.liferay.portal.SystemException se) {
273 _log.error(se, se);
274
275 throw se;
276 }
277 }
278
279 public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
280 HttpPrincipal httpPrincipal, java.lang.String languageId)
281 throws com.liferay.portal.SystemException {
282 try {
283 Object paramObj0 = languageId;
284
285 if (languageId == null) {
286 paramObj0 = new NullWrapper("java.lang.String");
287 }
288
289 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
290 "getAssetTypes", new Object[] { paramObj0 });
291
292 Object returnObj = null;
293
294 try {
295 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
296 }
297 catch (Exception e) {
298 throw new com.liferay.portal.SystemException(e);
299 }
300
301 return (com.liferay.portlet.tags.model.TagsAssetType[])returnObj;
302 }
303 catch (com.liferay.portal.SystemException se) {
304 _log.error(se, se);
305
306 throw se;
307 }
308 }
309
310 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
311 HttpPrincipal httpPrincipal, long companyId, int start, int end,
312 java.lang.String languageId) throws com.liferay.portal.SystemException {
313 try {
314 Object paramObj0 = new LongWrapper(companyId);
315
316 Object paramObj1 = new IntegerWrapper(start);
317
318 Object paramObj2 = new IntegerWrapper(end);
319
320 Object paramObj3 = languageId;
321
322 if (languageId == null) {
323 paramObj3 = new NullWrapper("java.lang.String");
324 }
325
326 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
327 "getCompanyAssetDisplays",
328 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
329
330 Object returnObj = null;
331
332 try {
333 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
334 }
335 catch (Exception e) {
336 if (e instanceof com.liferay.portal.SystemException) {
337 throw (com.liferay.portal.SystemException)e;
338 }
339
340 throw new com.liferay.portal.SystemException(e);
341 }
342
343 return (com.liferay.portlet.tags.model.TagsAssetDisplay[])returnObj;
344 }
345 catch (com.liferay.portal.SystemException se) {
346 _log.error(se, se);
347
348 throw se;
349 }
350 }
351
352 public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
353 HttpPrincipal httpPrincipal, long companyId, int start, int end)
354 throws com.liferay.portal.SystemException {
355 try {
356 Object paramObj0 = new LongWrapper(companyId);
357
358 Object paramObj1 = new IntegerWrapper(start);
359
360 Object paramObj2 = new IntegerWrapper(end);
361
362 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
363 "getCompanyAssets",
364 new Object[] { paramObj0, paramObj1, paramObj2 });
365
366 Object returnObj = null;
367
368 try {
369 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
370 }
371 catch (Exception e) {
372 if (e instanceof com.liferay.portal.SystemException) {
373 throw (com.liferay.portal.SystemException)e;
374 }
375
376 throw new com.liferay.portal.SystemException(e);
377 }
378
379 return (java.util.List<com.liferay.portlet.tags.model.TagsAsset>)returnObj;
380 }
381 catch (com.liferay.portal.SystemException se) {
382 _log.error(se, se);
383
384 throw se;
385 }
386 }
387
388 public static int getCompanyAssetsCount(HttpPrincipal httpPrincipal,
389 long companyId) throws com.liferay.portal.SystemException {
390 try {
391 Object paramObj0 = new LongWrapper(companyId);
392
393 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
394 "getCompanyAssetsCount", new Object[] { paramObj0 });
395
396 Object returnObj = null;
397
398 try {
399 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
400 }
401 catch (Exception e) {
402 if (e instanceof com.liferay.portal.SystemException) {
403 throw (com.liferay.portal.SystemException)e;
404 }
405
406 throw new com.liferay.portal.SystemException(e);
407 }
408
409 return ((Integer)returnObj).intValue();
410 }
411 catch (com.liferay.portal.SystemException se) {
412 _log.error(se, se);
413
414 throw se;
415 }
416 }
417
418 public static java.lang.String getCompanyAssetsRSS(
419 HttpPrincipal httpPrincipal, long companyId, int max,
420 java.lang.String type, double version, java.lang.String displayStyle,
421 java.lang.String feedURL, java.lang.String entryURL)
422 throws com.liferay.portal.PortalException,
423 com.liferay.portal.SystemException {
424 try {
425 Object paramObj0 = new LongWrapper(companyId);
426
427 Object paramObj1 = new IntegerWrapper(max);
428
429 Object paramObj2 = type;
430
431 if (type == null) {
432 paramObj2 = new NullWrapper("java.lang.String");
433 }
434
435 Object paramObj3 = new DoubleWrapper(version);
436
437 Object paramObj4 = displayStyle;
438
439 if (displayStyle == null) {
440 paramObj4 = new NullWrapper("java.lang.String");
441 }
442
443 Object paramObj5 = feedURL;
444
445 if (feedURL == null) {
446 paramObj5 = new NullWrapper("java.lang.String");
447 }
448
449 Object paramObj6 = entryURL;
450
451 if (entryURL == null) {
452 paramObj6 = new NullWrapper("java.lang.String");
453 }
454
455 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
456 "getCompanyAssetsRSS",
457 new Object[] {
458 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
459 paramObj5, paramObj6
460 });
461
462 Object returnObj = null;
463
464 try {
465 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
466 }
467 catch (Exception e) {
468 if (e instanceof com.liferay.portal.PortalException) {
469 throw (com.liferay.portal.PortalException)e;
470 }
471
472 if (e instanceof com.liferay.portal.SystemException) {
473 throw (com.liferay.portal.SystemException)e;
474 }
475
476 throw new com.liferay.portal.SystemException(e);
477 }
478
479 return (java.lang.String)returnObj;
480 }
481 catch (com.liferay.portal.SystemException se) {
482 _log.error(se, se);
483
484 throw se;
485 }
486 }
487
488 public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
489 HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
490 throws com.liferay.portal.SystemException {
491 try {
492 Object paramObj0 = className;
493
494 if (className == null) {
495 paramObj0 = new NullWrapper("java.lang.String");
496 }
497
498 Object paramObj1 = new LongWrapper(classPK);
499
500 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
501 "incrementViewCounter",
502 new Object[] { paramObj0, paramObj1 });
503
504 Object returnObj = null;
505
506 try {
507 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
508 }
509 catch (Exception e) {
510 if (e instanceof com.liferay.portal.SystemException) {
511 throw (com.liferay.portal.SystemException)e;
512 }
513
514 throw new com.liferay.portal.SystemException(e);
515 }
516
517 return (com.liferay.portlet.tags.model.TagsAsset)returnObj;
518 }
519 catch (com.liferay.portal.SystemException se) {
520 _log.error(se, se);
521
522 throw se;
523 }
524 }
525
526 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
527 HttpPrincipal httpPrincipal, long companyId,
528 java.lang.String portletId, java.lang.String keywords,
529 java.lang.String languageId, int start, int end)
530 throws com.liferay.portal.SystemException {
531 try {
532 Object paramObj0 = new LongWrapper(companyId);
533
534 Object paramObj1 = portletId;
535
536 if (portletId == null) {
537 paramObj1 = new NullWrapper("java.lang.String");
538 }
539
540 Object paramObj2 = keywords;
541
542 if (keywords == null) {
543 paramObj2 = new NullWrapper("java.lang.String");
544 }
545
546 Object paramObj3 = languageId;
547
548 if (languageId == null) {
549 paramObj3 = new NullWrapper("java.lang.String");
550 }
551
552 Object paramObj4 = new IntegerWrapper(start);
553
554 Object paramObj5 = new IntegerWrapper(end);
555
556 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
557 "searchAssetDisplays",
558 new Object[] {
559 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
560 paramObj5
561 });
562
563 Object returnObj = null;
564
565 try {
566 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
567 }
568 catch (Exception e) {
569 if (e instanceof com.liferay.portal.SystemException) {
570 throw (com.liferay.portal.SystemException)e;
571 }
572
573 throw new com.liferay.portal.SystemException(e);
574 }
575
576 return (com.liferay.portlet.tags.model.TagsAssetDisplay[])returnObj;
577 }
578 catch (com.liferay.portal.SystemException se) {
579 _log.error(se, se);
580
581 throw se;
582 }
583 }
584
585 public static int searchAssetDisplaysCount(HttpPrincipal httpPrincipal,
586 long companyId, java.lang.String portletId, java.lang.String keywords,
587 java.lang.String languageId) throws com.liferay.portal.SystemException {
588 try {
589 Object paramObj0 = new LongWrapper(companyId);
590
591 Object paramObj1 = portletId;
592
593 if (portletId == null) {
594 paramObj1 = new NullWrapper("java.lang.String");
595 }
596
597 Object paramObj2 = keywords;
598
599 if (keywords == null) {
600 paramObj2 = new NullWrapper("java.lang.String");
601 }
602
603 Object paramObj3 = languageId;
604
605 if (languageId == null) {
606 paramObj3 = new NullWrapper("java.lang.String");
607 }
608
609 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
610 "searchAssetDisplaysCount",
611 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
612
613 Object returnObj = null;
614
615 try {
616 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
617 }
618 catch (Exception e) {
619 if (e instanceof com.liferay.portal.SystemException) {
620 throw (com.liferay.portal.SystemException)e;
621 }
622
623 throw new com.liferay.portal.SystemException(e);
624 }
625
626 return ((Integer)returnObj).intValue();
627 }
628 catch (com.liferay.portal.SystemException se) {
629 _log.error(se, se);
630
631 throw se;
632 }
633 }
634
635 public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
636 HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
637 long classPK, java.lang.String[] entryNames, java.util.Date startDate,
638 java.util.Date endDate, java.util.Date publishDate,
639 java.util.Date expirationDate, java.lang.String mimeType,
640 java.lang.String title, java.lang.String description,
641 java.lang.String summary, java.lang.String url, int height, int width,
642 java.lang.Integer priority)
643 throws com.liferay.portal.PortalException,
644 com.liferay.portal.SystemException {
645 try {
646 Object paramObj0 = new LongWrapper(groupId);
647
648 Object paramObj1 = className;
649
650 if (className == null) {
651 paramObj1 = new NullWrapper("java.lang.String");
652 }
653
654 Object paramObj2 = new LongWrapper(classPK);
655
656 Object paramObj3 = entryNames;
657
658 if (entryNames == null) {
659 paramObj3 = new NullWrapper("[Ljava.lang.String;");
660 }
661
662 Object paramObj4 = startDate;
663
664 if (startDate == null) {
665 paramObj4 = new NullWrapper("java.util.Date");
666 }
667
668 Object paramObj5 = endDate;
669
670 if (endDate == null) {
671 paramObj5 = new NullWrapper("java.util.Date");
672 }
673
674 Object paramObj6 = publishDate;
675
676 if (publishDate == null) {
677 paramObj6 = new NullWrapper("java.util.Date");
678 }
679
680 Object paramObj7 = expirationDate;
681
682 if (expirationDate == null) {
683 paramObj7 = new NullWrapper("java.util.Date");
684 }
685
686 Object paramObj8 = mimeType;
687
688 if (mimeType == null) {
689 paramObj8 = new NullWrapper("java.lang.String");
690 }
691
692 Object paramObj9 = title;
693
694 if (title == null) {
695 paramObj9 = new NullWrapper("java.lang.String");
696 }
697
698 Object paramObj10 = description;
699
700 if (description == null) {
701 paramObj10 = new NullWrapper("java.lang.String");
702 }
703
704 Object paramObj11 = summary;
705
706 if (summary == null) {
707 paramObj11 = new NullWrapper("java.lang.String");
708 }
709
710 Object paramObj12 = url;
711
712 if (url == null) {
713 paramObj12 = new NullWrapper("java.lang.String");
714 }
715
716 Object paramObj13 = new IntegerWrapper(height);
717
718 Object paramObj14 = new IntegerWrapper(width);
719
720 Object paramObj15 = priority;
721
722 if (priority == null) {
723 paramObj15 = new NullWrapper("java.lang.Integer");
724 }
725
726 MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
727 "updateAsset",
728 new Object[] {
729 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
730 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
731 paramObj10, paramObj11, paramObj12, paramObj13,
732 paramObj14, paramObj15
733 });
734
735 Object returnObj = null;
736
737 try {
738 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
739 }
740 catch (Exception e) {
741 if (e instanceof com.liferay.portal.PortalException) {
742 throw (com.liferay.portal.PortalException)e;
743 }
744
745 if (e instanceof com.liferay.portal.SystemException) {
746 throw (com.liferay.portal.SystemException)e;
747 }
748
749 throw new com.liferay.portal.SystemException(e);
750 }
751
752 return (com.liferay.portlet.tags.model.TagsAsset)returnObj;
753 }
754 catch (com.liferay.portal.SystemException se) {
755 _log.error(se, se);
756
757 throw se;
758 }
759 }
760
761 private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceHttp.class);
762 }