001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.asset.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.asset.service.AssetCategoryServiceUtil;
025    
026    /**
027     * <p>
028     * This class provides a HTTP utility for the
029     * {@link com.liferay.portlet.asset.service.AssetCategoryServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it requires an additional
032     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
033     * </p>
034     *
035     * <p>
036     * The benefits of using the HTTP utility is that it is fast and allows for
037     * tunneling without the cost of serializing to text. The drawback is that it
038     * only works with Java.
039     * </p>
040     *
041     * <p>
042     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
043     * configure security.
044     * </p>
045     *
046     * <p>
047     * The HTTP utility is only generated for remote services.
048     * </p>
049     *
050     * @author    Brian Wing Shun Chan
051     * @see       AssetCategoryServiceSoap
052     * @see       com.liferay.portal.security.auth.HttpPrincipal
053     * @see       com.liferay.portlet.asset.service.AssetCategoryServiceUtil
054     * @generated
055     */
056    public class AssetCategoryServiceHttp {
057            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
058                    HttpPrincipal httpPrincipal, long parentCategoryId,
059                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
060                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
061                    long vocabularyId, java.lang.String[] categoryProperties,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    try {
066                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
067                                            "addCategory", _addCategoryParameterTypes0);
068    
069                            MethodHandler methodHandler = new MethodHandler(methodKey,
070                                            parentCategoryId, titleMap, descriptionMap, vocabularyId,
071                                            categoryProperties, serviceContext);
072    
073                            Object returnObj = null;
074    
075                            try {
076                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
077                            }
078                            catch (Exception e) {
079                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
080                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
081                                    }
082    
083                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
084                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
085                                    }
086    
087                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
088                            }
089    
090                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
091                    }
092                    catch (com.liferay.portal.kernel.exception.SystemException se) {
093                            _log.error(se, se);
094    
095                            throw se;
096                    }
097            }
098    
099            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
100                    HttpPrincipal httpPrincipal, java.lang.String title, long vocabularyId,
101                    com.liferay.portal.service.ServiceContext serviceContext)
102                    throws com.liferay.portal.kernel.exception.PortalException,
103                            com.liferay.portal.kernel.exception.SystemException {
104                    try {
105                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
106                                            "addCategory", _addCategoryParameterTypes1);
107    
108                            MethodHandler methodHandler = new MethodHandler(methodKey, title,
109                                            vocabularyId, serviceContext);
110    
111                            Object returnObj = null;
112    
113                            try {
114                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
115                            }
116                            catch (Exception e) {
117                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
118                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
119                                    }
120    
121                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
122                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
123                                    }
124    
125                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
126                            }
127    
128                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
129                    }
130                    catch (com.liferay.portal.kernel.exception.SystemException se) {
131                            _log.error(se, se);
132    
133                            throw se;
134                    }
135            }
136    
137            public static void deleteCategories(HttpPrincipal httpPrincipal,
138                    long[] categoryIds)
139                    throws com.liferay.portal.kernel.exception.PortalException,
140                            com.liferay.portal.kernel.exception.SystemException {
141                    try {
142                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
143                                            "deleteCategories", _deleteCategoriesParameterTypes2);
144    
145                            MethodHandler methodHandler = new MethodHandler(methodKey,
146                                            categoryIds);
147    
148                            try {
149                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
150                            }
151                            catch (Exception e) {
152                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
153                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
154                                    }
155    
156                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
157                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
158                                    }
159    
160                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
161                            }
162                    }
163                    catch (com.liferay.portal.kernel.exception.SystemException se) {
164                            _log.error(se, se);
165    
166                            throw se;
167                    }
168            }
169    
170            public static void deleteCategory(HttpPrincipal httpPrincipal,
171                    long categoryId)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    try {
175                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
176                                            "deleteCategory", _deleteCategoryParameterTypes3);
177    
178                            MethodHandler methodHandler = new MethodHandler(methodKey,
179                                            categoryId);
180    
181                            try {
182                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
183                            }
184                            catch (Exception e) {
185                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
186                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
187                                    }
188    
189                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
190                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
191                                    }
192    
193                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
194                            }
195                    }
196                    catch (com.liferay.portal.kernel.exception.SystemException se) {
197                            _log.error(se, se);
198    
199                            throw se;
200                    }
201            }
202    
203            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
204                    HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
205                    throws com.liferay.portal.kernel.exception.PortalException,
206                            com.liferay.portal.kernel.exception.SystemException {
207                    try {
208                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
209                                            "getCategories", _getCategoriesParameterTypes4);
210    
211                            MethodHandler methodHandler = new MethodHandler(methodKey,
212                                            className, classPK);
213    
214                            Object returnObj = null;
215    
216                            try {
217                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
218                            }
219                            catch (Exception e) {
220                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
221                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
222                                    }
223    
224                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
225                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
226                                    }
227    
228                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
229                            }
230    
231                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
232                    }
233                    catch (com.liferay.portal.kernel.exception.SystemException se) {
234                            _log.error(se, se);
235    
236                            throw se;
237                    }
238            }
239    
240            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
241                    HttpPrincipal httpPrincipal, long categoryId)
242                    throws com.liferay.portal.kernel.exception.PortalException,
243                            com.liferay.portal.kernel.exception.SystemException {
244                    try {
245                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
246                                            "getCategory", _getCategoryParameterTypes5);
247    
248                            MethodHandler methodHandler = new MethodHandler(methodKey,
249                                            categoryId);
250    
251                            Object returnObj = null;
252    
253                            try {
254                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
255                            }
256                            catch (Exception e) {
257                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
258                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
259                                    }
260    
261                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
262                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
263                                    }
264    
265                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
266                            }
267    
268                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
269                    }
270                    catch (com.liferay.portal.kernel.exception.SystemException se) {
271                            _log.error(se, se);
272    
273                            throw se;
274                    }
275            }
276    
277            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
278                    HttpPrincipal httpPrincipal, long parentCategoryId)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    try {
282                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
283                                            "getChildCategories", _getChildCategoriesParameterTypes6);
284    
285                            MethodHandler methodHandler = new MethodHandler(methodKey,
286                                            parentCategoryId);
287    
288                            Object returnObj = null;
289    
290                            try {
291                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
292                            }
293                            catch (Exception e) {
294                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
295                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
296                                    }
297    
298                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
299                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
300                                    }
301    
302                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
303                            }
304    
305                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
306                    }
307                    catch (com.liferay.portal.kernel.exception.SystemException se) {
308                            _log.error(se, se);
309    
310                            throw se;
311                    }
312            }
313    
314            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
315                    HttpPrincipal httpPrincipal, long parentCategoryId, int start, int end,
316                    com.liferay.portal.kernel.util.OrderByComparator obc)
317                    throws com.liferay.portal.kernel.exception.PortalException,
318                            com.liferay.portal.kernel.exception.SystemException {
319                    try {
320                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
321                                            "getChildCategories", _getChildCategoriesParameterTypes7);
322    
323                            MethodHandler methodHandler = new MethodHandler(methodKey,
324                                            parentCategoryId, start, end, obc);
325    
326                            Object returnObj = null;
327    
328                            try {
329                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
330                            }
331                            catch (Exception e) {
332                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
333                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
334                                    }
335    
336                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
337                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
338                                    }
339    
340                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
341                            }
342    
343                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
344                    }
345                    catch (com.liferay.portal.kernel.exception.SystemException se) {
346                            _log.error(se, se);
347    
348                            throw se;
349                    }
350            }
351    
352            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
353                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
354                    long[] vocabularyIds, int start, int end)
355                    throws com.liferay.portal.kernel.exception.PortalException,
356                            com.liferay.portal.kernel.exception.SystemException {
357                    try {
358                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
359                                            "getJSONSearch", _getJSONSearchParameterTypes8);
360    
361                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
362                                            name, vocabularyIds, start, end);
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.kernel.exception.PortalException) {
371                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
372                                    }
373    
374                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
375                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
376                                    }
377    
378                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
379                            }
380    
381                            return (com.liferay.portal.kernel.json.JSONArray)returnObj;
382                    }
383                    catch (com.liferay.portal.kernel.exception.SystemException se) {
384                            _log.error(se, se);
385    
386                            throw se;
387                    }
388            }
389    
390            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
391                    HttpPrincipal httpPrincipal, long vocabularyId, int start, int end,
392                    com.liferay.portal.kernel.util.OrderByComparator obc)
393                    throws com.liferay.portal.kernel.exception.PortalException,
394                            com.liferay.portal.kernel.exception.SystemException {
395                    try {
396                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
397                                            "getJSONVocabularyCategories",
398                                            _getJSONVocabularyCategoriesParameterTypes9);
399    
400                            MethodHandler methodHandler = new MethodHandler(methodKey,
401                                            vocabularyId, start, end, obc);
402    
403                            Object returnObj = null;
404    
405                            try {
406                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
407                            }
408                            catch (Exception e) {
409                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
410                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
411                                    }
412    
413                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
414                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
415                                    }
416    
417                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
418                            }
419    
420                            return (com.liferay.portal.kernel.json.JSONObject)returnObj;
421                    }
422                    catch (com.liferay.portal.kernel.exception.SystemException se) {
423                            _log.error(se, se);
424    
425                            throw se;
426                    }
427            }
428    
429            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
430                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
431                    long vocabularyId, int start, int end,
432                    com.liferay.portal.kernel.util.OrderByComparator obc)
433                    throws com.liferay.portal.kernel.exception.PortalException,
434                            com.liferay.portal.kernel.exception.SystemException {
435                    try {
436                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
437                                            "getJSONVocabularyCategories",
438                                            _getJSONVocabularyCategoriesParameterTypes10);
439    
440                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
441                                            name, vocabularyId, start, end, obc);
442    
443                            Object returnObj = null;
444    
445                            try {
446                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
447                            }
448                            catch (Exception e) {
449                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
450                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
451                                    }
452    
453                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
454                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
455                                    }
456    
457                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
458                            }
459    
460                            return (com.liferay.portal.kernel.json.JSONObject)returnObj;
461                    }
462                    catch (com.liferay.portal.kernel.exception.SystemException se) {
463                            _log.error(se, se);
464    
465                            throw se;
466                    }
467            }
468    
469            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
470                    HttpPrincipal httpPrincipal, long vocabularyId, int start, int end,
471                    com.liferay.portal.kernel.util.OrderByComparator obc)
472                    throws com.liferay.portal.kernel.exception.PortalException,
473                            com.liferay.portal.kernel.exception.SystemException {
474                    try {
475                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
476                                            "getVocabularyCategories",
477                                            _getVocabularyCategoriesParameterTypes11);
478    
479                            MethodHandler methodHandler = new MethodHandler(methodKey,
480                                            vocabularyId, start, end, obc);
481    
482                            Object returnObj = null;
483    
484                            try {
485                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
486                            }
487                            catch (Exception e) {
488                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
489                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
490                                    }
491    
492                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
493                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
494                                    }
495    
496                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
497                            }
498    
499                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
500                    }
501                    catch (com.liferay.portal.kernel.exception.SystemException se) {
502                            _log.error(se, se);
503    
504                            throw se;
505                    }
506            }
507    
508            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
509                    HttpPrincipal httpPrincipal, long parentCategoryId, long vocabularyId,
510                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
511                    throws com.liferay.portal.kernel.exception.PortalException,
512                            com.liferay.portal.kernel.exception.SystemException {
513                    try {
514                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
515                                            "getVocabularyCategories",
516                                            _getVocabularyCategoriesParameterTypes12);
517    
518                            MethodHandler methodHandler = new MethodHandler(methodKey,
519                                            parentCategoryId, vocabularyId, start, end, obc);
520    
521                            Object returnObj = null;
522    
523                            try {
524                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
525                            }
526                            catch (Exception e) {
527                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
528                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
529                                    }
530    
531                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
532                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
533                                    }
534    
535                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
536                            }
537    
538                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
539                    }
540                    catch (com.liferay.portal.kernel.exception.SystemException se) {
541                            _log.error(se, se);
542    
543                            throw se;
544                    }
545            }
546    
547            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
548                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
549                    long vocabularyId, int start, int end,
550                    com.liferay.portal.kernel.util.OrderByComparator obc)
551                    throws com.liferay.portal.kernel.exception.SystemException {
552                    try {
553                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
554                                            "getVocabularyCategories",
555                                            _getVocabularyCategoriesParameterTypes13);
556    
557                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
558                                            name, vocabularyId, start, end, obc);
559    
560                            Object returnObj = null;
561    
562                            try {
563                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
564                            }
565                            catch (Exception e) {
566                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
567                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
568                                    }
569    
570                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
571                            }
572    
573                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
574                    }
575                    catch (com.liferay.portal.kernel.exception.SystemException se) {
576                            _log.error(se, se);
577    
578                            throw se;
579                    }
580            }
581    
582            public static int getVocabularyCategoriesCount(
583                    HttpPrincipal httpPrincipal, long groupId, long vocabularyId)
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    try {
586                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
587                                            "getVocabularyCategoriesCount",
588                                            _getVocabularyCategoriesCountParameterTypes14);
589    
590                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
591                                            vocabularyId);
592    
593                            Object returnObj = null;
594    
595                            try {
596                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
597                            }
598                            catch (Exception e) {
599                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
600                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
601                                    }
602    
603                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
604                            }
605    
606                            return ((Integer)returnObj).intValue();
607                    }
608                    catch (com.liferay.portal.kernel.exception.SystemException se) {
609                            _log.error(se, se);
610    
611                            throw se;
612                    }
613            }
614    
615            public static int getVocabularyCategoriesCount(
616                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
617                    long vocabularyId)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    try {
620                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
621                                            "getVocabularyCategoriesCount",
622                                            _getVocabularyCategoriesCountParameterTypes15);
623    
624                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
625                                            name, vocabularyId);
626    
627                            Object returnObj = null;
628    
629                            try {
630                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
631                            }
632                            catch (Exception e) {
633                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
634                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
635                                    }
636    
637                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
638                            }
639    
640                            return ((Integer)returnObj).intValue();
641                    }
642                    catch (com.liferay.portal.kernel.exception.SystemException se) {
643                            _log.error(se, se);
644    
645                            throw se;
646                    }
647            }
648    
649            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
650                    HttpPrincipal httpPrincipal, long vocabularyId, int start, int end,
651                    com.liferay.portal.kernel.util.OrderByComparator obc)
652                    throws com.liferay.portal.kernel.exception.PortalException,
653                            com.liferay.portal.kernel.exception.SystemException {
654                    try {
655                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
656                                            "getVocabularyRootCategories",
657                                            _getVocabularyRootCategoriesParameterTypes16);
658    
659                            MethodHandler methodHandler = new MethodHandler(methodKey,
660                                            vocabularyId, start, end, obc);
661    
662                            Object returnObj = null;
663    
664                            try {
665                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
666                            }
667                            catch (Exception e) {
668                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
669                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
670                                    }
671    
672                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
673                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
674                                    }
675    
676                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
677                            }
678    
679                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
680                    }
681                    catch (com.liferay.portal.kernel.exception.SystemException se) {
682                            _log.error(se, se);
683    
684                            throw se;
685                    }
686            }
687    
688            public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
689                    HttpPrincipal httpPrincipal, long categoryId, long parentCategoryId,
690                    long vocabularyId,
691                    com.liferay.portal.service.ServiceContext serviceContext)
692                    throws com.liferay.portal.kernel.exception.PortalException,
693                            com.liferay.portal.kernel.exception.SystemException {
694                    try {
695                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
696                                            "moveCategory", _moveCategoryParameterTypes17);
697    
698                            MethodHandler methodHandler = new MethodHandler(methodKey,
699                                            categoryId, parentCategoryId, vocabularyId, serviceContext);
700    
701                            Object returnObj = null;
702    
703                            try {
704                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
705                            }
706                            catch (Exception e) {
707                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
708                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
709                                    }
710    
711                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
712                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
713                                    }
714    
715                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
716                            }
717    
718                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
719                    }
720                    catch (com.liferay.portal.kernel.exception.SystemException se) {
721                            _log.error(se, se);
722    
723                            throw se;
724                    }
725            }
726    
727            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
728                    HttpPrincipal httpPrincipal, long groupId, java.lang.String keywords,
729                    long vocabularyId, int start, int end,
730                    com.liferay.portal.kernel.util.OrderByComparator obc)
731                    throws com.liferay.portal.kernel.exception.SystemException {
732                    try {
733                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
734                                            "search", _searchParameterTypes18);
735    
736                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
737                                            keywords, vocabularyId, start, end, obc);
738    
739                            Object returnObj = null;
740    
741                            try {
742                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
743                            }
744                            catch (Exception e) {
745                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
746                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
747                                    }
748    
749                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
750                            }
751    
752                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
753                    }
754                    catch (com.liferay.portal.kernel.exception.SystemException se) {
755                            _log.error(se, se);
756    
757                            throw se;
758                    }
759            }
760    
761            public static com.liferay.portal.kernel.json.JSONArray search(
762                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
763                    java.lang.String[] categoryProperties, int start, int end)
764                    throws com.liferay.portal.kernel.exception.PortalException,
765                            com.liferay.portal.kernel.exception.SystemException {
766                    try {
767                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
768                                            "search", _searchParameterTypes19);
769    
770                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
771                                            name, categoryProperties, start, end);
772    
773                            Object returnObj = null;
774    
775                            try {
776                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
777                            }
778                            catch (Exception e) {
779                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
780                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
781                                    }
782    
783                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
784                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
785                                    }
786    
787                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
788                            }
789    
790                            return (com.liferay.portal.kernel.json.JSONArray)returnObj;
791                    }
792                    catch (com.liferay.portal.kernel.exception.SystemException se) {
793                            _log.error(se, se);
794    
795                            throw se;
796                    }
797            }
798    
799            public static com.liferay.portal.kernel.json.JSONArray search(
800                    HttpPrincipal httpPrincipal, long[] groupIds, java.lang.String name,
801                    long[] vocabularyIds, int start, int end)
802                    throws com.liferay.portal.kernel.exception.PortalException,
803                            com.liferay.portal.kernel.exception.SystemException {
804                    try {
805                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
806                                            "search", _searchParameterTypes20);
807    
808                            MethodHandler methodHandler = new MethodHandler(methodKey,
809                                            groupIds, name, vocabularyIds, start, end);
810    
811                            Object returnObj = null;
812    
813                            try {
814                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
815                            }
816                            catch (Exception e) {
817                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
818                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
819                                    }
820    
821                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
822                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
823                                    }
824    
825                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
826                            }
827    
828                            return (com.liferay.portal.kernel.json.JSONArray)returnObj;
829                    }
830                    catch (com.liferay.portal.kernel.exception.SystemException se) {
831                            _log.error(se, se);
832    
833                            throw se;
834                    }
835            }
836    
837            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
838                    HttpPrincipal httpPrincipal, long categoryId, long parentCategoryId,
839                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
840                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
841                    long vocabularyId, java.lang.String[] categoryProperties,
842                    com.liferay.portal.service.ServiceContext serviceContext)
843                    throws com.liferay.portal.kernel.exception.PortalException,
844                            com.liferay.portal.kernel.exception.SystemException {
845                    try {
846                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class,
847                                            "updateCategory", _updateCategoryParameterTypes21);
848    
849                            MethodHandler methodHandler = new MethodHandler(methodKey,
850                                            categoryId, parentCategoryId, titleMap, descriptionMap,
851                                            vocabularyId, categoryProperties, serviceContext);
852    
853                            Object returnObj = null;
854    
855                            try {
856                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
857                            }
858                            catch (Exception e) {
859                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
860                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
861                                    }
862    
863                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
864                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
865                                    }
866    
867                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
868                            }
869    
870                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
871                    }
872                    catch (com.liferay.portal.kernel.exception.SystemException se) {
873                            _log.error(se, se);
874    
875                            throw se;
876                    }
877            }
878    
879            private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceHttp.class);
880            private static final Class<?>[] _addCategoryParameterTypes0 = new Class[] {
881                            long.class, java.util.Map.class, java.util.Map.class, long.class,
882                            java.lang.String[].class,
883                            com.liferay.portal.service.ServiceContext.class
884                    };
885            private static final Class<?>[] _addCategoryParameterTypes1 = new Class[] {
886                            java.lang.String.class, long.class,
887                            com.liferay.portal.service.ServiceContext.class
888                    };
889            private static final Class<?>[] _deleteCategoriesParameterTypes2 = new Class[] {
890                            long[].class
891                    };
892            private static final Class<?>[] _deleteCategoryParameterTypes3 = new Class[] {
893                            long.class
894                    };
895            private static final Class<?>[] _getCategoriesParameterTypes4 = new Class[] {
896                            java.lang.String.class, long.class
897                    };
898            private static final Class<?>[] _getCategoryParameterTypes5 = new Class[] {
899                            long.class
900                    };
901            private static final Class<?>[] _getChildCategoriesParameterTypes6 = new Class[] {
902                            long.class
903                    };
904            private static final Class<?>[] _getChildCategoriesParameterTypes7 = new Class[] {
905                            long.class, int.class, int.class,
906                            com.liferay.portal.kernel.util.OrderByComparator.class
907                    };
908            private static final Class<?>[] _getJSONSearchParameterTypes8 = new Class[] {
909                            long.class, java.lang.String.class, long[].class, int.class,
910                            int.class
911                    };
912            private static final Class<?>[] _getJSONVocabularyCategoriesParameterTypes9 = new Class[] {
913                            long.class, int.class, int.class,
914                            com.liferay.portal.kernel.util.OrderByComparator.class
915                    };
916            private static final Class<?>[] _getJSONVocabularyCategoriesParameterTypes10 =
917                    new Class[] {
918                            long.class, java.lang.String.class, long.class, int.class, int.class,
919                            com.liferay.portal.kernel.util.OrderByComparator.class
920                    };
921            private static final Class<?>[] _getVocabularyCategoriesParameterTypes11 = new Class[] {
922                            long.class, int.class, int.class,
923                            com.liferay.portal.kernel.util.OrderByComparator.class
924                    };
925            private static final Class<?>[] _getVocabularyCategoriesParameterTypes12 = new Class[] {
926                            long.class, long.class, int.class, int.class,
927                            com.liferay.portal.kernel.util.OrderByComparator.class
928                    };
929            private static final Class<?>[] _getVocabularyCategoriesParameterTypes13 = new Class[] {
930                            long.class, java.lang.String.class, long.class, int.class, int.class,
931                            com.liferay.portal.kernel.util.OrderByComparator.class
932                    };
933            private static final Class<?>[] _getVocabularyCategoriesCountParameterTypes14 =
934                    new Class[] { long.class, long.class };
935            private static final Class<?>[] _getVocabularyCategoriesCountParameterTypes15 =
936                    new Class[] { long.class, java.lang.String.class, long.class };
937            private static final Class<?>[] _getVocabularyRootCategoriesParameterTypes16 =
938                    new Class[] {
939                            long.class, int.class, int.class,
940                            com.liferay.portal.kernel.util.OrderByComparator.class
941                    };
942            private static final Class<?>[] _moveCategoryParameterTypes17 = new Class[] {
943                            long.class, long.class, long.class,
944                            com.liferay.portal.service.ServiceContext.class
945                    };
946            private static final Class<?>[] _searchParameterTypes18 = new Class[] {
947                            long.class, java.lang.String.class, long.class, int.class, int.class,
948                            com.liferay.portal.kernel.util.OrderByComparator.class
949                    };
950            private static final Class<?>[] _searchParameterTypes19 = new Class[] {
951                            long.class, java.lang.String.class, java.lang.String[].class,
952                            int.class, int.class
953                    };
954            private static final Class<?>[] _searchParameterTypes20 = new Class[] {
955                            long[].class, java.lang.String.class, long[].class, int.class,
956                            int.class
957                    };
958            private static final Class<?>[] _updateCategoryParameterTypes21 = new Class[] {
959                            long.class, long.class, java.util.Map.class, java.util.Map.class,
960                            long.class, java.lang.String[].class,
961                            com.liferay.portal.service.ServiceContext.class
962                    };
963    }