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