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 com.liferay.portlet.asset.model.AssetCategory getAssetCategory(
76          long categoryId)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.SystemException {
79          return getService().getAssetCategory(categoryId);
80      }
81  
82      public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getAssetCategories(
83          int start, int end)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getService().getAssetCategories(start, end);
86      }
87  
88      public static int getAssetCategoriesCount()
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().getAssetCategoriesCount();
91      }
92  
93      public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
94          com.liferay.portlet.asset.model.AssetCategory assetCategory)
95          throws com.liferay.portal.kernel.exception.SystemException {
96          return getService().updateAssetCategory(assetCategory);
97      }
98  
99      public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
100         com.liferay.portlet.asset.model.AssetCategory assetCategory,
101         boolean merge)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getService().updateAssetCategory(assetCategory, merge);
104     }
105 
106     public static com.liferay.portlet.asset.model.AssetCategory addCategory(
107         java.lang.String uuid, long userId, long parentCategoryId,
108         java.util.Map<java.util.Locale, String> titleMap, long vocabularyId,
109         java.lang.String[] categoryProperties,
110         com.liferay.portal.service.ServiceContext serviceContext)
111         throws com.liferay.portal.kernel.exception.PortalException,
112             com.liferay.portal.kernel.exception.SystemException {
113         return getService()
114                    .addCategory(uuid, userId, parentCategoryId, titleMap,
115             vocabularyId, categoryProperties, serviceContext);
116     }
117 
118     public static void addCategoryResources(
119         com.liferay.portlet.asset.model.AssetCategory category,
120         boolean addCommunityPermissions, boolean addGuestPermissions)
121         throws com.liferay.portal.kernel.exception.PortalException,
122             com.liferay.portal.kernel.exception.SystemException {
123         getService()
124             .addCategoryResources(category, addCommunityPermissions,
125             addGuestPermissions);
126     }
127 
128     public static void addCategoryResources(
129         com.liferay.portlet.asset.model.AssetCategory category,
130         java.lang.String[] communityPermissions,
131         java.lang.String[] guestPermissions)
132         throws com.liferay.portal.kernel.exception.PortalException,
133             com.liferay.portal.kernel.exception.SystemException {
134         getService()
135             .addCategoryResources(category, communityPermissions,
136             guestPermissions);
137     }
138 
139     public static void deleteCategory(
140         com.liferay.portlet.asset.model.AssetCategory category)
141         throws com.liferay.portal.kernel.exception.PortalException,
142             com.liferay.portal.kernel.exception.SystemException {
143         getService().deleteCategory(category);
144     }
145 
146     public static void deleteCategory(long categoryId)
147         throws com.liferay.portal.kernel.exception.PortalException,
148             com.liferay.portal.kernel.exception.SystemException {
149         getService().deleteCategory(categoryId);
150     }
151 
152     public static void deleteVocabularyCategories(long vocabularyId)
153         throws com.liferay.portal.kernel.exception.PortalException,
154             com.liferay.portal.kernel.exception.SystemException {
155         getService().deleteVocabularyCategories(vocabularyId);
156     }
157 
158     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories()
159         throws com.liferay.portal.kernel.exception.SystemException {
160         return getService().getCategories();
161     }
162 
163     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
164         long classNameId, long classPK)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         return getService().getCategories(classNameId, classPK);
167     }
168 
169     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
170         java.lang.String className, long classPK)
171         throws com.liferay.portal.kernel.exception.SystemException {
172         return getService().getCategories(className, classPK);
173     }
174 
175     public static com.liferay.portlet.asset.model.AssetCategory getCategory(
176         long categoryId)
177         throws com.liferay.portal.kernel.exception.PortalException,
178             com.liferay.portal.kernel.exception.SystemException {
179         return getService().getCategory(categoryId);
180     }
181 
182     public static long[] getCategoryIds(java.lang.String className, long classPK)
183         throws com.liferay.portal.kernel.exception.SystemException {
184         return getService().getCategoryIds(className, classPK);
185     }
186 
187     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
188         long parentCategoryId)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getService().getChildCategories(parentCategoryId);
191     }
192 
193     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getEntryCategories(
194         long entryId)
195         throws com.liferay.portal.kernel.exception.SystemException {
196         return getService().getEntryCategories(entryId);
197     }
198 
199     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
200         long vocabularyId)
201         throws com.liferay.portal.kernel.exception.SystemException {
202         return getService().getVocabularyCategories(vocabularyId);
203     }
204 
205     public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
206         long vocabularyId)
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getService().getVocabularyRootCategories(vocabularyId);
209     }
210 
211     public static void mergeCategories(long fromCategoryId, long toCategoryId)
212         throws com.liferay.portal.kernel.exception.PortalException,
213             com.liferay.portal.kernel.exception.SystemException {
214         getService().mergeCategories(fromCategoryId, toCategoryId);
215     }
216 
217     public static com.liferay.portal.kernel.json.JSONArray search(
218         long groupId, java.lang.String name,
219         java.lang.String[] categoryProperties, int start, int end)
220         throws com.liferay.portal.kernel.exception.SystemException {
221         return getService().search(groupId, name, categoryProperties, start, end);
222     }
223 
224     public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
225         long userId, long categoryId, long parentCategoryId,
226         java.util.Map<java.util.Locale, String> titleMap, long vocabularyId,
227         java.lang.String[] categoryProperties,
228         com.liferay.portal.service.ServiceContext serviceContext)
229         throws com.liferay.portal.kernel.exception.PortalException,
230             com.liferay.portal.kernel.exception.SystemException {
231         return getService()
232                    .updateCategory(userId, categoryId, parentCategoryId,
233             titleMap, vocabularyId, categoryProperties, serviceContext);
234     }
235 
236     public static AssetCategoryLocalService getService() {
237         if (_service == null) {
238             _service = (AssetCategoryLocalService)PortalBeanLocatorUtil.locate(AssetCategoryLocalService.class.getName());
239         }
240 
241         return _service;
242     }
243 
244     public void setService(AssetCategoryLocalService service) {
245         _service = service;
246     }
247 
248     private static AssetCategoryLocalService _service;
249 }