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 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(parentCategoryId, titleMap, descriptionMap,
052                            vocabularyId, categoryProperties, serviceContext);
053            }
054    
055            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
056                    java.lang.String title, long vocabularyId,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    return getService().addCategory(title, vocabularyId, serviceContext);
060            }
061    
062            public static void deleteCategories(long[] categoryIds)
063                    throws com.liferay.portal.kernel.exception.PortalException {
064                    getService().deleteCategories(categoryIds);
065            }
066    
067            /**
068            * @deprecated As of 7.0.0, Replaced by {@link #deleteCategories(long[])}
069            */
070            @Deprecated
071            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> deleteCategories(
072                    long[] categoryIds,
073                    com.liferay.portal.service.ServiceContext serviceContext)
074                    throws com.liferay.portal.kernel.exception.PortalException {
075                    return getService().deleteCategories(categoryIds, serviceContext);
076            }
077    
078            public static void deleteCategory(long categoryId)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    getService().deleteCategory(categoryId);
081            }
082    
083            /**
084            * Returns the Spring bean ID for this bean.
085            *
086            * @return the Spring bean ID for this bean
087            */
088            public static java.lang.String getBeanIdentifier() {
089                    return getService().getBeanIdentifier();
090            }
091    
092            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
093                    java.lang.String className, long classPK)
094                    throws com.liferay.portal.kernel.exception.PortalException {
095                    return getService().getCategories(className, classPK);
096            }
097    
098            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
099                    long categoryId)
100                    throws com.liferay.portal.kernel.exception.PortalException {
101                    return getService().getCategory(categoryId);
102            }
103    
104            public static java.lang.String getCategoryPath(long categoryId)
105                    throws com.liferay.portal.kernel.exception.PortalException {
106                    return getService().getCategoryPath(categoryId);
107            }
108    
109            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
110                    long parentCategoryId)
111                    throws com.liferay.portal.kernel.exception.PortalException {
112                    return getService().getChildCategories(parentCategoryId);
113            }
114    
115            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
116                    long parentCategoryId, int start, int end,
117                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
118                    throws com.liferay.portal.kernel.exception.PortalException {
119                    return getService().getChildCategories(parentCategoryId, start, end, obc);
120            }
121    
122            /**
123            * @deprecated As of 6.2.0, replaced by {@link #search(long[], String,
124            long[], int, int)}
125            */
126            @Deprecated
127            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
128                    long groupId, java.lang.String name, long[] vocabularyIds, int start,
129                    int end) throws com.liferay.portal.kernel.exception.PortalException {
130                    return getService()
131                                       .getJSONSearch(groupId, name, vocabularyIds, start, end);
132            }
133    
134            /**
135            * @deprecated As of 6.2.0, replaced by {@link
136            #getVocabularyCategoriesDisplay(long, String, long, int, int,
137            OrderByComparator)}
138            */
139            @Deprecated
140            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
141                    long groupId, java.lang.String name, long vocabularyId, int start,
142                    int end,
143                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
144                    throws com.liferay.portal.kernel.exception.PortalException {
145                    return getService()
146                                       .getJSONVocabularyCategories(groupId, name, vocabularyId,
147                            start, end, obc);
148            }
149    
150            /**
151            * @deprecated As of 6.2.0, replaced by {@link
152            #getVocabularyCategoriesDisplay(long, int, int,
153            OrderByComparator)}
154            */
155            @Deprecated
156            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
157                    long vocabularyId, int start, int end,
158                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
159                    throws com.liferay.portal.kernel.exception.PortalException {
160                    return getService()
161                                       .getJSONVocabularyCategories(vocabularyId, start, end, obc);
162            }
163    
164            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
165                    long groupId, java.lang.String name, long vocabularyId, int start,
166                    int end,
167                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
168                    return getService()
169                                       .getVocabularyCategories(groupId, name, vocabularyId, start,
170                            end, obc);
171            }
172    
173            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
174                    long groupId, long parentCategoryId, long vocabularyId, int start,
175                    int end,
176                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
177                    return getService()
178                                       .getVocabularyCategories(groupId, parentCategoryId,
179                            vocabularyId, start, end, obc);
180            }
181    
182            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
183                    long parentCategoryId, long vocabularyId, int start, int end,
184                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
185                    throws com.liferay.portal.kernel.exception.PortalException {
186                    return getService()
187                                       .getVocabularyCategories(parentCategoryId, vocabularyId,
188                            start, end, obc);
189            }
190    
191            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
192                    long vocabularyId, int start, int end,
193                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
194                    throws com.liferay.portal.kernel.exception.PortalException {
195                    return getService()
196                                       .getVocabularyCategories(vocabularyId, start, end, obc);
197            }
198    
199            public static int getVocabularyCategoriesCount(long groupId,
200                    java.lang.String name, long vocabularyId) {
201                    return getService()
202                                       .getVocabularyCategoriesCount(groupId, name, vocabularyId);
203            }
204    
205            public static int getVocabularyCategoriesCount(long groupId,
206                    long parentCategory, long vocabularyId) {
207                    return getService()
208                                       .getVocabularyCategoriesCount(groupId, parentCategory,
209                            vocabularyId);
210            }
211    
212            public static int getVocabularyCategoriesCount(long groupId,
213                    long vocabularyId) {
214                    return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
215            }
216    
217            public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
218                    long groupId, java.lang.String name, long vocabularyId, int start,
219                    int end,
220                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
221                    throws com.liferay.portal.kernel.exception.PortalException {
222                    return getService()
223                                       .getVocabularyCategoriesDisplay(groupId, name, vocabularyId,
224                            start, end, obc);
225            }
226    
227            public static com.liferay.portlet.asset.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
228                    long vocabularyId, int start, int end,
229                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
230                    throws com.liferay.portal.kernel.exception.PortalException {
231                    return getService()
232                                       .getVocabularyCategoriesDisplay(vocabularyId, start, end, obc);
233            }
234    
235            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
236                    long groupId, long vocabularyId, int start, int end,
237                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
238                    return getService()
239                                       .getVocabularyRootCategories(groupId, vocabularyId, start,
240                            end, obc);
241            }
242    
243            /**
244            * @deprecated As of 6.2.0, replaced by {@link
245            #getVocabularyRootCategories(long, long, int, int,
246            OrderByComparator)}
247            */
248            @Deprecated
249            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
250                    long vocabularyId, int start, int end,
251                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc)
252                    throws com.liferay.portal.kernel.exception.PortalException {
253                    return getService()
254                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
255            }
256    
257            public static int getVocabularyRootCategoriesCount(long groupId,
258                    long vocabularyId) {
259                    return getService()
260                                       .getVocabularyRootCategoriesCount(groupId, vocabularyId);
261            }
262    
263            public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
264                    long categoryId, long parentCategoryId, long vocabularyId,
265                    com.liferay.portal.service.ServiceContext serviceContext)
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    return getService()
268                                       .moveCategory(categoryId, parentCategoryId, vocabularyId,
269                            serviceContext);
270            }
271    
272            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
273                    long groupId, java.lang.String keywords, long vocabularyId, int start,
274                    int end,
275                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetCategory> obc) {
276                    return getService()
277                                       .search(groupId, keywords, vocabularyId, start, end, obc);
278            }
279    
280            public static com.liferay.portal.kernel.json.JSONArray search(
281                    long groupId, java.lang.String name,
282                    java.lang.String[] categoryProperties, int start, int end)
283                    throws com.liferay.portal.kernel.exception.PortalException {
284                    return getService().search(groupId, name, categoryProperties, start, end);
285            }
286    
287            public static com.liferay.portal.kernel.json.JSONArray search(
288                    long[] groupIds, java.lang.String name, long[] vocabularyIds,
289                    int start, int end)
290                    throws com.liferay.portal.kernel.exception.PortalException {
291                    return getService().search(groupIds, name, vocabularyIds, start, end);
292            }
293    
294            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
295                    long groupId, java.lang.String title, long parentCategoryId,
296                    long vocabularyId, int start, int end)
297                    throws com.liferay.portal.kernel.exception.PortalException {
298                    return getService()
299                                       .searchCategoriesDisplay(groupId, title, parentCategoryId,
300                            vocabularyId, start, end);
301            }
302    
303            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
304                    long groupId, java.lang.String title, long vocabularyId, int start,
305                    int end) throws com.liferay.portal.kernel.exception.PortalException {
306                    return getService()
307                                       .searchCategoriesDisplay(groupId, title, vocabularyId,
308                            start, end);
309            }
310    
311            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
312                    long[] groupIds, java.lang.String title, long[] parentCategoryIds,
313                    long[] vocabularyIds, int start, int end)
314                    throws com.liferay.portal.kernel.exception.PortalException {
315                    return getService()
316                                       .searchCategoriesDisplay(groupIds, title, parentCategoryIds,
317                            vocabularyIds, start, end);
318            }
319    
320            public static com.liferay.portlet.asset.model.AssetCategoryDisplay searchCategoriesDisplay(
321                    long[] groupIds, java.lang.String title, long[] vocabularyIds,
322                    int start, int end)
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    return getService()
325                                       .searchCategoriesDisplay(groupIds, title, vocabularyIds,
326                            start, end);
327            }
328    
329            /**
330            * Sets the Spring bean ID for this bean.
331            *
332            * @param beanIdentifier the Spring bean ID for this bean
333            */
334            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
335                    getService().setBeanIdentifier(beanIdentifier);
336            }
337    
338            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
339                    long categoryId, long parentCategoryId,
340                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
341                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
342                    long vocabularyId, java.lang.String[] categoryProperties,
343                    com.liferay.portal.service.ServiceContext serviceContext)
344                    throws com.liferay.portal.kernel.exception.PortalException {
345                    return getService()
346                                       .updateCategory(categoryId, parentCategoryId, titleMap,
347                            descriptionMap, vocabularyId, categoryProperties, serviceContext);
348            }
349    
350            public static AssetCategoryService getService() {
351                    if (_service == null) {
352                            _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
353    
354                            ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
355                                    "_service");
356                    }
357    
358                    return _service;
359            }
360    
361            /**
362             * @deprecated As of 6.2.0
363             */
364            @Deprecated
365            public void setService(AssetCategoryService service) {
366            }
367    
368            private static AssetCategoryService _service;
369    }