1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
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  /**
39   * <a href="TagsAssetServiceHttp.java.html"><b><i>View Source</i></b></a>
40   *
41   * <p>
42   * ServiceBuilder generated this class. Modifications in this class will be
43   * overwritten the next time is generated.
44   * </p>
45   *
46   * <p>
47   * This class provides a HTTP utility for the
48   * <code>com.liferay.portlet.tags.service.TagsAssetServiceUtil</code> service
49   * utility. The static methods of this class calls the same methods of the
50   * service utility. However, the signatures are different because it requires an
51   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
52   * parameter.
53   * </p>
54   *
55   * <p>
56   * The benefits of using the HTTP utility is that it is fast and allows for
57   * tunneling without the cost of serializing to text. The drawback is that it
58   * only works with Java.
59   * </p>
60   *
61   * <p>
62   * Set the property <code>tunnel.servlet.hosts.allowed</code> in
63   * portal.properties to configure security.
64   * </p>
65   *
66   * <p>
67   * The HTTP utility is only generated for remote services.
68   * </p>
69   *
70   * @author Brian Wing Shun Chan
71   *
72   * @see com.liferay.portal.security.auth.HttpPrincipal
73   * @see com.liferay.portlet.tags.service.TagsAssetServiceUtil
74   * @see com.liferay.portlet.tags.service.http.TagsAssetServiceSoap
75   *
76   */
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.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
146         HttpPrincipal httpPrincipal, long groupId, long[] classNameIds,
147         long[] entryIds, long[] notEntryIds, boolean andOperator,
148         java.lang.String orderByCol1, java.lang.String orderByCol2,
149         java.lang.String orderByType1, java.lang.String orderByType2,
150         boolean excludeZeroViewCount, java.util.Date publishDate,
151         java.util.Date expirationDate, int start, int end)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         try {
155             Object paramObj0 = new LongWrapper(groupId);
156 
157             Object paramObj1 = classNameIds;
158 
159             if (classNameIds == null) {
160                 paramObj1 = new NullWrapper("[J");
161             }
162 
163             Object paramObj2 = entryIds;
164 
165             if (entryIds == null) {
166                 paramObj2 = new NullWrapper("[J");
167             }
168 
169             Object paramObj3 = notEntryIds;
170 
171             if (notEntryIds == null) {
172                 paramObj3 = new NullWrapper("[J");
173             }
174 
175             Object paramObj4 = new BooleanWrapper(andOperator);
176 
177             Object paramObj5 = orderByCol1;
178 
179             if (orderByCol1 == null) {
180                 paramObj5 = new NullWrapper("java.lang.String");
181             }
182 
183             Object paramObj6 = orderByCol2;
184 
185             if (orderByCol2 == null) {
186                 paramObj6 = new NullWrapper("java.lang.String");
187             }
188 
189             Object paramObj7 = orderByType1;
190 
191             if (orderByType1 == null) {
192                 paramObj7 = new NullWrapper("java.lang.String");
193             }
194 
195             Object paramObj8 = orderByType2;
196 
197             if (orderByType2 == null) {
198                 paramObj8 = new NullWrapper("java.lang.String");
199             }
200 
201             Object paramObj9 = new BooleanWrapper(excludeZeroViewCount);
202 
203             Object paramObj10 = publishDate;
204 
205             if (publishDate == null) {
206                 paramObj10 = new NullWrapper("java.util.Date");
207             }
208 
209             Object paramObj11 = expirationDate;
210 
211             if (expirationDate == null) {
212                 paramObj11 = new NullWrapper("java.util.Date");
213             }
214 
215             Object paramObj12 = new IntegerWrapper(start);
216 
217             Object paramObj13 = new IntegerWrapper(end);
218 
219             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
220                     "getAssets",
221                     new Object[] {
222                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
223                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
224                         paramObj10, paramObj11, paramObj12, paramObj13
225                     });
226 
227             Object returnObj = null;
228 
229             try {
230                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
231             }
232             catch (Exception e) {
233                 if (e instanceof com.liferay.portal.PortalException) {
234                     throw (com.liferay.portal.PortalException)e;
235                 }
236 
237                 if (e instanceof com.liferay.portal.SystemException) {
238                     throw (com.liferay.portal.SystemException)e;
239                 }
240 
241                 throw new com.liferay.portal.SystemException(e);
242             }
243 
244             return (java.util.List<com.liferay.portlet.tags.model.TagsAsset>)returnObj;
245         }
246         catch (com.liferay.portal.SystemException se) {
247             _log.error(se, se);
248 
249             throw se;
250         }
251     }
252 
253     public static int getAssetsCount(HttpPrincipal httpPrincipal, long groupId,
254         long[] classNameIds, long[] entryIds, long[] notEntryIds,
255         boolean andOperator, boolean excludeZeroViewCount,
256         java.util.Date publishDate, java.util.Date expirationDate)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException {
259         try {
260             Object paramObj0 = new LongWrapper(groupId);
261 
262             Object paramObj1 = classNameIds;
263 
264             if (classNameIds == null) {
265                 paramObj1 = new NullWrapper("[J");
266             }
267 
268             Object paramObj2 = entryIds;
269 
270             if (entryIds == null) {
271                 paramObj2 = new NullWrapper("[J");
272             }
273 
274             Object paramObj3 = notEntryIds;
275 
276             if (notEntryIds == null) {
277                 paramObj3 = new NullWrapper("[J");
278             }
279 
280             Object paramObj4 = new BooleanWrapper(andOperator);
281 
282             Object paramObj5 = new BooleanWrapper(excludeZeroViewCount);
283 
284             Object paramObj6 = publishDate;
285 
286             if (publishDate == null) {
287                 paramObj6 = new NullWrapper("java.util.Date");
288             }
289 
290             Object paramObj7 = expirationDate;
291 
292             if (expirationDate == null) {
293                 paramObj7 = new NullWrapper("java.util.Date");
294             }
295 
296             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
297                     "getAssetsCount",
298                     new Object[] {
299                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
300                         paramObj5, paramObj6, paramObj7
301                     });
302 
303             Object returnObj = null;
304 
305             try {
306                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
307             }
308             catch (Exception e) {
309                 if (e instanceof com.liferay.portal.PortalException) {
310                     throw (com.liferay.portal.PortalException)e;
311                 }
312 
313                 if (e instanceof com.liferay.portal.SystemException) {
314                     throw (com.liferay.portal.SystemException)e;
315                 }
316 
317                 throw new com.liferay.portal.SystemException(e);
318             }
319 
320             return ((Integer)returnObj).intValue();
321         }
322         catch (com.liferay.portal.SystemException se) {
323             _log.error(se, se);
324 
325             throw se;
326         }
327     }
328 
329     public static java.lang.String getAssetsRSS(HttpPrincipal httpPrincipal,
330         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
331         boolean andOperator, java.lang.String orderByCol1,
332         java.lang.String orderByCol2, java.lang.String orderByType1,
333         java.lang.String orderByType2, boolean excludeZeroViewCount,
334         java.util.Date publishDate, java.util.Date expirationDate, int max,
335         java.lang.String type, double version, java.lang.String displayStyle,
336         java.lang.String feedURL, java.lang.String entryURL)
337         throws com.liferay.portal.PortalException,
338             com.liferay.portal.SystemException {
339         try {
340             Object paramObj0 = new LongWrapper(groupId);
341 
342             Object paramObj1 = classNameIds;
343 
344             if (classNameIds == null) {
345                 paramObj1 = new NullWrapper("[J");
346             }
347 
348             Object paramObj2 = entryIds;
349 
350             if (entryIds == null) {
351                 paramObj2 = new NullWrapper("[J");
352             }
353 
354             Object paramObj3 = notEntryIds;
355 
356             if (notEntryIds == null) {
357                 paramObj3 = new NullWrapper("[J");
358             }
359 
360             Object paramObj4 = new BooleanWrapper(andOperator);
361 
362             Object paramObj5 = orderByCol1;
363 
364             if (orderByCol1 == null) {
365                 paramObj5 = new NullWrapper("java.lang.String");
366             }
367 
368             Object paramObj6 = orderByCol2;
369 
370             if (orderByCol2 == null) {
371                 paramObj6 = new NullWrapper("java.lang.String");
372             }
373 
374             Object paramObj7 = orderByType1;
375 
376             if (orderByType1 == null) {
377                 paramObj7 = new NullWrapper("java.lang.String");
378             }
379 
380             Object paramObj8 = orderByType2;
381 
382             if (orderByType2 == null) {
383                 paramObj8 = new NullWrapper("java.lang.String");
384             }
385 
386             Object paramObj9 = new BooleanWrapper(excludeZeroViewCount);
387 
388             Object paramObj10 = publishDate;
389 
390             if (publishDate == null) {
391                 paramObj10 = new NullWrapper("java.util.Date");
392             }
393 
394             Object paramObj11 = expirationDate;
395 
396             if (expirationDate == null) {
397                 paramObj11 = new NullWrapper("java.util.Date");
398             }
399 
400             Object paramObj12 = new IntegerWrapper(max);
401 
402             Object paramObj13 = type;
403 
404             if (type == null) {
405                 paramObj13 = new NullWrapper("java.lang.String");
406             }
407 
408             Object paramObj14 = new DoubleWrapper(version);
409 
410             Object paramObj15 = displayStyle;
411 
412             if (displayStyle == null) {
413                 paramObj15 = new NullWrapper("java.lang.String");
414             }
415 
416             Object paramObj16 = feedURL;
417 
418             if (feedURL == null) {
419                 paramObj16 = new NullWrapper("java.lang.String");
420             }
421 
422             Object paramObj17 = entryURL;
423 
424             if (entryURL == null) {
425                 paramObj17 = new NullWrapper("java.lang.String");
426             }
427 
428             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
429                     "getAssetsRSS",
430                     new Object[] {
431                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
432                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
433                         paramObj10, paramObj11, paramObj12, paramObj13,
434                         paramObj14, paramObj15, paramObj16, paramObj17
435                     });
436 
437             Object returnObj = null;
438 
439             try {
440                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
441             }
442             catch (Exception e) {
443                 if (e instanceof com.liferay.portal.PortalException) {
444                     throw (com.liferay.portal.PortalException)e;
445                 }
446 
447                 if (e instanceof com.liferay.portal.SystemException) {
448                     throw (com.liferay.portal.SystemException)e;
449                 }
450 
451                 throw new com.liferay.portal.SystemException(e);
452             }
453 
454             return (java.lang.String)returnObj;
455         }
456         catch (com.liferay.portal.SystemException se) {
457             _log.error(se, se);
458 
459             throw se;
460         }
461     }
462 
463     public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
464         HttpPrincipal httpPrincipal, java.lang.String languageId)
465         throws com.liferay.portal.SystemException {
466         try {
467             Object paramObj0 = languageId;
468 
469             if (languageId == null) {
470                 paramObj0 = new NullWrapper("java.lang.String");
471             }
472 
473             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
474                     "getAssetTypes", new Object[] { paramObj0 });
475 
476             Object returnObj = null;
477 
478             try {
479                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
480             }
481             catch (Exception e) {
482                 throw new com.liferay.portal.SystemException(e);
483             }
484 
485             return (com.liferay.portlet.tags.model.TagsAssetType[])returnObj;
486         }
487         catch (com.liferay.portal.SystemException se) {
488             _log.error(se, se);
489 
490             throw se;
491         }
492     }
493 
494     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
495         HttpPrincipal httpPrincipal, long companyId, int start, int end,
496         java.lang.String languageId) throws com.liferay.portal.SystemException {
497         try {
498             Object paramObj0 = new LongWrapper(companyId);
499 
500             Object paramObj1 = new IntegerWrapper(start);
501 
502             Object paramObj2 = new IntegerWrapper(end);
503 
504             Object paramObj3 = languageId;
505 
506             if (languageId == null) {
507                 paramObj3 = new NullWrapper("java.lang.String");
508             }
509 
510             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
511                     "getCompanyAssetDisplays",
512                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
513 
514             Object returnObj = null;
515 
516             try {
517                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
518             }
519             catch (Exception e) {
520                 if (e instanceof com.liferay.portal.SystemException) {
521                     throw (com.liferay.portal.SystemException)e;
522                 }
523 
524                 throw new com.liferay.portal.SystemException(e);
525             }
526 
527             return (com.liferay.portlet.tags.model.TagsAssetDisplay[])returnObj;
528         }
529         catch (com.liferay.portal.SystemException se) {
530             _log.error(se, se);
531 
532             throw se;
533         }
534     }
535 
536     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
537         HttpPrincipal httpPrincipal, long companyId, int start, int end)
538         throws com.liferay.portal.SystemException {
539         try {
540             Object paramObj0 = new LongWrapper(companyId);
541 
542             Object paramObj1 = new IntegerWrapper(start);
543 
544             Object paramObj2 = new IntegerWrapper(end);
545 
546             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
547                     "getCompanyAssets",
548                     new Object[] { paramObj0, paramObj1, paramObj2 });
549 
550             Object returnObj = null;
551 
552             try {
553                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
554             }
555             catch (Exception e) {
556                 if (e instanceof com.liferay.portal.SystemException) {
557                     throw (com.liferay.portal.SystemException)e;
558                 }
559 
560                 throw new com.liferay.portal.SystemException(e);
561             }
562 
563             return (java.util.List<com.liferay.portlet.tags.model.TagsAsset>)returnObj;
564         }
565         catch (com.liferay.portal.SystemException se) {
566             _log.error(se, se);
567 
568             throw se;
569         }
570     }
571 
572     public static int getCompanyAssetsCount(HttpPrincipal httpPrincipal,
573         long companyId) throws com.liferay.portal.SystemException {
574         try {
575             Object paramObj0 = new LongWrapper(companyId);
576 
577             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
578                     "getCompanyAssetsCount", new Object[] { paramObj0 });
579 
580             Object returnObj = null;
581 
582             try {
583                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
584             }
585             catch (Exception e) {
586                 if (e instanceof com.liferay.portal.SystemException) {
587                     throw (com.liferay.portal.SystemException)e;
588                 }
589 
590                 throw new com.liferay.portal.SystemException(e);
591             }
592 
593             return ((Integer)returnObj).intValue();
594         }
595         catch (com.liferay.portal.SystemException se) {
596             _log.error(se, se);
597 
598             throw se;
599         }
600     }
601 
602     public static java.lang.String getCompanyAssetsRSS(
603         HttpPrincipal httpPrincipal, long companyId, int max,
604         java.lang.String type, double version, java.lang.String displayStyle,
605         java.lang.String feedURL, java.lang.String entryURL)
606         throws com.liferay.portal.PortalException,
607             com.liferay.portal.SystemException {
608         try {
609             Object paramObj0 = new LongWrapper(companyId);
610 
611             Object paramObj1 = new IntegerWrapper(max);
612 
613             Object paramObj2 = type;
614 
615             if (type == null) {
616                 paramObj2 = new NullWrapper("java.lang.String");
617             }
618 
619             Object paramObj3 = new DoubleWrapper(version);
620 
621             Object paramObj4 = displayStyle;
622 
623             if (displayStyle == null) {
624                 paramObj4 = new NullWrapper("java.lang.String");
625             }
626 
627             Object paramObj5 = feedURL;
628 
629             if (feedURL == null) {
630                 paramObj5 = new NullWrapper("java.lang.String");
631             }
632 
633             Object paramObj6 = entryURL;
634 
635             if (entryURL == null) {
636                 paramObj6 = new NullWrapper("java.lang.String");
637             }
638 
639             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
640                     "getCompanyAssetsRSS",
641                     new Object[] {
642                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
643                         paramObj5, paramObj6
644                     });
645 
646             Object returnObj = null;
647 
648             try {
649                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
650             }
651             catch (Exception e) {
652                 if (e instanceof com.liferay.portal.PortalException) {
653                     throw (com.liferay.portal.PortalException)e;
654                 }
655 
656                 if (e instanceof com.liferay.portal.SystemException) {
657                     throw (com.liferay.portal.SystemException)e;
658                 }
659 
660                 throw new com.liferay.portal.SystemException(e);
661             }
662 
663             return (java.lang.String)returnObj;
664         }
665         catch (com.liferay.portal.SystemException se) {
666             _log.error(se, se);
667 
668             throw se;
669         }
670     }
671 
672     public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
673         HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
674         throws com.liferay.portal.SystemException {
675         try {
676             Object paramObj0 = className;
677 
678             if (className == null) {
679                 paramObj0 = new NullWrapper("java.lang.String");
680             }
681 
682             Object paramObj1 = new LongWrapper(classPK);
683 
684             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
685                     "incrementViewCounter",
686                     new Object[] { paramObj0, paramObj1 });
687 
688             Object returnObj = null;
689 
690             try {
691                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
692             }
693             catch (Exception e) {
694                 if (e instanceof com.liferay.portal.SystemException) {
695                     throw (com.liferay.portal.SystemException)e;
696                 }
697 
698                 throw new com.liferay.portal.SystemException(e);
699             }
700 
701             return (com.liferay.portlet.tags.model.TagsAsset)returnObj;
702         }
703         catch (com.liferay.portal.SystemException se) {
704             _log.error(se, se);
705 
706             throw se;
707         }
708     }
709 
710     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
711         HttpPrincipal httpPrincipal, long companyId,
712         java.lang.String portletId, java.lang.String keywords,
713         java.lang.String languageId, int start, int end)
714         throws com.liferay.portal.SystemException {
715         try {
716             Object paramObj0 = new LongWrapper(companyId);
717 
718             Object paramObj1 = portletId;
719 
720             if (portletId == null) {
721                 paramObj1 = new NullWrapper("java.lang.String");
722             }
723 
724             Object paramObj2 = keywords;
725 
726             if (keywords == null) {
727                 paramObj2 = new NullWrapper("java.lang.String");
728             }
729 
730             Object paramObj3 = languageId;
731 
732             if (languageId == null) {
733                 paramObj3 = new NullWrapper("java.lang.String");
734             }
735 
736             Object paramObj4 = new IntegerWrapper(start);
737 
738             Object paramObj5 = new IntegerWrapper(end);
739 
740             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
741                     "searchAssetDisplays",
742                     new Object[] {
743                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
744                         paramObj5
745                     });
746 
747             Object returnObj = null;
748 
749             try {
750                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
751             }
752             catch (Exception e) {
753                 if (e instanceof com.liferay.portal.SystemException) {
754                     throw (com.liferay.portal.SystemException)e;
755                 }
756 
757                 throw new com.liferay.portal.SystemException(e);
758             }
759 
760             return (com.liferay.portlet.tags.model.TagsAssetDisplay[])returnObj;
761         }
762         catch (com.liferay.portal.SystemException se) {
763             _log.error(se, se);
764 
765             throw se;
766         }
767     }
768 
769     public static int searchAssetDisplaysCount(HttpPrincipal httpPrincipal,
770         long companyId, java.lang.String portletId, java.lang.String keywords,
771         java.lang.String languageId) throws com.liferay.portal.SystemException {
772         try {
773             Object paramObj0 = new LongWrapper(companyId);
774 
775             Object paramObj1 = portletId;
776 
777             if (portletId == null) {
778                 paramObj1 = new NullWrapper("java.lang.String");
779             }
780 
781             Object paramObj2 = keywords;
782 
783             if (keywords == null) {
784                 paramObj2 = new NullWrapper("java.lang.String");
785             }
786 
787             Object paramObj3 = languageId;
788 
789             if (languageId == null) {
790                 paramObj3 = new NullWrapper("java.lang.String");
791             }
792 
793             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
794                     "searchAssetDisplaysCount",
795                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
796 
797             Object returnObj = null;
798 
799             try {
800                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
801             }
802             catch (Exception e) {
803                 if (e instanceof com.liferay.portal.SystemException) {
804                     throw (com.liferay.portal.SystemException)e;
805                 }
806 
807                 throw new com.liferay.portal.SystemException(e);
808             }
809 
810             return ((Integer)returnObj).intValue();
811         }
812         catch (com.liferay.portal.SystemException se) {
813             _log.error(se, se);
814 
815             throw se;
816         }
817     }
818 
819     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
820         HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
821         long classPK, java.lang.String[] categoryNames,
822         java.lang.String[] entryNames, boolean visible,
823         java.util.Date startDate, java.util.Date endDate,
824         java.util.Date publishDate, java.util.Date expirationDate,
825         java.lang.String mimeType, java.lang.String title,
826         java.lang.String description, java.lang.String summary,
827         java.lang.String url, int height, int width, java.lang.Integer priority)
828         throws com.liferay.portal.PortalException,
829             com.liferay.portal.SystemException {
830         try {
831             Object paramObj0 = new LongWrapper(groupId);
832 
833             Object paramObj1 = className;
834 
835             if (className == null) {
836                 paramObj1 = new NullWrapper("java.lang.String");
837             }
838 
839             Object paramObj2 = new LongWrapper(classPK);
840 
841             Object paramObj3 = categoryNames;
842 
843             if (categoryNames == null) {
844                 paramObj3 = new NullWrapper("[Ljava.lang.String;");
845             }
846 
847             Object paramObj4 = entryNames;
848 
849             if (entryNames == null) {
850                 paramObj4 = new NullWrapper("[Ljava.lang.String;");
851             }
852 
853             Object paramObj5 = new BooleanWrapper(visible);
854 
855             Object paramObj6 = startDate;
856 
857             if (startDate == null) {
858                 paramObj6 = new NullWrapper("java.util.Date");
859             }
860 
861             Object paramObj7 = endDate;
862 
863             if (endDate == null) {
864                 paramObj7 = new NullWrapper("java.util.Date");
865             }
866 
867             Object paramObj8 = publishDate;
868 
869             if (publishDate == null) {
870                 paramObj8 = new NullWrapper("java.util.Date");
871             }
872 
873             Object paramObj9 = expirationDate;
874 
875             if (expirationDate == null) {
876                 paramObj9 = new NullWrapper("java.util.Date");
877             }
878 
879             Object paramObj10 = mimeType;
880 
881             if (mimeType == null) {
882                 paramObj10 = new NullWrapper("java.lang.String");
883             }
884 
885             Object paramObj11 = title;
886 
887             if (title == null) {
888                 paramObj11 = new NullWrapper("java.lang.String");
889             }
890 
891             Object paramObj12 = description;
892 
893             if (description == null) {
894                 paramObj12 = new NullWrapper("java.lang.String");
895             }
896 
897             Object paramObj13 = summary;
898 
899             if (summary == null) {
900                 paramObj13 = new NullWrapper("java.lang.String");
901             }
902 
903             Object paramObj14 = url;
904 
905             if (url == null) {
906                 paramObj14 = new NullWrapper("java.lang.String");
907             }
908 
909             Object paramObj15 = new IntegerWrapper(height);
910 
911             Object paramObj16 = new IntegerWrapper(width);
912 
913             Object paramObj17 = priority;
914 
915             if (priority == null) {
916                 paramObj17 = new NullWrapper("java.lang.Integer");
917             }
918 
919             MethodWrapper methodWrapper = new MethodWrapper(TagsAssetServiceUtil.class.getName(),
920                     "updateAsset",
921                     new Object[] {
922                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
923                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
924                         paramObj10, paramObj11, paramObj12, paramObj13,
925                         paramObj14, paramObj15, paramObj16, paramObj17
926                     });
927 
928             Object returnObj = null;
929 
930             try {
931                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
932             }
933             catch (Exception e) {
934                 if (e instanceof com.liferay.portal.PortalException) {
935                     throw (com.liferay.portal.PortalException)e;
936                 }
937 
938                 if (e instanceof com.liferay.portal.SystemException) {
939                     throw (com.liferay.portal.SystemException)e;
940                 }
941 
942                 throw new com.liferay.portal.SystemException(e);
943             }
944 
945             return (com.liferay.portlet.tags.model.TagsAsset)returnObj;
946         }
947         catch (com.liferay.portal.SystemException se) {
948             _log.error(se, se);
949 
950             throw se;
951         }
952     }
953 
954     private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceHttp.class);
955 }