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;
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            public static void deleteCategories(long[] categoryIds)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    getService().deleteCategories(categoryIds);
075            }
076    
077            public static void deleteCategory(long categoryId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    getService().deleteCategory(categoryId);
081            }
082    
083            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
084                    java.lang.String className, long classPK)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService().getCategories(className, classPK);
088            }
089    
090            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
091                    long categoryId)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    return getService().getCategory(categoryId);
095            }
096    
097            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
098                    long parentCategoryId)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getChildCategories(parentCategoryId);
102            }
103    
104            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
105                    long parentCategoryId, int start, int end,
106                    com.liferay.portal.kernel.util.OrderByComparator obc)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    return getService().getChildCategories(parentCategoryId, start, end, obc);
110            }
111    
112            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
113                    long groupId, java.lang.String name, long[] vocabularyIds, int start,
114                    int end)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException {
117                    return getService()
118                                       .getJSONSearch(groupId, name, vocabularyIds, start, end);
119            }
120    
121            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
122                    long vocabularyId, int start, int end,
123                    com.liferay.portal.kernel.util.OrderByComparator obc)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    return getService()
127                                       .getJSONVocabularyCategories(vocabularyId, start, end, obc);
128            }
129    
130            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
131                    long groupId, java.lang.String name, long vocabularyId, int start,
132                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
133                    throws com.liferay.portal.kernel.exception.PortalException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    return getService()
136                                       .getJSONVocabularyCategories(groupId, name, vocabularyId,
137                            start, end, obc);
138            }
139    
140            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
141                    long vocabularyId, int start, int end,
142                    com.liferay.portal.kernel.util.OrderByComparator obc)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    return getService()
146                                       .getVocabularyCategories(vocabularyId, start, end, obc);
147            }
148    
149            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
150                    long parentCategoryId, 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                                       .getVocabularyCategories(parentCategoryId, vocabularyId,
156                            start, end, obc);
157            }
158    
159            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
160                    long groupId, java.lang.String name, long vocabularyId, int start,
161                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getService()
164                                       .getVocabularyCategories(groupId, name, vocabularyId, start,
165                            end, obc);
166            }
167    
168            public static int getVocabularyCategoriesCount(long groupId,
169                    long vocabularyId)
170                    throws com.liferay.portal.kernel.exception.SystemException {
171                    return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
172            }
173    
174            public static int getVocabularyCategoriesCount(long groupId,
175                    java.lang.String name, long vocabularyId)
176                    throws com.liferay.portal.kernel.exception.SystemException {
177                    return getService()
178                                       .getVocabularyCategoriesCount(groupId, name, vocabularyId);
179            }
180    
181            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
182                    long vocabularyId, int start, int end,
183                    com.liferay.portal.kernel.util.OrderByComparator obc)
184                    throws com.liferay.portal.kernel.exception.PortalException,
185                            com.liferay.portal.kernel.exception.SystemException {
186                    return getService()
187                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
188            }
189    
190            public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
191                    long categoryId, long parentCategoryId, long vocabularyId,
192                    com.liferay.portal.service.ServiceContext serviceContext)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException {
195                    return getService()
196                                       .moveCategory(categoryId, parentCategoryId, vocabularyId,
197                            serviceContext);
198            }
199    
200            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
201                    long groupId, java.lang.String keywords, long vocabularyId, int start,
202                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
203                    throws com.liferay.portal.kernel.exception.PortalException,
204                            com.liferay.portal.kernel.exception.SystemException {
205                    return getService()
206                                       .search(groupId, keywords, vocabularyId, start, end, obc);
207            }
208    
209            public static com.liferay.portal.kernel.json.JSONArray search(
210                    long groupId, java.lang.String name,
211                    java.lang.String[] categoryProperties, int start, int end)
212                    throws com.liferay.portal.kernel.exception.PortalException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    return getService().search(groupId, name, categoryProperties, start, end);
215            }
216    
217            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
218                    long categoryId, long parentCategoryId,
219                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
220                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
221                    long vocabularyId, java.lang.String[] categoryProperties,
222                    com.liferay.portal.service.ServiceContext serviceContext)
223                    throws com.liferay.portal.kernel.exception.PortalException,
224                            com.liferay.portal.kernel.exception.SystemException {
225                    return getService()
226                                       .updateCategory(categoryId, parentCategoryId, titleMap,
227                            descriptionMap, vocabularyId, categoryProperties, serviceContext);
228            }
229    
230            public static AssetCategoryService getService() {
231                    if (_service == null) {
232                            _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
233    
234                            ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
235                                    "_service");
236                    }
237    
238                    return _service;
239            }
240    
241            /**
242             * @deprecated
243             */
244            public void setService(AssetCategoryService service) {
245            }
246    
247            private static AssetCategoryService _service;
248    }