1
14
15 package com.liferay.portlet.asset.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
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 @SuppressWarnings("unchecked")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.kernel.exception.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("unchecked")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.kernel.exception.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("unchecked")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.kernel.exception.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static long dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portlet.asset.model.AssetCategory getAssetCategory(
94 long categoryId)
95 throws com.liferay.portal.kernel.exception.PortalException,
96 com.liferay.portal.kernel.exception.SystemException {
97 return getService().getAssetCategory(categoryId);
98 }
99
100 public static com.liferay.portlet.asset.model.AssetCategory getAssetCategoryByUuidAndGroupId(
101 java.lang.String uuid, long groupId)
102 throws com.liferay.portal.kernel.exception.PortalException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getService().getAssetCategoryByUuidAndGroupId(uuid, groupId);
105 }
106
107 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getAssetCategories(
108 int start, int end)
109 throws com.liferay.portal.kernel.exception.SystemException {
110 return getService().getAssetCategories(start, end);
111 }
112
113 public static int getAssetCategoriesCount()
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getService().getAssetCategoriesCount();
116 }
117
118 public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
119 com.liferay.portlet.asset.model.AssetCategory assetCategory)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().updateAssetCategory(assetCategory);
122 }
123
124 public static com.liferay.portlet.asset.model.AssetCategory updateAssetCategory(
125 com.liferay.portlet.asset.model.AssetCategory assetCategory,
126 boolean merge)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getService().updateAssetCategory(assetCategory, merge);
129 }
130
131 public static com.liferay.portlet.asset.model.AssetCategory addCategory(
132 java.lang.String uuid, long userId, long parentCategoryId,
133 java.util.Map<java.util.Locale, java.lang.String> titleMap,
134 long vocabularyId, java.lang.String[] categoryProperties,
135 com.liferay.portal.service.ServiceContext serviceContext)
136 throws com.liferay.portal.kernel.exception.PortalException,
137 com.liferay.portal.kernel.exception.SystemException {
138 return getService()
139 .addCategory(uuid, userId, parentCategoryId, titleMap,
140 vocabularyId, categoryProperties, serviceContext);
141 }
142
143 public static void addCategoryResources(
144 com.liferay.portlet.asset.model.AssetCategory category,
145 boolean addCommunityPermissions, boolean addGuestPermissions)
146 throws com.liferay.portal.kernel.exception.PortalException,
147 com.liferay.portal.kernel.exception.SystemException {
148 getService()
149 .addCategoryResources(category, addCommunityPermissions,
150 addGuestPermissions);
151 }
152
153 public static void addCategoryResources(
154 com.liferay.portlet.asset.model.AssetCategory category,
155 java.lang.String[] communityPermissions,
156 java.lang.String[] guestPermissions)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException {
159 getService()
160 .addCategoryResources(category, communityPermissions,
161 guestPermissions);
162 }
163
164 public static void deleteCategory(
165 com.liferay.portlet.asset.model.AssetCategory category)
166 throws com.liferay.portal.kernel.exception.PortalException,
167 com.liferay.portal.kernel.exception.SystemException {
168 getService().deleteCategory(category);
169 }
170
171 public static void deleteCategory(long categoryId)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException {
174 getService().deleteCategory(categoryId);
175 }
176
177 public static void deleteVocabularyCategories(long vocabularyId)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 getService().deleteVocabularyCategories(vocabularyId);
181 }
182
183 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories()
184 throws com.liferay.portal.kernel.exception.SystemException {
185 return getService().getCategories();
186 }
187
188 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
189 long classNameId, long classPK)
190 throws com.liferay.portal.kernel.exception.SystemException {
191 return getService().getCategories(classNameId, classPK);
192 }
193
194 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
195 java.lang.String className, long classPK)
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return getService().getCategories(className, classPK);
198 }
199
200 public static com.liferay.portlet.asset.model.AssetCategory getCategory(
201 long categoryId)
202 throws com.liferay.portal.kernel.exception.PortalException,
203 com.liferay.portal.kernel.exception.SystemException {
204 return getService().getCategory(categoryId);
205 }
206
207 public static long[] getCategoryIds(java.lang.String className, long classPK)
208 throws com.liferay.portal.kernel.exception.SystemException {
209 return getService().getCategoryIds(className, classPK);
210 }
211
212 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
213 long parentCategoryId, int start, int end,
214 com.liferay.portal.kernel.util.OrderByComparator obc)
215 throws com.liferay.portal.kernel.exception.SystemException {
216 return getService().getChildCategories(parentCategoryId, start, end, obc);
217 }
218
219 public static int getChildCategoriesCount(long parentCategoryId)
220 throws com.liferay.portal.kernel.exception.SystemException {
221 return getService().getChildCategoriesCount(parentCategoryId);
222 }
223
224 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getEntryCategories(
225 long entryId)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getService().getEntryCategories(entryId);
228 }
229
230 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
231 long vocabularyId, int start, int end,
232 com.liferay.portal.kernel.util.OrderByComparator obc)
233 throws com.liferay.portal.kernel.exception.SystemException {
234 return getService()
235 .getVocabularyCategories(vocabularyId, start, end, obc);
236 }
237
238 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
239 long parentCategoryId, long vocabularyId, int start, int end,
240 com.liferay.portal.kernel.util.OrderByComparator obc)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getService()
243 .getVocabularyCategories(parentCategoryId, vocabularyId,
244 start, end, obc);
245 }
246
247 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
248 long vocabularyId, int start, int end,
249 com.liferay.portal.kernel.util.OrderByComparator obc)
250 throws com.liferay.portal.kernel.exception.SystemException {
251 return getService()
252 .getVocabularyRootCategories(vocabularyId, start, end, obc);
253 }
254
255 public static void mergeCategories(long fromCategoryId, long toCategoryId)
256 throws com.liferay.portal.kernel.exception.PortalException,
257 com.liferay.portal.kernel.exception.SystemException {
258 getService().mergeCategories(fromCategoryId, toCategoryId);
259 }
260
261 public static com.liferay.portal.kernel.json.JSONArray search(
262 long groupId, java.lang.String name,
263 java.lang.String[] categoryProperties, int start, int end)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getService().search(groupId, name, categoryProperties, start, end);
266 }
267
268 public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
269 long userId, long categoryId, long parentCategoryId,
270 java.util.Map<java.util.Locale, java.lang.String> titleMap,
271 long vocabularyId, java.lang.String[] categoryProperties,
272 com.liferay.portal.service.ServiceContext serviceContext)
273 throws com.liferay.portal.kernel.exception.PortalException,
274 com.liferay.portal.kernel.exception.SystemException {
275 return getService()
276 .updateCategory(userId, categoryId, parentCategoryId,
277 titleMap, vocabularyId, categoryProperties, serviceContext);
278 }
279
280 public static AssetCategoryLocalService getService() {
281 if (_service == null) {
282 _service = (AssetCategoryLocalService)PortalBeanLocatorUtil.locate(AssetCategoryLocalService.class.getName());
283 }
284
285 return _service;
286 }
287
288 public void setService(AssetCategoryLocalService service) {
289 _service = service;
290 }
291
292 private static AssetCategoryLocalService _service;
293 }