001
014
015 package com.liferay.portlet.asset.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable;
020 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
021 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
023 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.Projection;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.search.BaseModelSearchResult;
028 import com.liferay.portal.kernel.search.Hits;
029 import com.liferay.portal.kernel.search.Indexable;
030 import com.liferay.portal.kernel.search.IndexableType;
031 import com.liferay.portal.kernel.search.Sort;
032 import com.liferay.portal.kernel.systemevent.SystemEvent;
033 import com.liferay.portal.kernel.transaction.Isolation;
034 import com.liferay.portal.kernel.transaction.Propagation;
035 import com.liferay.portal.kernel.transaction.Transactional;
036 import com.liferay.portal.kernel.util.OrderByComparator;
037 import com.liferay.portal.model.PersistedModel;
038 import com.liferay.portal.model.SystemEventConstants;
039 import com.liferay.portal.service.BaseLocalService;
040 import com.liferay.portal.service.PersistedModelLocalService;
041 import com.liferay.portal.service.ServiceContext;
042 import com.liferay.portal.service.permission.ModelPermissions;
043
044 import com.liferay.portlet.asset.model.AssetCategory;
045 import com.liferay.portlet.exportimport.lar.PortletDataContext;
046
047 import java.io.Serializable;
048
049 import java.util.List;
050 import java.util.Locale;
051 import java.util.Map;
052
053
065 @ProviderType
066 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
067 PortalException.class, SystemException.class})
068 public interface AssetCategoryLocalService extends BaseLocalService,
069 PersistedModelLocalService {
070
075
076
082 @Indexable(type = IndexableType.REINDEX)
083 public AssetCategory addAssetCategory(AssetCategory assetCategory);
084
085 public void addAssetEntryAssetCategories(long entryId,
086 List<AssetCategory> AssetCategories);
087
088 public void addAssetEntryAssetCategories(long entryId, long[] categoryIds);
089
090 public void addAssetEntryAssetCategory(long entryId,
091 AssetCategory assetCategory);
092
093 public void addAssetEntryAssetCategory(long entryId, long categoryId);
094
095 @Indexable(type = IndexableType.REINDEX)
096 public AssetCategory addCategory(long userId, long groupId,
097 long parentCategoryId, Map<Locale, java.lang.String> titleMap,
098 Map<Locale, java.lang.String> descriptionMap, long vocabularyId,
099 java.lang.String[] categoryProperties, ServiceContext serviceContext)
100 throws PortalException;
101
102 public AssetCategory addCategory(long userId, long groupId,
103 java.lang.String title, long vocabularyId, ServiceContext serviceContext)
104 throws PortalException;
105
106 public void addCategoryResources(AssetCategory category,
107 boolean addGroupPermissions, boolean addGuestPermissions)
108 throws PortalException;
109
110 public void addCategoryResources(AssetCategory category,
111 ModelPermissions modelPermissions) throws PortalException;
112
113 public void clearAssetEntryAssetCategories(long entryId);
114
115
121 public AssetCategory createAssetCategory(long categoryId);
122
123
129 @Indexable(type = IndexableType.DELETE)
130 public AssetCategory deleteAssetCategory(AssetCategory assetCategory);
131
132
139 @Indexable(type = IndexableType.DELETE)
140 public AssetCategory deleteAssetCategory(long categoryId)
141 throws PortalException;
142
143 public void deleteAssetEntryAssetCategories(long entryId,
144 List<AssetCategory> AssetCategories);
145
146 public void deleteAssetEntryAssetCategories(long entryId, long[] categoryIds);
147
148 public void deleteAssetEntryAssetCategory(long entryId,
149 AssetCategory assetCategory);
150
151 public void deleteAssetEntryAssetCategory(long entryId, long categoryId);
152
153 public void deleteCategories(List<AssetCategory> categories)
154 throws PortalException;
155
156 public void deleteCategories(long[] categoryIds) throws PortalException;
157
158 public AssetCategory deleteCategory(AssetCategory category)
159 throws PortalException;
160
161 @Indexable(type = IndexableType.DELETE)
162 @SystemEvent(type = SystemEventConstants.TYPE_DELETE)
163 public AssetCategory deleteCategory(AssetCategory category,
164 boolean skipRebuildTree) throws PortalException;
165
166 public AssetCategory deleteCategory(long categoryId)
167 throws PortalException;
168
169
172 @Override
173 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
174 throws PortalException;
175
176 public void deleteVocabularyCategories(long vocabularyId)
177 throws PortalException;
178
179 public DynamicQuery dynamicQuery();
180
181
187 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
188
189
201 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
202 int end);
203
204
217 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
218 int end, OrderByComparator<T> orderByComparator);
219
220
226 public long dynamicQueryCount(DynamicQuery dynamicQuery);
227
228
235 public long dynamicQueryCount(DynamicQuery dynamicQuery,
236 Projection projection);
237
238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239 public AssetCategory fetchAssetCategory(long categoryId);
240
241
248 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249 public AssetCategory fetchAssetCategoryByUuidAndGroupId(
250 java.lang.String uuid, long groupId);
251
252 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253 public AssetCategory fetchCategory(long categoryId);
254
255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256 public ActionableDynamicQuery getActionableDynamicQuery();
257
258
269 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270 public List<AssetCategory> getAssetCategories(int start, int end);
271
272
279 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280 public List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(
281 java.lang.String uuid, long companyId);
282
283
293 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294 public List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(
295 java.lang.String uuid, long companyId, int start, int end,
296 OrderByComparator<AssetCategory> orderByComparator);
297
298
303 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304 public int getAssetCategoriesCount();
305
306
313 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314 public AssetCategory getAssetCategory(long categoryId)
315 throws PortalException;
316
317
325 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326 public AssetCategory getAssetCategoryByUuidAndGroupId(
327 java.lang.String uuid, long groupId) throws PortalException;
328
329 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330 public List<AssetCategory> getAssetEntryAssetCategories(long entryId);
331
332 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333 public List<AssetCategory> getAssetEntryAssetCategories(long entryId,
334 int start, int end);
335
336 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
337 public List<AssetCategory> getAssetEntryAssetCategories(long entryId,
338 int start, int end, OrderByComparator<AssetCategory> orderByComparator);
339
340 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341 public int getAssetEntryAssetCategoriesCount(long entryId);
342
343
349 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350 public long[] getAssetEntryPrimaryKeys(long categoryId);
351
352 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353 public List<AssetCategory> getCategories();
354
355 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356 public List<AssetCategory> getCategories(java.lang.String className,
357 long classPK);
358
359 @ThreadLocalCachable
360 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361 public List<AssetCategory> getCategories(long classNameId, long classPK);
362
363 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364 public List<AssetCategory> getCategories(Hits hits)
365 throws PortalException;
366
367 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
368 public AssetCategory getCategory(long categoryId) throws PortalException;
369
370 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371 public AssetCategory getCategory(java.lang.String uuid, long groupId)
372 throws PortalException;
373
374 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
375 public long[] getCategoryIds(java.lang.String className, long classPK);
376
377 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
378 public java.lang.String[] getCategoryNames();
379
380 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381 public java.lang.String[] getCategoryNames(java.lang.String className,
382 long classPK);
383
384 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
385 public java.lang.String[] getCategoryNames(long classNameId, long classPK);
386
387 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
388 public List<AssetCategory> getChildCategories(long parentCategoryId);
389
390 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391 public List<AssetCategory> getChildCategories(long parentCategoryId,
392 int start, int end, OrderByComparator<AssetCategory> obc);
393
394 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
395 public int getChildCategoriesCount(long parentCategoryId);
396
397 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398 public List<AssetCategory> getEntryCategories(long entryId);
399
400 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
402 PortletDataContext portletDataContext);
403
404 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
406
407
412 public java.lang.String getOSGiServiceIdentifier();
413
414 @Override
415 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
416 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
417 throws PortalException;
418
419 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
420 public List<java.lang.Long> getSubcategoryIds(long parentCategoryId);
421
422 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
423 public List<AssetCategory> getVocabularyCategories(long parentCategoryId,
424 long vocabularyId, int start, int end,
425 OrderByComparator<AssetCategory> obc);
426
427 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
428 public List<AssetCategory> getVocabularyCategories(long vocabularyId,
429 int start, int end, OrderByComparator<AssetCategory> obc);
430
431 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
432 public int getVocabularyCategoriesCount(long vocabularyId);
433
434 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
435 public List<AssetCategory> getVocabularyRootCategories(long vocabularyId,
436 int start, int end, OrderByComparator<AssetCategory> obc);
437
438 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
439 public int getVocabularyRootCategoriesCount(long vocabularyId);
440
441 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
442 public boolean hasAssetEntryAssetCategories(long entryId);
443
444 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
445 public boolean hasAssetEntryAssetCategory(long entryId, long categoryId);
446
447 @Indexable(type = IndexableType.REINDEX)
448 public AssetCategory mergeCategories(long fromCategoryId, long toCategoryId)
449 throws PortalException;
450
451 @Indexable(type = IndexableType.REINDEX)
452 public AssetCategory moveCategory(long categoryId, long parentCategoryId,
453 long vocabularyId, ServiceContext serviceContext)
454 throws PortalException;
455
456 public void rebuildTree(long groupId, boolean force);
457
458 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
459 public List<AssetCategory> search(long groupId, java.lang.String name,
460 java.lang.String[] categoryProperties, int start, int end);
461
462 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
463 public BaseModelSearchResult<AssetCategory> searchCategories(
464 long companyId, long[] groupIds, java.lang.String title,
465 long[] parentCategoryIds, long[] vocabularyIds, int start, int end)
466 throws PortalException;
467
468 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
469 public BaseModelSearchResult<AssetCategory> searchCategories(
470 long companyId, long groupIds, java.lang.String title,
471 long vocabularyId, int start, int end) throws PortalException;
472
473 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
474 public BaseModelSearchResult<AssetCategory> searchCategories(
475 long companyId, long[] groupIds, java.lang.String title,
476 long[] vocabularyIds, long[] parentCategoryIds, int start, int end,
477 Sort sort) throws PortalException;
478
479 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
480 public BaseModelSearchResult<AssetCategory> searchCategories(
481 long companyId, long[] groupIds, java.lang.String title,
482 long[] vocabularyIds, int start, int end) throws PortalException;
483
484 public void setAssetEntryAssetCategories(long entryId, long[] categoryIds);
485
486
492 @Indexable(type = IndexableType.REINDEX)
493 public AssetCategory updateAssetCategory(AssetCategory assetCategory);
494
495 @Indexable(type = IndexableType.REINDEX)
496 public AssetCategory updateCategory(long userId, long categoryId,
497 long parentCategoryId, Map<Locale, java.lang.String> titleMap,
498 Map<Locale, java.lang.String> descriptionMap, long vocabularyId,
499 java.lang.String[] categoryProperties, ServiceContext serviceContext)
500 throws PortalException;
501 }