001    /**
002     * Copyright (c) 2000-2013 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the asset category remote service. This utility wraps {@link com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
022     *
023     * <p>
024     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see AssetCategoryService
029     * @see com.liferay.portlet.asset.service.base.AssetCategoryServiceBaseImpl
030     * @see com.liferay.portlet.asset.service.impl.AssetCategoryServiceImpl
031     * @generated
032     */
033    public class AssetCategoryServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * 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.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
059                    long parentCategoryId,
060                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
061                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062                    long vocabularyId, java.lang.String[] categoryProperties,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService()
067                                       .addCategory(parentCategoryId, titleMap, descriptionMap,
068                            vocabularyId, categoryProperties, serviceContext);
069            }
070    
071            /**
072            * @deprecated As of 6.2.0, Replaced by {@link #deleteCategories(long[],
073            ServiceContext)}
074            */
075            public static void deleteCategories(long[] categoryIds)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    getService().deleteCategories(categoryIds);
079            }
080    
081            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> deleteCategories(
082                    long[] categoryIds,
083                    com.liferay.portal.service.ServiceContext serviceContext)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    return getService().deleteCategories(categoryIds, serviceContext);
087            }
088    
089            public static void deleteCategory(long categoryId)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    getService().deleteCategory(categoryId);
093            }
094    
095            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
096                    java.lang.String className, long classPK)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    return getService().getCategories(className, classPK);
100            }
101    
102            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
103                    long categoryId)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException {
106                    return getService().getCategory(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                            com.liferay.portal.kernel.exception.SystemException {
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 obc)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getService().getChildCategories(parentCategoryId, start, end, obc);
122            }
123    
124            /**
125            * @deprecated
126            */
127            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
128                    long groupId, java.lang.String keywords, long vocabularyId, int start,
129                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    return getService()
133                                       .getJSONSearch(groupId, keywords, vocabularyId, start, end,
134                            obc);
135            }
136    
137            /**
138            * @deprecated {@link #search(long[], String, long[], int, int)}
139            */
140            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
141                    long groupId, java.lang.String name, long[] vocabularyIds, int start,
142                    int end)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    return getService()
146                                       .getJSONSearch(groupId, name, vocabularyIds, start, end);
147            }
148    
149            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
150                    long vocabularyId, int start, int end,
151                    com.liferay.portal.kernel.util.OrderByComparator obc)
152                    throws com.liferay.portal.kernel.exception.PortalException,
153                            com.liferay.portal.kernel.exception.SystemException {
154                    return getService()
155                                       .getJSONVocabularyCategories(vocabularyId, start, end, obc);
156            }
157    
158            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
159                    long groupId, java.lang.String name, long vocabularyId, int start,
160                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return getService()
164                                       .getJSONVocabularyCategories(groupId, name, vocabularyId,
165                            start, end, obc);
166            }
167    
168            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
169                    long vocabularyId, int start, int end,
170                    com.liferay.portal.kernel.util.OrderByComparator obc)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getService()
174                                       .getVocabularyCategories(vocabularyId, start, end, obc);
175            }
176    
177            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
178                    long parentCategoryId, long vocabularyId, int start, int end,
179                    com.liferay.portal.kernel.util.OrderByComparator obc)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getService()
183                                       .getVocabularyCategories(parentCategoryId, vocabularyId,
184                            start, end, obc);
185            }
186    
187            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
188                    long groupId, java.lang.String name, long vocabularyId, int start,
189                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getService()
192                                       .getVocabularyCategories(groupId, name, vocabularyId, start,
193                            end, obc);
194            }
195    
196            public static int getVocabularyCategoriesCount(long groupId,
197                    long vocabularyId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
200            }
201    
202            public static int getVocabularyCategoriesCount(long groupId,
203                    java.lang.String name, long vocabularyId)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getService()
206                                       .getVocabularyCategoriesCount(groupId, name, vocabularyId);
207            }
208    
209            /**
210            * @deprecated replaced by {@link #getVocabularyRootCategories(long, long,
211            int, int, OrderByComparator)}
212            */
213            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
214                    long vocabularyId, int start, int end,
215                    com.liferay.portal.kernel.util.OrderByComparator obc)
216                    throws com.liferay.portal.kernel.exception.PortalException,
217                            com.liferay.portal.kernel.exception.SystemException {
218                    return getService()
219                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
220            }
221    
222            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
223                    long groupId, long vocabularyId, int start, int end,
224                    com.liferay.portal.kernel.util.OrderByComparator obc)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getService()
227                                       .getVocabularyRootCategories(groupId, vocabularyId, start,
228                            end, obc);
229            }
230    
231            public static int getVocabularyRootCategoriesCount(long groupId,
232                    long vocabularyId)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getService()
235                                       .getVocabularyRootCategoriesCount(groupId, vocabularyId);
236            }
237    
238            public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
239                    long categoryId, long parentCategoryId, long vocabularyId,
240                    com.liferay.portal.service.ServiceContext serviceContext)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException {
243                    return getService()
244                                       .moveCategory(categoryId, parentCategoryId, vocabularyId,
245                            serviceContext);
246            }
247    
248            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
249                    long groupId, java.lang.String keywords, long vocabularyId, int start,
250                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getService()
253                                       .search(groupId, keywords, vocabularyId, start, end, obc);
254            }
255    
256            public static com.liferay.portal.kernel.json.JSONArray search(
257                    long groupId, java.lang.String name,
258                    java.lang.String[] categoryProperties, int start, int end)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getService().search(groupId, name, categoryProperties, start, end);
262            }
263    
264            public static com.liferay.portal.kernel.json.JSONArray search(
265                    long[] groupIds, java.lang.String name, long[] vocabularyIds,
266                    int start, int end)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    return getService().search(groupIds, name, vocabularyIds, start, end);
270            }
271    
272            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
273                    long categoryId, long parentCategoryId,
274                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
275                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
276                    long vocabularyId, java.lang.String[] categoryProperties,
277                    com.liferay.portal.service.ServiceContext serviceContext)
278                    throws com.liferay.portal.kernel.exception.PortalException,
279                            com.liferay.portal.kernel.exception.SystemException {
280                    return getService()
281                                       .updateCategory(categoryId, parentCategoryId, titleMap,
282                            descriptionMap, vocabularyId, categoryProperties, serviceContext);
283            }
284    
285            public static AssetCategoryService getService() {
286                    if (_service == null) {
287                            _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
288    
289                            ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
290                                    "_service");
291                    }
292    
293                    return _service;
294            }
295    
296            /**
297             * @deprecated
298             */
299            public void setService(AssetCategoryService service) {
300            }
301    
302            private static AssetCategoryService _service;
303    }