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