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