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