001
014
015 package com.liferay.asset.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class AssetCategoryServiceUtil {
038
043 public static com.liferay.asset.kernel.model.AssetCategory addCategory(
044 long groupId, java.lang.String title, long vocabularyId,
045 com.liferay.portal.kernel.service.ServiceContext serviceContext)
046 throws com.liferay.portal.kernel.exception.PortalException {
047 return getService()
048 .addCategory(groupId, title, vocabularyId, serviceContext);
049 }
050
051 public static com.liferay.asset.kernel.model.AssetCategory addCategory(
052 long groupId, long parentCategoryId,
053 java.util.Map<java.util.Locale, java.lang.String> titleMap,
054 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
055 long vocabularyId, java.lang.String[] categoryProperties,
056 com.liferay.portal.kernel.service.ServiceContext serviceContext)
057 throws com.liferay.portal.kernel.exception.PortalException {
058 return getService()
059 .addCategory(groupId, parentCategoryId, titleMap,
060 descriptionMap, vocabularyId, categoryProperties, serviceContext);
061 }
062
063 public static com.liferay.asset.kernel.model.AssetCategory fetchCategory(
064 long categoryId)
065 throws com.liferay.portal.kernel.exception.PortalException {
066 return getService().fetchCategory(categoryId);
067 }
068
069 public static com.liferay.asset.kernel.model.AssetCategory getCategory(
070 long categoryId)
071 throws com.liferay.portal.kernel.exception.PortalException {
072 return getService().getCategory(categoryId);
073 }
074
075 public static com.liferay.asset.kernel.model.AssetCategory moveCategory(
076 long categoryId, long parentCategoryId, long vocabularyId,
077 com.liferay.portal.kernel.service.ServiceContext serviceContext)
078 throws com.liferay.portal.kernel.exception.PortalException {
079 return getService()
080 .moveCategory(categoryId, parentCategoryId, vocabularyId,
081 serviceContext);
082 }
083
084 public static com.liferay.asset.kernel.model.AssetCategory updateCategory(
085 long categoryId, long parentCategoryId,
086 java.util.Map<java.util.Locale, java.lang.String> titleMap,
087 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
088 long vocabularyId, java.lang.String[] categoryProperties,
089 com.liferay.portal.kernel.service.ServiceContext serviceContext)
090 throws com.liferay.portal.kernel.exception.PortalException {
091 return getService()
092 .updateCategory(categoryId, parentCategoryId, titleMap,
093 descriptionMap, vocabularyId, categoryProperties, serviceContext);
094 }
095
096 public static com.liferay.asset.kernel.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
097 long groupId, java.lang.String name, long vocabularyId, int start,
098 int end,
099 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
100 throws com.liferay.portal.kernel.exception.PortalException {
101 return getService()
102 .getVocabularyCategoriesDisplay(groupId, name, vocabularyId,
103 start, end, obc);
104 }
105
106 public static com.liferay.asset.kernel.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
107 long vocabularyId, int start, int end,
108 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
109 throws com.liferay.portal.kernel.exception.PortalException {
110 return getService()
111 .getVocabularyCategoriesDisplay(vocabularyId, start, end, obc);
112 }
113
114 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
115 long groupId, java.lang.String title, long parentCategoryId,
116 long vocabularyId, int start, int end)
117 throws com.liferay.portal.kernel.exception.PortalException {
118 return getService()
119 .searchCategoriesDisplay(groupId, title, parentCategoryId,
120 vocabularyId, start, end);
121 }
122
123 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
124 long groupId, java.lang.String title, long vocabularyId, int start,
125 int end) throws com.liferay.portal.kernel.exception.PortalException {
126 return getService()
127 .searchCategoriesDisplay(groupId, title, vocabularyId,
128 start, end);
129 }
130
131 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
132 long groupId, java.lang.String title, long vocabularyId,
133 long parentCategoryId, int start, int end,
134 com.liferay.portal.kernel.search.Sort sort)
135 throws com.liferay.portal.kernel.exception.PortalException {
136 return getService()
137 .searchCategoriesDisplay(groupId, title, vocabularyId,
138 parentCategoryId, start, end, sort);
139 }
140
141 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
142 long[] groupIds, java.lang.String title, long[] parentCategoryIds,
143 long[] vocabularyIds, int start, int end)
144 throws com.liferay.portal.kernel.exception.PortalException {
145 return getService()
146 .searchCategoriesDisplay(groupIds, title, parentCategoryIds,
147 vocabularyIds, start, end);
148 }
149
150 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
151 long[] groupIds, java.lang.String title, long[] vocabularyIds,
152 int start, int end)
153 throws com.liferay.portal.kernel.exception.PortalException {
154 return getService()
155 .searchCategoriesDisplay(groupIds, title, vocabularyIds,
156 start, end);
157 }
158
159 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
160 long[] groupIds, java.lang.String title, long[] vocabularyIds,
161 long[] parentCategoryIds, int start, int end,
162 com.liferay.portal.kernel.search.Sort sort)
163 throws com.liferay.portal.kernel.exception.PortalException {
164 return getService()
165 .searchCategoriesDisplay(groupIds, title, vocabularyIds,
166 parentCategoryIds, start, end, sort);
167 }
168
169 public static com.liferay.portal.kernel.json.JSONArray search(
170 long groupId, java.lang.String name,
171 java.lang.String[] categoryProperties, int start, int end)
172 throws com.liferay.portal.kernel.exception.PortalException {
173 return getService().search(groupId, name, categoryProperties, start, end);
174 }
175
176 public static com.liferay.portal.kernel.json.JSONArray search(
177 long[] groupIds, java.lang.String name, long[] vocabularyIds,
178 int start, int end)
179 throws com.liferay.portal.kernel.exception.PortalException {
180 return getService().search(groupIds, name, vocabularyIds, start, end);
181 }
182
183 public static int getVocabularyCategoriesCount(long groupId,
184 java.lang.String name, long vocabularyId) {
185 return getService()
186 .getVocabularyCategoriesCount(groupId, name, vocabularyId);
187 }
188
189 public static int getVocabularyCategoriesCount(long groupId,
190 long parentCategory, long vocabularyId) {
191 return getService()
192 .getVocabularyCategoriesCount(groupId, parentCategory,
193 vocabularyId);
194 }
195
196 public static int getVocabularyCategoriesCount(long groupId,
197 long vocabularyId) {
198 return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
199 }
200
201 public static int getVocabularyRootCategoriesCount(long groupId,
202 long vocabularyId) {
203 return getService()
204 .getVocabularyRootCategoriesCount(groupId, vocabularyId);
205 }
206
207 public static java.lang.String getCategoryPath(long categoryId)
208 throws com.liferay.portal.kernel.exception.PortalException {
209 return getService().getCategoryPath(categoryId);
210 }
211
212
217 public static java.lang.String getOSGiServiceIdentifier() {
218 return getService().getOSGiServiceIdentifier();
219 }
220
221
224 @Deprecated
225 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> deleteCategories(
226 long[] categoryIds,
227 com.liferay.portal.kernel.service.ServiceContext serviceContext)
228 throws com.liferay.portal.kernel.exception.PortalException {
229 return getService().deleteCategories(categoryIds, serviceContext);
230 }
231
232 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getCategories(
233 java.lang.String className, long classPK)
234 throws com.liferay.portal.kernel.exception.PortalException {
235 return getService().getCategories(className, classPK);
236 }
237
238 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getChildCategories(
239 long parentCategoryId)
240 throws com.liferay.portal.kernel.exception.PortalException {
241 return getService().getChildCategories(parentCategoryId);
242 }
243
244 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getChildCategories(
245 long parentCategoryId, int start, int end,
246 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
247 throws com.liferay.portal.kernel.exception.PortalException {
248 return getService().getChildCategories(parentCategoryId, start, end, obc);
249 }
250
251 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
252 long groupId, java.lang.String name, long vocabularyId, int start,
253 int end,
254 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
255 return getService()
256 .getVocabularyCategories(groupId, name, vocabularyId, start,
257 end, obc);
258 }
259
260 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
261 long groupId, long parentCategoryId, long vocabularyId, int start,
262 int end,
263 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
264 return getService()
265 .getVocabularyCategories(groupId, parentCategoryId,
266 vocabularyId, start, end, obc);
267 }
268
269 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
270 long parentCategoryId, long vocabularyId, int start, int end,
271 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
272 throws com.liferay.portal.kernel.exception.PortalException {
273 return getService()
274 .getVocabularyCategories(parentCategoryId, vocabularyId,
275 start, end, obc);
276 }
277
278 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
279 long vocabularyId, int start, int end,
280 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
281 throws com.liferay.portal.kernel.exception.PortalException {
282 return getService()
283 .getVocabularyCategories(vocabularyId, start, end, obc);
284 }
285
286 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyRootCategories(
287 long groupId, long vocabularyId, int start, int end,
288 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
289 return getService()
290 .getVocabularyRootCategories(groupId, vocabularyId, start,
291 end, obc);
292 }
293
294 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> search(
295 long groupId, java.lang.String keywords, long vocabularyId, int start,
296 int end,
297 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
298 return getService()
299 .search(groupId, keywords, vocabularyId, start, end, obc);
300 }
301
302 public static void deleteCategories(long[] categoryIds)
303 throws com.liferay.portal.kernel.exception.PortalException {
304 getService().deleteCategories(categoryIds);
305 }
306
307 public static void deleteCategory(long categoryId)
308 throws com.liferay.portal.kernel.exception.PortalException {
309 getService().deleteCategory(categoryId);
310 }
311
312 public static AssetCategoryService getService() {
313 if (_service == null) {
314 _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
315
316 ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
317 "_service");
318 }
319
320 return _service;
321 }
322
323 private static AssetCategoryService _service;
324 }