1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.asset.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="AssetCategoryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link AssetCategoryLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       AssetCategoryLocalService
37   * @generated
38   */
39  public class AssetCategoryLocalServiceUtil {
40      public static com.liferay.portlet.asset.model.AssetCategory addAssetCategory(
41          com.liferay.portlet.asset.model.AssetCategory assetCategory)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addAssetCategory(assetCategory);
44      }
45  
46      public static com.liferay.portlet.asset.model.AssetCategory createAssetCategory(
47          long categoryId) {
48          return getService().createAssetCategory(categoryId);
49      }
50  
51      public static void deleteAssetCategory(long categoryId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteAssetCategory(categoryId);
55      }
56  
57      public static void deleteAssetCategory(
58          com.liferay.portlet.asset.model.AssetCategory assetCategory)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteAssetCategory(assetCategory);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.asset.model.AssetCategory getAssetCategory(
91          long categoryId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getAssetCategory(categoryId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getAssetCategories(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getAssetCategories(start, end);
101     }
102 
103     public static int getAssetCategoriesCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getAssetCategoriesCount();
106     }
107 
108     public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
109         com.liferay.portlet.asset.model.AssetCategory assetCategory)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateAssetCategory(assetCategory);
112     }
113 
114     public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
115         com.liferay.portlet.asset.model.AssetCategory assetCategory,
116         boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getService().updateAssetCategory(assetCategory, merge);
119     }
120 
121     public static com.liferay.portlet.asset.model.AssetCategory addCategory(
122         java.lang.String uuid, long userId, long parentCategoryId,
123         java.util.Map<java.util.Locale, String> titleMap, long vocabularyId,
124         java.lang.String[] categoryProperties,
125         com.liferay.portal.service.ServiceContext serviceContext)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException {
128         return getService()
129                    .addCategory(uuid, userId, parentCategoryId, titleMap,
130             vocabularyId, categoryProperties, serviceContext);
131     }
132 
133     public static void addCategoryResources(
134         com.liferay.portlet.asset.model.AssetCategory category,
135         boolean addCommunityPermissions, boolean addGuestPermissions)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException {
138         getService()
139             .addCategoryResources(category, addCommunityPermissions,
140             addGuestPermissions);
141     }
142 
143     public static void addCategoryResources(
144         com.liferay.portlet.asset.model.AssetCategory category,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions)
147         throws com.liferay.portal.kernel.exception.PortalException,
148             com.liferay.portal.kernel.exception.SystemException {
149         getService()
150             .addCategoryResources(category, communityPermissions,
151             guestPermissions);
152     }
153 
154     public static void deleteCategory(
155         com.liferay.portlet.asset.model.AssetCategory category)
156         throws com.liferay.portal.kernel.exception.PortalException,
157             com.liferay.portal.kernel.exception.SystemException {
158         getService().deleteCategory(category);
159     }
160 
161     public static void deleteCategory(long categoryId)
162         throws com.liferay.portal.kernel.exception.PortalException,
163             com.liferay.portal.kernel.exception.SystemException {
164         getService().deleteCategory(categoryId);
165     }
166 
167     public static void deleteVocabularyCategories(long vocabularyId)
168         throws com.liferay.portal.kernel.exception.PortalException,
169             com.liferay.portal.kernel.exception.SystemException {
170         getService().deleteVocabularyCategories(vocabularyId);
171     }
172 
173     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories()
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getService().getCategories();
176     }
177 
178     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
179         long classNameId, long classPK)
180         throws com.liferay.portal.kernel.exception.SystemException {
181         return getService().getCategories(classNameId, classPK);
182     }
183 
184     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
185         java.lang.String className, long classPK)
186         throws com.liferay.portal.kernel.exception.SystemException {
187         return getService().getCategories(className, classPK);
188     }
189 
190     public static com.liferay.portlet.asset.model.AssetCategory getCategory(
191         long categoryId)
192         throws com.liferay.portal.kernel.exception.PortalException,
193             com.liferay.portal.kernel.exception.SystemException {
194         return getService().getCategory(categoryId);
195     }
196 
197     public static long[] getCategoryIds(java.lang.String className, long classPK)
198         throws com.liferay.portal.kernel.exception.SystemException {
199         return getService().getCategoryIds(className, classPK);
200     }
201 
202     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
203         long parentCategoryId)
204         throws com.liferay.portal.kernel.exception.SystemException {
205         return getService().getChildCategories(parentCategoryId);
206     }
207 
208     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getEntryCategories(
209         long entryId)
210         throws com.liferay.portal.kernel.exception.SystemException {
211         return getService().getEntryCategories(entryId);
212     }
213 
214     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
215         long vocabularyId)
216         throws com.liferay.portal.kernel.exception.SystemException {
217         return getService().getVocabularyCategories(vocabularyId);
218     }
219 
220     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
221         long vocabularyId)
222         throws com.liferay.portal.kernel.exception.SystemException {
223         return getService().getVocabularyRootCategories(vocabularyId);
224     }
225 
226     public static void mergeCategories(long fromCategoryId, long toCategoryId)
227         throws com.liferay.portal.kernel.exception.PortalException,
228             com.liferay.portal.kernel.exception.SystemException {
229         getService().mergeCategories(fromCategoryId, toCategoryId);
230     }
231 
232     public static com.liferay.portal.kernel.json.JSONArray search(
233         long groupId, java.lang.String name,
234         java.lang.String[] categoryProperties, int start, int end)
235         throws com.liferay.portal.kernel.exception.SystemException {
236         return getService().search(groupId, name, categoryProperties, start, end);
237     }
238 
239     public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
240         long userId, long categoryId, long parentCategoryId,
241         java.util.Map<java.util.Locale, String> titleMap, long vocabularyId,
242         java.lang.String[] categoryProperties,
243         com.liferay.portal.service.ServiceContext serviceContext)
244         throws com.liferay.portal.kernel.exception.PortalException,
245             com.liferay.portal.kernel.exception.SystemException {
246         return getService()
247                    .updateCategory(userId, categoryId, parentCategoryId,
248             titleMap, vocabularyId, categoryProperties, serviceContext);
249     }
250 
251     public static AssetCategoryLocalService getService() {
252         if (_service == null) {
253             _service = (AssetCategoryLocalService)PortalBeanLocatorUtil.locate(AssetCategoryLocalService.class.getName());
254         }
255 
256         return _service;
257     }
258 
259     public void setService(AssetCategoryLocalService service) {
260         _service = service;
261     }
262 
263     private static AssetCategoryLocalService _service;
264 }