001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            /**
113            * @deprecated
114            */
115            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
116                    long groupId, java.lang.String keywords, long vocabularyId, int start,
117                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException {
120                    return getService()
121                                       .getJSONSearch(groupId, keywords, vocabularyId, start, end,
122                            obc);
123            }
124    
125            public static com.liferay.portal.kernel.json.JSONArray getJSONSearch(
126                    long groupId, java.lang.String name, long[] vocabularyIds, int start,
127                    int end)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException {
130                    return getService()
131                                       .getJSONSearch(groupId, name, vocabularyIds, start, end);
132            }
133    
134            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
135                    long vocabularyId, int start, int end,
136                    com.liferay.portal.kernel.util.OrderByComparator obc)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getService()
140                                       .getJSONVocabularyCategories(vocabularyId, start, end, obc);
141            }
142    
143            public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
144                    long groupId, java.lang.String name, long vocabularyId, int start,
145                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
146                    throws com.liferay.portal.kernel.exception.PortalException,
147                            com.liferay.portal.kernel.exception.SystemException {
148                    return getService()
149                                       .getJSONVocabularyCategories(groupId, name, vocabularyId,
150                            start, end, obc);
151            }
152    
153            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
154                    long vocabularyId, int start, int end,
155                    com.liferay.portal.kernel.util.OrderByComparator obc)
156                    throws com.liferay.portal.kernel.exception.PortalException,
157                            com.liferay.portal.kernel.exception.SystemException {
158                    return getService()
159                                       .getVocabularyCategories(vocabularyId, start, end, obc);
160            }
161    
162            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
163                    long parentCategoryId, long vocabularyId, int start, int end,
164                    com.liferay.portal.kernel.util.OrderByComparator obc)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    return getService()
168                                       .getVocabularyCategories(parentCategoryId, vocabularyId,
169                            start, end, obc);
170            }
171    
172            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
173                    long groupId, java.lang.String name, long vocabularyId, int start,
174                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
175                    throws com.liferay.portal.kernel.exception.SystemException {
176                    return getService()
177                                       .getVocabularyCategories(groupId, name, vocabularyId, start,
178                            end, obc);
179            }
180    
181            public static int getVocabularyCategoriesCount(long groupId,
182                    long vocabularyId)
183                    throws com.liferay.portal.kernel.exception.SystemException {
184                    return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
185            }
186    
187            public static int getVocabularyCategoriesCount(long groupId,
188                    java.lang.String name, long vocabularyId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getService()
191                                       .getVocabularyCategoriesCount(groupId, name, vocabularyId);
192            }
193    
194            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
195                    long vocabularyId, int start, int end,
196                    com.liferay.portal.kernel.util.OrderByComparator obc)
197                    throws com.liferay.portal.kernel.exception.PortalException,
198                            com.liferay.portal.kernel.exception.SystemException {
199                    return getService()
200                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
201            }
202    
203            public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
204                    long categoryId, long parentCategoryId, long vocabularyId,
205                    com.liferay.portal.service.ServiceContext serviceContext)
206                    throws com.liferay.portal.kernel.exception.PortalException,
207                            com.liferay.portal.kernel.exception.SystemException {
208                    return getService()
209                                       .moveCategory(categoryId, parentCategoryId, vocabularyId,
210                            serviceContext);
211            }
212    
213            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
214                    long groupId, java.lang.String keywords, long vocabularyId, int start,
215                    int end, 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                                       .search(groupId, keywords, vocabularyId, start, end, obc);
220            }
221    
222            public static com.liferay.portal.kernel.json.JSONArray search(
223                    long groupId, java.lang.String name,
224                    java.lang.String[] categoryProperties, int start, int end)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    return getService().search(groupId, name, categoryProperties, start, end);
228            }
229    
230            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
231                    long categoryId, long parentCategoryId,
232                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
233                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
234                    long vocabularyId, java.lang.String[] categoryProperties,
235                    com.liferay.portal.service.ServiceContext serviceContext)
236                    throws com.liferay.portal.kernel.exception.PortalException,
237                            com.liferay.portal.kernel.exception.SystemException {
238                    return getService()
239                                       .updateCategory(categoryId, parentCategoryId, titleMap,
240                            descriptionMap, vocabularyId, categoryProperties, serviceContext);
241            }
242    
243            public static AssetCategoryService getService() {
244                    if (_service == null) {
245                            _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
246    
247                            ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
248                                    "_service");
249                    }
250    
251                    return _service;
252            }
253    
254            /**
255             * @deprecated
256             */
257            public void setService(AssetCategoryService service) {
258            }
259    
260            private static AssetCategoryService _service;
261    }