001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link AssetCategoryLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       AssetCategoryLocalService
030     * @generated
031     */
032    public class AssetCategoryLocalServiceUtil {
033            public static com.liferay.portlet.asset.model.AssetCategory addAssetCategory(
034                    com.liferay.portlet.asset.model.AssetCategory assetCategory)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addAssetCategory(assetCategory);
037            }
038    
039            public static com.liferay.portlet.asset.model.AssetCategory createAssetCategory(
040                    long categoryId) {
041                    return getService().createAssetCategory(categoryId);
042            }
043    
044            public static void deleteAssetCategory(long categoryId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteAssetCategory(categoryId);
048            }
049    
050            public static void deleteAssetCategory(
051                    com.liferay.portlet.asset.model.AssetCategory assetCategory)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteAssetCategory(assetCategory);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.asset.model.AssetCategory getAssetCategory(
087                    long categoryId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getAssetCategory(categoryId);
091            }
092    
093            public static com.liferay.portlet.asset.model.AssetCategory getAssetCategoryByUuidAndGroupId(
094                    java.lang.String uuid, long groupId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getAssetCategoryByUuidAndGroupId(uuid, groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getAssetCategories(
101                    int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getAssetCategories(start, end);
104            }
105    
106            public static int getAssetCategoriesCount()
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getAssetCategoriesCount();
109            }
110    
111            public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
112                    com.liferay.portlet.asset.model.AssetCategory assetCategory)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateAssetCategory(assetCategory);
115            }
116    
117            public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
118                    com.liferay.portlet.asset.model.AssetCategory assetCategory,
119                    boolean merge)
120                    throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().updateAssetCategory(assetCategory, merge);
122            }
123    
124            public static com.liferay.portlet.asset.model.AssetCategory addCategory(
125                    long userId, long parentCategoryId,
126                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
127                    long vocabularyId, java.lang.String[] categoryProperties,
128                    com.liferay.portal.service.ServiceContext serviceContext)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    return getService()
132                                       .addCategory(userId, parentCategoryId, titleMap,
133                            vocabularyId, categoryProperties, serviceContext);
134            }
135    
136            public static void addCategoryResources(
137                    com.liferay.portlet.asset.model.AssetCategory category,
138                    boolean addCommunityPermissions, boolean addGuestPermissions)
139                    throws com.liferay.portal.kernel.exception.PortalException,
140                            com.liferay.portal.kernel.exception.SystemException {
141                    getService()
142                            .addCategoryResources(category, addCommunityPermissions,
143                            addGuestPermissions);
144            }
145    
146            public static void addCategoryResources(
147                    com.liferay.portlet.asset.model.AssetCategory category,
148                    java.lang.String[] communityPermissions,
149                    java.lang.String[] guestPermissions)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    getService()
153                            .addCategoryResources(category, communityPermissions,
154                            guestPermissions);
155            }
156    
157            public static void deleteCategory(
158                    com.liferay.portlet.asset.model.AssetCategory category)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    getService().deleteCategory(category);
162            }
163    
164            public static void deleteCategory(long categoryId)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    getService().deleteCategory(categoryId);
168            }
169    
170            public static void deleteVocabularyCategories(long vocabularyId)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    getService().deleteVocabularyCategories(vocabularyId);
174            }
175    
176            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories()
177                    throws com.liferay.portal.kernel.exception.SystemException {
178                    return getService().getCategories();
179            }
180    
181            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
182                    long classNameId, long classPK)
183                    throws com.liferay.portal.kernel.exception.SystemException {
184                    return getService().getCategories(classNameId, classPK);
185            }
186    
187            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
188                    java.lang.String className, long classPK)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getService().getCategories(className, classPK);
191            }
192    
193            public static com.liferay.portlet.asset.model.AssetCategory getCategory(
194                    long categoryId)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    return getService().getCategory(categoryId);
198            }
199    
200            public static long[] getCategoryIds(java.lang.String className, long classPK)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getService().getCategoryIds(className, classPK);
203            }
204    
205            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
206                    long parentCategoryId, int start, int end,
207                    com.liferay.portal.kernel.util.OrderByComparator obc)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getService().getChildCategories(parentCategoryId, start, end, obc);
210            }
211    
212            public static int getChildCategoriesCount(long parentCategoryId)
213                    throws com.liferay.portal.kernel.exception.SystemException {
214                    return getService().getChildCategoriesCount(parentCategoryId);
215            }
216    
217            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getEntryCategories(
218                    long entryId)
219                    throws com.liferay.portal.kernel.exception.SystemException {
220                    return getService().getEntryCategories(entryId);
221            }
222    
223            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
224                    long vocabularyId, int start, int end,
225                    com.liferay.portal.kernel.util.OrderByComparator obc)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getService()
228                                       .getVocabularyCategories(vocabularyId, start, end, obc);
229            }
230    
231            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
232                    long parentCategoryId, long vocabularyId, int start, int end,
233                    com.liferay.portal.kernel.util.OrderByComparator obc)
234                    throws com.liferay.portal.kernel.exception.SystemException {
235                    return getService()
236                                       .getVocabularyCategories(parentCategoryId, vocabularyId,
237                            start, end, obc);
238            }
239    
240            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
241                    long vocabularyId, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator obc)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getService()
245                                       .getVocabularyRootCategories(vocabularyId, start, end, obc);
246            }
247    
248            public static void mergeCategories(long fromCategoryId, long toCategoryId)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    getService().mergeCategories(fromCategoryId, toCategoryId);
252            }
253    
254            public static com.liferay.portal.kernel.json.JSONArray search(
255                    long groupId, java.lang.String name,
256                    java.lang.String[] categoryProperties, int start, int end)
257                    throws com.liferay.portal.kernel.exception.SystemException {
258                    return getService().search(groupId, name, categoryProperties, start, end);
259            }
260    
261            public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
262                    long userId, long categoryId, long parentCategoryId,
263                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
264                    long vocabularyId, java.lang.String[] categoryProperties,
265                    com.liferay.portal.service.ServiceContext serviceContext)
266                    throws com.liferay.portal.kernel.exception.PortalException,
267                            com.liferay.portal.kernel.exception.SystemException {
268                    return getService()
269                                       .updateCategory(userId, categoryId, parentCategoryId,
270                            titleMap, vocabularyId, categoryProperties, serviceContext);
271            }
272    
273            public static AssetCategoryLocalService getService() {
274                    if (_service == null) {
275                            _service = (AssetCategoryLocalService)PortalBeanLocatorUtil.locate(AssetCategoryLocalService.class.getName());
276                    }
277    
278                    return _service;
279            }
280    
281            public void setService(AssetCategoryLocalService service) {
282                    _service = service;
283            }
284    
285            private static AssetCategoryLocalService _service;
286    }