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.getName(),
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 void deleteCategories(HttpPrincipal httpPrincipal,
100                    long[] categoryIds)
101                    throws com.liferay.portal.kernel.exception.PortalException,
102                            com.liferay.portal.kernel.exception.SystemException {
103                    try {
104                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
105                                            "deleteCategories", _deleteCategoriesParameterTypes1);
106    
107                            MethodHandler methodHandler = new MethodHandler(methodKey,
108                                            categoryIds);
109    
110                            try {
111                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
112                            }
113                            catch (Exception e) {
114                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
115                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
116                                    }
117    
118                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
119                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
120                                    }
121    
122                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
123                            }
124                    }
125                    catch (com.liferay.portal.kernel.exception.SystemException se) {
126                            _log.error(se, se);
127    
128                            throw se;
129                    }
130            }
131    
132            public static void deleteCategory(HttpPrincipal httpPrincipal,
133                    long categoryId)
134                    throws com.liferay.portal.kernel.exception.PortalException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    try {
137                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
138                                            "deleteCategory", _deleteCategoryParameterTypes2);
139    
140                            MethodHandler methodHandler = new MethodHandler(methodKey,
141                                            categoryId);
142    
143                            try {
144                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
145                            }
146                            catch (Exception e) {
147                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
148                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
149                                    }
150    
151                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
152                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
153                                    }
154    
155                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
156                            }
157                    }
158                    catch (com.liferay.portal.kernel.exception.SystemException se) {
159                            _log.error(se, se);
160    
161                            throw se;
162                    }
163            }
164    
165            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
166                    HttpPrincipal httpPrincipal, java.lang.String className, long classPK)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    try {
170                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
171                                            "getCategories", _getCategoriesParameterTypes3);
172    
173                            MethodHandler methodHandler = new MethodHandler(methodKey,
174                                            className, classPK);
175    
176                            Object returnObj = null;
177    
178                            try {
179                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
180                            }
181                            catch (Exception e) {
182                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
183                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
184                                    }
185    
186                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
187                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
188                                    }
189    
190                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
191                            }
192    
193                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
194                    }
195                    catch (com.liferay.portal.kernel.exception.SystemException se) {
196                            _log.error(se, se);
197    
198                            throw se;
199                    }
200            }
201    
202            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
203                    HttpPrincipal httpPrincipal, long categoryId)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    try {
207                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
208                                            "getCategory", _getCategoryParameterTypes4);
209    
210                            MethodHandler methodHandler = new MethodHandler(methodKey,
211                                            categoryId);
212    
213                            Object returnObj = null;
214    
215                            try {
216                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
217                            }
218                            catch (Exception e) {
219                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
220                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
221                                    }
222    
223                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
224                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
225                                    }
226    
227                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
228                            }
229    
230                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
231                    }
232                    catch (com.liferay.portal.kernel.exception.SystemException se) {
233                            _log.error(se, se);
234    
235                            throw se;
236                    }
237            }
238    
239            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
240                    HttpPrincipal httpPrincipal, long parentCategoryId)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException {
243                    try {
244                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
245                                            "getChildCategories", _getChildCategoriesParameterTypes5);
246    
247                            MethodHandler methodHandler = new MethodHandler(methodKey,
248                                            parentCategoryId);
249    
250                            Object returnObj = null;
251    
252                            try {
253                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
254                            }
255                            catch (Exception e) {
256                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
257                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
258                                    }
259    
260                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
261                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
262                                    }
263    
264                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
265                            }
266    
267                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
268                    }
269                    catch (com.liferay.portal.kernel.exception.SystemException se) {
270                            _log.error(se, se);
271    
272                            throw se;
273                    }
274            }
275    
276            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
277                    HttpPrincipal httpPrincipal, long parentCategoryId, int start, int end,
278                    com.liferay.portal.kernel.util.OrderByComparator obc)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    try {
282                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
283                                            "getChildCategories", _getChildCategoriesParameterTypes6);
284    
285                            MethodHandler methodHandler = new MethodHandler(methodKey,
286                                            parentCategoryId, start, end, obc);
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 com.liferay.portal.kernel.json.JSONArray getJSONSearch(
315                    HttpPrincipal httpPrincipal, long groupId, java.lang.String keywords,
316                    long vocabularyId, int start, int end,
317                    com.liferay.portal.kernel.util.OrderByComparator obc)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException {
320                    try {
321                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
322                                            "getJSONSearch", _getJSONSearchParameterTypes7);
323    
324                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
325                                            keywords, vocabularyId, start, end, obc);
326    
327                            Object returnObj = null;
328    
329                            try {
330                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
331                            }
332                            catch (Exception e) {
333                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
334                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
335                                    }
336    
337                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
338                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
339                                    }
340    
341                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
342                            }
343    
344                            return (com.liferay.portal.kernel.json.JSONArray)returnObj;
345                    }
346                    catch (com.liferay.portal.kernel.exception.SystemException se) {
347                            _log.error(se, se);
348    
349                            throw se;
350                    }
351            }
352    
353            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
354                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
355                    long vocabularyId, int start, int end,
356                    com.liferay.portal.kernel.util.OrderByComparator obc)
357                    throws com.liferay.portal.kernel.exception.PortalException,
358                            com.liferay.portal.kernel.exception.SystemException {
359                    try {
360                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
361                                            "getJSONVocabularyCategories",
362                                            _getJSONVocabularyCategoriesParameterTypes8);
363    
364                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
365                                            name, vocabularyId, start, end, obc);
366    
367                            Object returnObj = null;
368    
369                            try {
370                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
371                            }
372                            catch (Exception e) {
373                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
374                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
375                                    }
376    
377                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
378                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
379                                    }
380    
381                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
382                            }
383    
384                            return (com.liferay.portal.kernel.json.JSONObject)returnObj;
385                    }
386                    catch (com.liferay.portal.kernel.exception.SystemException se) {
387                            _log.error(se, se);
388    
389                            throw se;
390                    }
391            }
392    
393            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
394                    HttpPrincipal httpPrincipal, long vocabularyId, int start, int end,
395                    com.liferay.portal.kernel.util.OrderByComparator obc)
396                    throws com.liferay.portal.kernel.exception.PortalException,
397                            com.liferay.portal.kernel.exception.SystemException {
398                    try {
399                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
400                                            "getVocabularyCategories",
401                                            _getVocabularyCategoriesParameterTypes9);
402    
403                            MethodHandler methodHandler = new MethodHandler(methodKey,
404                                            vocabularyId, start, end, obc);
405    
406                            Object returnObj = null;
407    
408                            try {
409                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
410                            }
411                            catch (Exception e) {
412                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
413                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
414                                    }
415    
416                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
417                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
418                                    }
419    
420                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
421                            }
422    
423                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
424                    }
425                    catch (com.liferay.portal.kernel.exception.SystemException se) {
426                            _log.error(se, se);
427    
428                            throw se;
429                    }
430            }
431    
432            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
433                    HttpPrincipal httpPrincipal, long parentCategoryId, long vocabularyId,
434                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    try {
438                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
439                                            "getVocabularyCategories",
440                                            _getVocabularyCategoriesParameterTypes10);
441    
442                            MethodHandler methodHandler = new MethodHandler(methodKey,
443                                            parentCategoryId, vocabularyId, start, end, obc);
444    
445                            Object returnObj = null;
446    
447                            try {
448                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
449                            }
450                            catch (Exception e) {
451                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
452                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
453                                    }
454    
455                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
456                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
457                                    }
458    
459                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
460                            }
461    
462                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
463                    }
464                    catch (com.liferay.portal.kernel.exception.SystemException se) {
465                            _log.error(se, se);
466    
467                            throw se;
468                    }
469            }
470    
471            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
472                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
473                    long vocabularyId, int start, int end,
474                    com.liferay.portal.kernel.util.OrderByComparator obc)
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    try {
477                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
478                                            "getVocabularyCategories",
479                                            _getVocabularyCategoriesParameterTypes11);
480    
481                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
482                                            name, vocabularyId, start, end, obc);
483    
484                            Object returnObj = null;
485    
486                            try {
487                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
488                            }
489                            catch (Exception e) {
490                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
491                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
492                                    }
493    
494                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
495                            }
496    
497                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
498                    }
499                    catch (com.liferay.portal.kernel.exception.SystemException se) {
500                            _log.error(se, se);
501    
502                            throw se;
503                    }
504            }
505    
506            public static int getVocabularyCategoriesCount(
507                    HttpPrincipal httpPrincipal, long groupId, long vocabularyId)
508                    throws com.liferay.portal.kernel.exception.SystemException {
509                    try {
510                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
511                                            "getVocabularyCategoriesCount",
512                                            _getVocabularyCategoriesCountParameterTypes12);
513    
514                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
515                                            vocabularyId);
516    
517                            Object returnObj = null;
518    
519                            try {
520                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
521                            }
522                            catch (Exception e) {
523                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
524                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
525                                    }
526    
527                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
528                            }
529    
530                            return ((Integer)returnObj).intValue();
531                    }
532                    catch (com.liferay.portal.kernel.exception.SystemException se) {
533                            _log.error(se, se);
534    
535                            throw se;
536                    }
537            }
538    
539            public static int getVocabularyCategoriesCount(
540                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
541                    long vocabularyId)
542                    throws com.liferay.portal.kernel.exception.SystemException {
543                    try {
544                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
545                                            "getVocabularyCategoriesCount",
546                                            _getVocabularyCategoriesCountParameterTypes13);
547    
548                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
549                                            name, vocabularyId);
550    
551                            Object returnObj = null;
552    
553                            try {
554                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
555                            }
556                            catch (Exception e) {
557                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
558                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
559                                    }
560    
561                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
562                            }
563    
564                            return ((Integer)returnObj).intValue();
565                    }
566                    catch (com.liferay.portal.kernel.exception.SystemException se) {
567                            _log.error(se, se);
568    
569                            throw se;
570                    }
571            }
572    
573            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
574                    HttpPrincipal httpPrincipal, long vocabularyId, int start, int end,
575                    com.liferay.portal.kernel.util.OrderByComparator obc)
576                    throws com.liferay.portal.kernel.exception.PortalException,
577                            com.liferay.portal.kernel.exception.SystemException {
578                    try {
579                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
580                                            "getVocabularyRootCategories",
581                                            _getVocabularyRootCategoriesParameterTypes14);
582    
583                            MethodHandler methodHandler = new MethodHandler(methodKey,
584                                            vocabularyId, start, end, obc);
585    
586                            Object returnObj = null;
587    
588                            try {
589                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
590                            }
591                            catch (Exception e) {
592                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
593                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
594                                    }
595    
596                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
597                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
598                                    }
599    
600                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
601                            }
602    
603                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
604                    }
605                    catch (com.liferay.portal.kernel.exception.SystemException se) {
606                            _log.error(se, se);
607    
608                            throw se;
609                    }
610            }
611    
612            public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
613                    HttpPrincipal httpPrincipal, long categoryId, long parentCategoryId,
614                    long vocabularyId,
615                    com.liferay.portal.service.ServiceContext serviceContext)
616                    throws com.liferay.portal.kernel.exception.PortalException,
617                            com.liferay.portal.kernel.exception.SystemException {
618                    try {
619                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
620                                            "moveCategory", _moveCategoryParameterTypes15);
621    
622                            MethodHandler methodHandler = new MethodHandler(methodKey,
623                                            categoryId, parentCategoryId, vocabularyId, serviceContext);
624    
625                            Object returnObj = null;
626    
627                            try {
628                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
629                            }
630                            catch (Exception e) {
631                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
632                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
633                                    }
634    
635                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
636                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
637                                    }
638    
639                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
640                            }
641    
642                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
643                    }
644                    catch (com.liferay.portal.kernel.exception.SystemException se) {
645                            _log.error(se, se);
646    
647                            throw se;
648                    }
649            }
650    
651            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
652                    HttpPrincipal httpPrincipal, long groupId, java.lang.String keywords,
653                    long vocabularyId, int start, int end,
654                    com.liferay.portal.kernel.util.OrderByComparator obc)
655                    throws com.liferay.portal.kernel.exception.PortalException,
656                            com.liferay.portal.kernel.exception.SystemException {
657                    try {
658                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
659                                            "search", _searchParameterTypes16);
660    
661                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
662                                            keywords, vocabularyId, start, end, obc);
663    
664                            Object returnObj = null;
665    
666                            try {
667                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
668                            }
669                            catch (Exception e) {
670                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
671                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
672                                    }
673    
674                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
675                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
676                                    }
677    
678                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
679                            }
680    
681                            return (java.util.List<com.liferay.portlet.asset.model.AssetCategory>)returnObj;
682                    }
683                    catch (com.liferay.portal.kernel.exception.SystemException se) {
684                            _log.error(se, se);
685    
686                            throw se;
687                    }
688            }
689    
690            public static com.liferay.portal.kernel.json.JSONArray search(
691                    HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
692                    java.lang.String[] categoryProperties, int start, int end)
693                    throws com.liferay.portal.kernel.exception.PortalException,
694                            com.liferay.portal.kernel.exception.SystemException {
695                    try {
696                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
697                                            "search", _searchParameterTypes17);
698    
699                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
700                                            name, categoryProperties, start, end);
701    
702                            Object returnObj = null;
703    
704                            try {
705                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
706                            }
707                            catch (Exception e) {
708                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
709                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
710                                    }
711    
712                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
713                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
714                                    }
715    
716                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
717                            }
718    
719                            return (com.liferay.portal.kernel.json.JSONArray)returnObj;
720                    }
721                    catch (com.liferay.portal.kernel.exception.SystemException se) {
722                            _log.error(se, se);
723    
724                            throw se;
725                    }
726            }
727    
728            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
729                    HttpPrincipal httpPrincipal, long categoryId, long parentCategoryId,
730                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
731                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
732                    long vocabularyId, java.lang.String[] categoryProperties,
733                    com.liferay.portal.service.ServiceContext serviceContext)
734                    throws com.liferay.portal.kernel.exception.PortalException,
735                            com.liferay.portal.kernel.exception.SystemException {
736                    try {
737                            MethodKey methodKey = new MethodKey(AssetCategoryServiceUtil.class.getName(),
738                                            "updateCategory", _updateCategoryParameterTypes18);
739    
740                            MethodHandler methodHandler = new MethodHandler(methodKey,
741                                            categoryId, parentCategoryId, titleMap, descriptionMap,
742                                            vocabularyId, categoryProperties, serviceContext);
743    
744                            Object returnObj = null;
745    
746                            try {
747                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
748                            }
749                            catch (Exception e) {
750                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
751                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
752                                    }
753    
754                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
755                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
756                                    }
757    
758                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
759                            }
760    
761                            return (com.liferay.portlet.asset.model.AssetCategory)returnObj;
762                    }
763                    catch (com.liferay.portal.kernel.exception.SystemException se) {
764                            _log.error(se, se);
765    
766                            throw se;
767                    }
768            }
769    
770            private static Log _log = LogFactoryUtil.getLog(AssetCategoryServiceHttp.class);
771            private static final Class<?>[] _addCategoryParameterTypes0 = new Class[] {
772                            long.class, java.util.Map.class, java.util.Map.class, long.class,
773                            java.lang.String[].class,
774                            com.liferay.portal.service.ServiceContext.class
775                    };
776            private static final Class<?>[] _deleteCategoriesParameterTypes1 = new Class[] {
777                            long[].class
778                    };
779            private static final Class<?>[] _deleteCategoryParameterTypes2 = new Class[] {
780                            long.class
781                    };
782            private static final Class<?>[] _getCategoriesParameterTypes3 = new Class[] {
783                            java.lang.String.class, long.class
784                    };
785            private static final Class<?>[] _getCategoryParameterTypes4 = new Class[] {
786                            long.class
787                    };
788            private static final Class<?>[] _getChildCategoriesParameterTypes5 = new Class[] {
789                            long.class
790                    };
791            private static final Class<?>[] _getChildCategoriesParameterTypes6 = new Class[] {
792                            long.class, int.class, int.class,
793                            com.liferay.portal.kernel.util.OrderByComparator.class
794                    };
795            private static final Class<?>[] _getJSONSearchParameterTypes7 = new Class[] {
796                            long.class, java.lang.String.class, long.class, int.class, int.class,
797                            com.liferay.portal.kernel.util.OrderByComparator.class
798                    };
799            private static final Class<?>[] _getJSONVocabularyCategoriesParameterTypes8 = new Class[] {
800                            long.class, java.lang.String.class, long.class, int.class, int.class,
801                            com.liferay.portal.kernel.util.OrderByComparator.class
802                    };
803            private static final Class<?>[] _getVocabularyCategoriesParameterTypes9 = new Class[] {
804                            long.class, int.class, int.class,
805                            com.liferay.portal.kernel.util.OrderByComparator.class
806                    };
807            private static final Class<?>[] _getVocabularyCategoriesParameterTypes10 = new Class[] {
808                            long.class, long.class, int.class, int.class,
809                            com.liferay.portal.kernel.util.OrderByComparator.class
810                    };
811            private static final Class<?>[] _getVocabularyCategoriesParameterTypes11 = new Class[] {
812                            long.class, java.lang.String.class, long.class, int.class, int.class,
813                            com.liferay.portal.kernel.util.OrderByComparator.class
814                    };
815            private static final Class<?>[] _getVocabularyCategoriesCountParameterTypes12 =
816                    new Class[] { long.class, long.class };
817            private static final Class<?>[] _getVocabularyCategoriesCountParameterTypes13 =
818                    new Class[] { long.class, java.lang.String.class, long.class };
819            private static final Class<?>[] _getVocabularyRootCategoriesParameterTypes14 =
820                    new Class[] {
821                            long.class, int.class, int.class,
822                            com.liferay.portal.kernel.util.OrderByComparator.class
823                    };
824            private static final Class<?>[] _moveCategoryParameterTypes15 = new Class[] {
825                            long.class, long.class, long.class,
826                            com.liferay.portal.service.ServiceContext.class
827                    };
828            private static final Class<?>[] _searchParameterTypes16 = new Class[] {
829                            long.class, java.lang.String.class, long.class, int.class, int.class,
830                            com.liferay.portal.kernel.util.OrderByComparator.class
831                    };
832            private static final Class<?>[] _searchParameterTypes17 = new Class[] {
833                            long.class, java.lang.String.class, java.lang.String[].class,
834                            int.class, int.class
835                    };
836            private static final Class<?>[] _updateCategoryParameterTypes18 = new Class[] {
837                            long.class, long.class, java.util.Map.class, java.util.Map.class,
838                            long.class, java.lang.String[].class,
839                            com.liferay.portal.service.ServiceContext.class
840                    };
841    }