001    /**
002     * Copyright (c) 2000-present 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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for AssetCategory. This utility wraps
024     * {@link com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see AssetCategoryService
032     * @see com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
033     * @see com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class AssetCategoryServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
044                    long groupId, long parentCategoryId,
045                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
046                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
047                    long vocabularyId, java.lang.String[] categoryProperties,
048                    com.liferay.portal.service.ServiceContext serviceContext)
049                    throws com.liferay.portal.kernel.exception.PortalException {
050                    return getService()
051                                       .addCategory(groupId, parentCategoryId, titleMap,
052                            descriptionMap, vocabularyId, categoryProperties, serviceContext);
053            }
054    
055            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
056                    long groupId, java.lang.String title, long vocabularyId,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    return getService()
060                                       .addCategory(groupId, title, vocabularyId, serviceContext);
061            }
062    
063            public static void deleteCategories(long[] categoryIds)
064                    throws com.liferay.portal.kernel.exception.PortalException {
065                    getService().deleteCategories(categoryIds);
066            }
067    
068            /**
069            * @deprecated As of 7.0.0, Replaced by {@link #deleteCategories(long[])}
070            */
071            @Deprecated
072            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> deleteCategories(
073                    long[] categoryIds,
074                    com.liferay.portal.service.ServiceContext serviceContext)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    return getService().deleteCategories(categoryIds, serviceContext);
077            }
078    
079            public static void deleteCategory(long categoryId)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    getService().deleteCategory(categoryId);
082            }
083    
084            public static com.liferay.portlet.asset.model.AssetCategory fetchCategory(
085                    long categoryId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().fetchCategory(categoryId);
088            }
089    
090            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
091                    java.lang.String className, long classPK)
092                    throws com.liferay.portal.kernel.exception.PortalException {
093                    return getService().getCategories(className, classPK);
094            }
095    
096            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
097                    long categoryId)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    return getService().getCategory(categoryId);
100            }
101    
102            public static java.lang.String getCategoryPath(long categoryId)
103                    throws com.liferay.portal.kernel.exception.PortalException {
104                    return getService().getCategoryPath(categoryId);
105            }
106    
107            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
108                    long parentCategoryId)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    return getService().getChildCategories(parentCategoryId);
111            }
112    
113            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
114                    long parentCategoryId, int start, int end,
115                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
116                    throws com.liferay.portal.kernel.exception.PortalException {
117                    return getService().getChildCategories(parentCategoryId, start, end, obc);
118            }
119    
120            /**
121            * @deprecated As of 6.2.0, replaced by {@link #search(long[], String,
122            long[], int, int)}
123            */
124            @Deprecated
125            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
126                    long groupId, java.lang.String name, long[] vocabularyIds, int start,
127                    int end) throws com.liferay.portal.kernel.exception.PortalException {
128                    return getService()
129                                       .getJSONSearch(groupId, name, vocabularyIds, start, end);
130            }
131    
132            /**
133            * @deprecated As of 6.2.0, replaced by {@link
134            #getVocabularyCategoriesDisplay(long, String, long, int, int,
135            OrderByComparator)}
136            */
137            @Deprecated
138            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
139                    long groupId, java.lang.String name, long vocabularyId, int start,
140                    int end,
141                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
142                    throws com.liferay.portal.kernel.exception.PortalException {
143                    return getService()
144                                       .getJSONVocabularyCategories(groupId, name, vocabularyId,
145                            start, end, obc);
146            }
147    
148            /**
149            * @deprecated As of 6.2.0, replaced by {@link
150            #getVocabularyCategoriesDisplay(long, int, int,
151            OrderByComparator)}
152            */
153            @Deprecated
154            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
155                    long vocabularyId, int start, int end,
156                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
157                    throws com.liferay.portal.kernel.exception.PortalException {
158                    return getService()
159                                       .getJSONVocabularyCategories(vocabularyId, start, end, obc);
160            }
161    
162            /**
163            * Returns the OSGi service identifier.
164            *
165            * @return the OSGi service identifier
166            */
167            public static java.lang.String getOSGiServiceIdentifier() {
168                    return getService().getOSGiServiceIdentifier();
169            }
170    
171            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
172                    long groupId, java.lang.String name, long vocabularyId, int start,
173                    int end,
174                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
175                    return getService()
176                                       .getVocabularyCategories(groupId, name, vocabularyId, start,
177                            end, obc);
178            }
179    
180            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
181                    long groupId, long parentCategoryId, long vocabularyId, int start,
182                    int end,
183                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
184                    return getService()
185                                       .getVocabularyCategories(groupId, parentCategoryId,
186                            vocabularyId, start, end, obc);
187            }
188    
189            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
190                    long parentCategoryId, long vocabularyId, int start, int end,
191                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
192                    throws com.liferay.portal.kernel.exception.PortalException {
193                    return getService()
194                                       .getVocabularyCategories(parentCategoryId, vocabularyId,
195                            start, end, obc);
196            }
197    
198            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
199                    long vocabularyId, int start, int end,
200                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
201                    throws com.liferay.portal.kernel.exception.PortalException {
202                    return getService()
203                                       .getVocabularyCategories(vocabularyId, start, end, obc);
204            }
205    
206            public static int getVocabularyCategoriesCount(long groupId,
207                    java.lang.String name, long vocabularyId) {
208                    return getService()
209                                       .getVocabularyCategoriesCount(groupId, name, vocabularyId);
210            }
211    
212            public static int getVocabularyCategoriesCount(long groupId,
213                    long parentCategory, long vocabularyId) {
214                    return getService()
215                                       .getVocabularyCategoriesCount(groupId, parentCategory,
216                            vocabularyId);
217            }
218    
219            public static int getVocabularyCategoriesCount(long groupId,
220                    long vocabularyId) {
221                    return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
222            }
223    
224            public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
225                    long groupId, java.lang.String name, long vocabularyId, int start,
226                    int end,
227                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
228                    throws com.liferay.portal.kernel.exception.PortalException {
229                    return getService()
230                                       .getVocabularyCategoriesDisplay(groupId, name, vocabularyId,
231                            start, end, obc);
232            }
233    
234            public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
235                    long vocabularyId, int start, int end,
236                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
237                    throws com.liferay.portal.kernel.exception.PortalException {
238                    return getService()
239                                       .getVocabularyCategoriesDisplay(vocabularyId, start, end, obc);
240            }
241    
242            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
243                    long groupId, long vocabularyId, int start, int end,
244                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
245                    return getService()
246                                       .getVocabularyRootCategories(groupId, vocabularyId, start,
247                            end, obc);
248            }
249    
250            /**
251            * @deprecated As of 6.2.0, replaced by {@link
252            #getVocabularyRootCategories(long, long, int, int,
253            OrderByComparator)}
254            */
255            @Deprecated
256            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
257                    long vocabularyId, int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
259                    throws com.liferay.portal.kernel.exception.PortalException {
260                    return getService()
261                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
262            }
263    
264            public static int getVocabularyRootCategoriesCount(long groupId,
265                    long vocabularyId) {
266                    return getService()
267                                       .getVocabularyRootCategoriesCount(groupId, vocabularyId);
268            }
269    
270            public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
271                    long categoryId, long parentCategoryId, long vocabularyId,
272                    com.liferay.portal.service.ServiceContext serviceContext)
273                    throws com.liferay.portal.kernel.exception.PortalException {
274                    return getService()
275                                       .moveCategory(categoryId, parentCategoryId, vocabularyId,
276                            serviceContext);
277            }
278    
279            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
280                    long groupId, java.lang.String keywords, long vocabularyId, int start,
281                    int end,
282                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
283                    return getService()
284                                       .search(groupId, keywords, vocabularyId, start, end, obc);
285            }
286    
287            public static com.liferay.portal.kernel.json.JSONArray search(
288                    long groupId, java.lang.String name,
289                    java.lang.String[] categoryProperties, int start, int end)
290                    throws com.liferay.portal.kernel.exception.PortalException {
291                    return getService().search(groupId, name, categoryProperties, start, end);
292            }
293    
294            public static com.liferay.portal.kernel.json.JSONArray search(
295                    long[] groupIds, java.lang.String name, long[] vocabularyIds,
296                    int start, int end)
297                    throws com.liferay.portal.kernel.exception.PortalException {
298                    return getService().search(groupIds, name, vocabularyIds, start, end);
299            }
300    
301            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
302                    long groupId, java.lang.String title, long parentCategoryId,
303                    long vocabularyId, int start, int end)
304                    throws com.liferay.portal.kernel.exception.PortalException {
305                    return getService()
306                                       .searchCategoriesDisplay(groupId, title, parentCategoryId,
307                            vocabularyId, start, end);
308            }
309    
310            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
311                    long groupId, java.lang.String title, long vocabularyId,
312                    long parentCategoryId, int start, int end,
313                    com.liferay.portal.kernel.search.Sort sort)
314                    throws com.liferay.portal.kernel.exception.PortalException {
315                    return getService()
316                                       .searchCategoriesDisplay(groupId, title, vocabularyId,
317                            parentCategoryId, start, end, sort);
318            }
319    
320            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
321                    long groupId, java.lang.String title, long vocabularyId, int start,
322                    int end) throws com.liferay.portal.kernel.exception.PortalException {
323                    return getService()
324                                       .searchCategoriesDisplay(groupId, title, vocabularyId,
325                            start, end);
326            }
327    
328            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
329                    long[] groupIds, java.lang.String title, long[] parentCategoryIds,
330                    long[] vocabularyIds, int start, int end)
331                    throws com.liferay.portal.kernel.exception.PortalException {
332                    return getService()
333                                       .searchCategoriesDisplay(groupIds, title, parentCategoryIds,
334                            vocabularyIds, start, end);
335            }
336    
337            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
338                    long[] groupIds, java.lang.String title, long[] vocabularyIds,
339                    long[] parentCategoryIds, int start, int end,
340                    com.liferay.portal.kernel.search.Sort sort)
341                    throws com.liferay.portal.kernel.exception.PortalException {
342                    return getService()
343                                       .searchCategoriesDisplay(groupIds, title, vocabularyIds,
344                            parentCategoryIds, start, end, sort);
345            }
346    
347            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
348                    long[] groupIds, java.lang.String title, long[] vocabularyIds,
349                    int start, int end)
350                    throws com.liferay.portal.kernel.exception.PortalException {
351                    return getService()
352                                       .searchCategoriesDisplay(groupIds, title, vocabularyIds,
353                            start, end);
354            }
355    
356            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
357                    long categoryId, long parentCategoryId,
358                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
359                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
360                    long vocabularyId, java.lang.String[] categoryProperties,
361                    com.liferay.portal.service.ServiceContext serviceContext)
362                    throws com.liferay.portal.kernel.exception.PortalException {
363                    return getService()
364                                       .updateCategory(categoryId, parentCategoryId, titleMap,
365                            descriptionMap, vocabularyId, categoryProperties, serviceContext);
366            }
367    
368            public static AssetCategoryService getService() {
369                    if (_service == null) {
370                            _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
371    
372                            ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
373                                    "_service");
374                    }
375    
376                    return _service;
377            }
378    
379            private static AssetCategoryService _service;
380    }