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.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.tags.service.TagsAssetServiceUtil;
25
26
63 public class TagsAssetServiceHttp {
64 public static void deleteAsset(HttpPrincipal httpPrincipal, long assetId)
65 throws com.liferay.portal.PortalException,
66 com.liferay.portal.SystemException {
67 try {
68 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
69 "deleteAsset", _deleteAssetParameterTypes0);
70
71 MethodHandler methodHandler = new MethodHandler(methodKey, assetId);
72
73 try {
74 TunnelUtil.invoke(httpPrincipal, methodHandler);
75 }
76 catch (Exception e) {
77 if (e instanceof com.liferay.portal.PortalException) {
78 throw (com.liferay.portal.PortalException)e;
79 }
80
81 if (e instanceof com.liferay.portal.SystemException) {
82 throw (com.liferay.portal.SystemException)e;
83 }
84
85 throw new com.liferay.portal.SystemException(e);
86 }
87 }
88 catch (com.liferay.portal.SystemException se) {
89 _log.error(se, se);
90
91 throw se;
92 }
93 }
94
95 public static com.liferay.portlet.tags.model.TagsAsset getAsset(
96 HttpPrincipal httpPrincipal, long assetId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 try {
100 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
101 "getAsset", _getAssetParameterTypes1);
102
103 MethodHandler methodHandler = new MethodHandler(methodKey, assetId);
104
105 Object returnObj = null;
106
107 try {
108 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
109 }
110 catch (Exception e) {
111 if (e instanceof com.liferay.portal.PortalException) {
112 throw (com.liferay.portal.PortalException)e;
113 }
114
115 if (e instanceof com.liferay.portal.SystemException) {
116 throw (com.liferay.portal.SystemException)e;
117 }
118
119 throw new com.liferay.portal.SystemException(e);
120 }
121
122 return (com.liferay.portlet.tags.model.TagsAsset)returnObj;
123 }
124 catch (com.liferay.portal.SystemException se) {
125 _log.error(se, se);
126
127 throw se;
128 }
129 }
130
131 public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
132 HttpPrincipal httpPrincipal, long groupId, long[] classNameIds,
133 long[] entryIds, long[] notEntryIds, boolean andOperator,
134 java.lang.String orderByCol1, java.lang.String orderByCol2,
135 java.lang.String orderByType1, java.lang.String orderByType2,
136 boolean excludeZeroViewCount, java.util.Date publishDate,
137 java.util.Date expirationDate, int start, int end)
138 throws com.liferay.portal.PortalException,
139 com.liferay.portal.SystemException {
140 try {
141 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
142 "getAssets", _getAssetsParameterTypes2);
143
144 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
145 classNameIds, entryIds, notEntryIds, andOperator,
146 orderByCol1, orderByCol2, orderByType1, orderByType2,
147 excludeZeroViewCount, publishDate, expirationDate, start,
148 end);
149
150 Object returnObj = null;
151
152 try {
153 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
154 }
155 catch (Exception e) {
156 if (e instanceof com.liferay.portal.PortalException) {
157 throw (com.liferay.portal.PortalException)e;
158 }
159
160 if (e instanceof com.liferay.portal.SystemException) {
161 throw (com.liferay.portal.SystemException)e;
162 }
163
164 throw new com.liferay.portal.SystemException(e);
165 }
166
167 return (java.util.List<com.liferay.portlet.tags.model.TagsAsset>)returnObj;
168 }
169 catch (com.liferay.portal.SystemException se) {
170 _log.error(se, se);
171
172 throw se;
173 }
174 }
175
176 public static int getAssetsCount(HttpPrincipal httpPrincipal, long groupId,
177 long[] classNameIds, long[] entryIds, long[] notEntryIds,
178 boolean andOperator, boolean excludeZeroViewCount,
179 java.util.Date publishDate, java.util.Date expirationDate)
180 throws com.liferay.portal.PortalException,
181 com.liferay.portal.SystemException {
182 try {
183 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
184 "getAssetsCount", _getAssetsCountParameterTypes3);
185
186 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
187 classNameIds, entryIds, notEntryIds, andOperator,
188 excludeZeroViewCount, publishDate, expirationDate);
189
190 Object returnObj = null;
191
192 try {
193 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
194 }
195 catch (Exception e) {
196 if (e instanceof com.liferay.portal.PortalException) {
197 throw (com.liferay.portal.PortalException)e;
198 }
199
200 if (e instanceof com.liferay.portal.SystemException) {
201 throw (com.liferay.portal.SystemException)e;
202 }
203
204 throw new com.liferay.portal.SystemException(e);
205 }
206
207 return ((Integer)returnObj).intValue();
208 }
209 catch (com.liferay.portal.SystemException se) {
210 _log.error(se, se);
211
212 throw se;
213 }
214 }
215
216 public static java.lang.String getAssetsRSS(HttpPrincipal httpPrincipal,
217 long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
218 boolean andOperator, java.lang.String orderByCol1,
219 java.lang.String orderByCol2, java.lang.String orderByType1,
220 java.lang.String orderByType2, boolean excludeZeroViewCount,
221 java.util.Date publishDate, java.util.Date expirationDate, int max,
222 java.lang.String type, double version, java.lang.String displayStyle,
223 java.lang.String feedURL, java.lang.String entryURL)
224 throws com.liferay.portal.PortalException,
225 com.liferay.portal.SystemException {
226 try {
227 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
228 "getAssetsRSS", _getAssetsRSSParameterTypes4);
229
230 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
231 classNameIds, entryIds, notEntryIds, andOperator,
232 orderByCol1, orderByCol2, orderByType1, orderByType2,
233 excludeZeroViewCount, publishDate, expirationDate, max,
234 type, version, displayStyle, feedURL, entryURL);
235
236 Object returnObj = null;
237
238 try {
239 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
240 }
241 catch (Exception e) {
242 if (e instanceof com.liferay.portal.PortalException) {
243 throw (com.liferay.portal.PortalException)e;
244 }
245
246 if (e instanceof com.liferay.portal.SystemException) {
247 throw (com.liferay.portal.SystemException)e;
248 }
249
250 throw new com.liferay.portal.SystemException(e);
251 }
252
253 return (java.lang.String)returnObj;
254 }
255 catch (com.liferay.portal.SystemException se) {
256 _log.error(se, se);
257
258 throw se;
259 }
260 }
261
262 public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
263 HttpPrincipal httpPrincipal, java.lang.String languageId)
264 throws com.liferay.portal.SystemException {
265 try {
266 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
267 "getAssetTypes", _getAssetTypesParameterTypes5);
268
269 MethodHandler methodHandler = new MethodHandler(methodKey,
270 languageId);
271
272 Object returnObj = null;
273
274 try {
275 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
276 }
277 catch (Exception e) {
278 throw new com.liferay.portal.SystemException(e);
279 }
280
281 return (com.liferay.portlet.tags.model.TagsAssetType[])returnObj;
282 }
283 catch (com.liferay.portal.SystemException se) {
284 _log.error(se, se);
285
286 throw se;
287 }
288 }
289
290 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
291 HttpPrincipal httpPrincipal, long companyId, int start, int end,
292 java.lang.String languageId) throws com.liferay.portal.SystemException {
293 try {
294 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
295 "getCompanyAssetDisplays",
296 _getCompanyAssetDisplaysParameterTypes6);
297
298 MethodHandler methodHandler = new MethodHandler(methodKey,
299 companyId, start, end, languageId);
300
301 Object returnObj = null;
302
303 try {
304 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
305 }
306 catch (Exception e) {
307 if (e instanceof com.liferay.portal.SystemException) {
308 throw (com.liferay.portal.SystemException)e;
309 }
310
311 throw new com.liferay.portal.SystemException(e);
312 }
313
314 return (com.liferay.portlet.tags.model.TagsAssetDisplay[])returnObj;
315 }
316 catch (com.liferay.portal.SystemException se) {
317 _log.error(se, se);
318
319 throw se;
320 }
321 }
322
323 public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
324 HttpPrincipal httpPrincipal, long companyId, int start, int end)
325 throws com.liferay.portal.SystemException {
326 try {
327 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
328 "getCompanyAssets", _getCompanyAssetsParameterTypes7);
329
330 MethodHandler methodHandler = new MethodHandler(methodKey,
331 companyId, start, end);
332
333 Object returnObj = null;
334
335 try {
336 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
337 }
338 catch (Exception e) {
339 if (e instanceof com.liferay.portal.SystemException) {
340 throw (com.liferay.portal.SystemException)e;
341 }
342
343 throw new com.liferay.portal.SystemException(e);
344 }
345
346 return (java.util.List<com.liferay.portlet.tags.model.TagsAsset>)returnObj;
347 }
348 catch (com.liferay.portal.SystemException se) {
349 _log.error(se, se);
350
351 throw se;
352 }
353 }
354
355 public static int getCompanyAssetsCount(HttpPrincipal httpPrincipal,
356 long companyId) throws com.liferay.portal.SystemException {
357 try {
358 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
359 "getCompanyAssetsCount",
360 _getCompanyAssetsCountParameterTypes8);
361
362 MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
363
364 Object returnObj = null;
365
366 try {
367 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
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 ((Integer)returnObj).intValue();
378 }
379 catch (com.liferay.portal.SystemException se) {
380 _log.error(se, se);
381
382 throw se;
383 }
384 }
385
386 public static java.lang.String getCompanyAssetsRSS(
387 HttpPrincipal httpPrincipal, long companyId, int max,
388 java.lang.String type, double version, java.lang.String displayStyle,
389 java.lang.String feedURL, java.lang.String entryURL)
390 throws com.liferay.portal.PortalException,
391 com.liferay.portal.SystemException {
392 try {
393 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
394 "getCompanyAssetsRSS", _getCompanyAssetsRSSParameterTypes9);
395
396 MethodHandler methodHandler = new MethodHandler(methodKey,
397 companyId, max, type, version, displayStyle, feedURL,
398 entryURL);
399
400 Object returnObj = null;
401
402 try {
403 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
404 }
405 catch (Exception e) {
406 if (e instanceof com.liferay.portal.PortalException) {
407 throw (com.liferay.portal.PortalException)e;
408 }
409
410 if (e instanceof com.liferay.portal.SystemException) {
411 throw (com.liferay.portal.SystemException)e;
412 }
413
414 throw new com.liferay.portal.SystemException(e);
415 }
416
417 return (java.lang.String)returnObj;
418 }
419 catch (com.liferay.portal.SystemException se) {
420 _log.error(se, se);
421
422 throw se;
423 }
424 }
425
426 public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
427 HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
428 throws com.liferay.portal.SystemException {
429 try {
430 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
431 "incrementViewCounter",
432 _incrementViewCounterParameterTypes10);
433
434 MethodHandler methodHandler = new MethodHandler(methodKey,
435 className, classPK);
436
437 Object returnObj = null;
438
439 try {
440 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
441 }
442 catch (Exception e) {
443 if (e instanceof com.liferay.portal.SystemException) {
444 throw (com.liferay.portal.SystemException)e;
445 }
446
447 throw new com.liferay.portal.SystemException(e);
448 }
449
450 return (com.liferay.portlet.tags.model.TagsAsset)returnObj;
451 }
452 catch (com.liferay.portal.SystemException se) {
453 _log.error(se, se);
454
455 throw se;
456 }
457 }
458
459 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
460 HttpPrincipal httpPrincipal, long companyId,
461 java.lang.String portletId, java.lang.String keywords,
462 java.lang.String languageId, int start, int end)
463 throws com.liferay.portal.SystemException {
464 try {
465 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
466 "searchAssetDisplays", _searchAssetDisplaysParameterTypes11);
467
468 MethodHandler methodHandler = new MethodHandler(methodKey,
469 companyId, portletId, keywords, languageId, start, end);
470
471 Object returnObj = null;
472
473 try {
474 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
475 }
476 catch (Exception e) {
477 if (e instanceof com.liferay.portal.SystemException) {
478 throw (com.liferay.portal.SystemException)e;
479 }
480
481 throw new com.liferay.portal.SystemException(e);
482 }
483
484 return (com.liferay.portlet.tags.model.TagsAssetDisplay[])returnObj;
485 }
486 catch (com.liferay.portal.SystemException se) {
487 _log.error(se, se);
488
489 throw se;
490 }
491 }
492
493 public static int searchAssetDisplaysCount(HttpPrincipal httpPrincipal,
494 long companyId, java.lang.String portletId, java.lang.String keywords,
495 java.lang.String languageId) throws com.liferay.portal.SystemException {
496 try {
497 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
498 "searchAssetDisplaysCount",
499 _searchAssetDisplaysCountParameterTypes12);
500
501 MethodHandler methodHandler = new MethodHandler(methodKey,
502 companyId, portletId, keywords, languageId);
503
504 Object returnObj = null;
505
506 try {
507 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
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 ((Integer)returnObj).intValue();
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.TagsAsset updateAsset(
527 HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
528 long classPK, java.lang.String[] categoryNames,
529 java.lang.String[] entryNames, boolean visible,
530 java.util.Date startDate, java.util.Date endDate,
531 java.util.Date publishDate, java.util.Date expirationDate,
532 java.lang.String mimeType, java.lang.String title,
533 java.lang.String description, java.lang.String summary,
534 java.lang.String url, int height, int width, java.lang.Integer priority)
535 throws com.liferay.portal.PortalException,
536 com.liferay.portal.SystemException {
537 try {
538 MethodKey methodKey = new MethodKey(TagsAssetServiceUtil.class.getName(),
539 "updateAsset", _updateAssetParameterTypes13);
540
541 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
542 className, classPK, categoryNames, entryNames, visible,
543 startDate, endDate, publishDate, expirationDate, mimeType,
544 title, description, summary, url, height, width, priority);
545
546 Object returnObj = null;
547
548 try {
549 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
550 }
551 catch (Exception e) {
552 if (e instanceof com.liferay.portal.PortalException) {
553 throw (com.liferay.portal.PortalException)e;
554 }
555
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 (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 private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceHttp.class);
573 private static final Class<?>[] _deleteAssetParameterTypes0 = new Class[] {
574 long.class
575 };
576 private static final Class<?>[] _getAssetParameterTypes1 = new Class[] {
577 long.class
578 };
579 private static final Class<?>[] _getAssetsParameterTypes2 = new Class[] {
580 long.class, long[].class, long[].class, long[].class, boolean.class,
581 java.lang.String.class, java.lang.String.class,
582 java.lang.String.class, java.lang.String.class, boolean.class,
583 java.util.Date.class, java.util.Date.class, int.class, int.class
584 };
585 private static final Class<?>[] _getAssetsCountParameterTypes3 = new Class[] {
586 long.class, long[].class, long[].class, long[].class, boolean.class,
587 boolean.class, java.util.Date.class, java.util.Date.class
588 };
589 private static final Class<?>[] _getAssetsRSSParameterTypes4 = new Class[] {
590 long.class, long[].class, long[].class, long[].class, boolean.class,
591 java.lang.String.class, java.lang.String.class,
592 java.lang.String.class, java.lang.String.class, boolean.class,
593 java.util.Date.class, java.util.Date.class, int.class,
594 java.lang.String.class, double.class, java.lang.String.class,
595 java.lang.String.class, java.lang.String.class
596 };
597 private static final Class<?>[] _getAssetTypesParameterTypes5 = new Class[] {
598 java.lang.String.class
599 };
600 private static final Class<?>[] _getCompanyAssetDisplaysParameterTypes6 = new Class[] {
601 long.class, int.class, int.class, java.lang.String.class
602 };
603 private static final Class<?>[] _getCompanyAssetsParameterTypes7 = new Class[] {
604 long.class, int.class, int.class
605 };
606 private static final Class<?>[] _getCompanyAssetsCountParameterTypes8 = new Class[] {
607 long.class
608 };
609 private static final Class<?>[] _getCompanyAssetsRSSParameterTypes9 = new Class[] {
610 long.class, int.class, java.lang.String.class, double.class,
611 java.lang.String.class, java.lang.String.class,
612 java.lang.String.class
613 };
614 private static final Class<?>[] _incrementViewCounterParameterTypes10 = new Class[] {
615 java.lang.String.class, long.class
616 };
617 private static final Class<?>[] _searchAssetDisplaysParameterTypes11 = new Class[] {
618 long.class, java.lang.String.class, java.lang.String.class,
619 java.lang.String.class, int.class, int.class
620 };
621 private static final Class<?>[] _searchAssetDisplaysCountParameterTypes12 = new Class[] {
622 long.class, java.lang.String.class, java.lang.String.class,
623 java.lang.String.class
624 };
625 private static final Class<?>[] _updateAssetParameterTypes13 = new Class[] {
626 long.class, java.lang.String.class, long.class,
627 java.lang.String[].class, java.lang.String[].class, boolean.class,
628 java.util.Date.class, java.util.Date.class, java.util.Date.class,
629 java.util.Date.class, java.lang.String.class, java.lang.String.class,
630 java.lang.String.class, java.lang.String.class,
631 java.lang.String.class, int.class, int.class,
632 java.lang.Integer.class
633 };
634 }