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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077 public boolean hasAssetEntryAssetCategories(long entryId);
078
079 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080 public boolean hasAssetEntryAssetCategory(long entryId, long categoryId);
081
082
088 @Indexable(type = IndexableType.REINDEX)
089 public AssetCategory addAssetCategory(AssetCategory assetCategory);
090
091 public AssetCategory addCategory(long userId, long groupId,
092 java.lang.String title, long vocabularyId, ServiceContext serviceContext)
093 throws PortalException;
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
108 public AssetCategory createAssetCategory(long categoryId);
109
110
116 @Indexable(type = IndexableType.DELETE)
117 public AssetCategory deleteAssetCategory(AssetCategory assetCategory);
118
119
126 @Indexable(type = IndexableType.DELETE)
127 public AssetCategory deleteAssetCategory(long categoryId)
128 throws PortalException;
129
130 public AssetCategory deleteCategory(AssetCategory category)
131 throws PortalException;
132
133 @Indexable(type = IndexableType.DELETE)
134 @SystemEvent(type = SystemEventConstants.TYPE_DELETE)
135 public AssetCategory deleteCategory(AssetCategory category,
136 boolean skipRebuildTree) throws PortalException;
137
138 public AssetCategory deleteCategory(long categoryId)
139 throws PortalException;
140
141 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142 public AssetCategory fetchAssetCategory(long categoryId);
143
144
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public AssetCategory fetchAssetCategoryByUuidAndGroupId(
153 java.lang.String uuid, long groupId);
154
155 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156 public AssetCategory fetchCategory(long categoryId);
157
158
165 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166 public AssetCategory getAssetCategory(long categoryId)
167 throws PortalException;
168
169
177 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178 public AssetCategory getAssetCategoryByUuidAndGroupId(
179 java.lang.String uuid, long groupId) throws PortalException;
180
181 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182 public AssetCategory getCategory(java.lang.String uuid, long groupId)
183 throws PortalException;
184
185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186 public AssetCategory getCategory(long categoryId) throws PortalException;
187
188 @Indexable(type = IndexableType.REINDEX)
189 public AssetCategory mergeCategories(long fromCategoryId, long toCategoryId)
190 throws PortalException;
191
192 @Indexable(type = IndexableType.REINDEX)
193 public AssetCategory moveCategory(long categoryId, long parentCategoryId,
194 long vocabularyId, ServiceContext serviceContext)
195 throws PortalException;
196
197
203 @Indexable(type = IndexableType.REINDEX)
204 public AssetCategory updateAssetCategory(AssetCategory assetCategory);
205
206 @Indexable(type = IndexableType.REINDEX)
207 public AssetCategory updateCategory(long userId, long categoryId,
208 long parentCategoryId, Map<Locale, java.lang.String> titleMap,
209 Map<Locale, java.lang.String> descriptionMap, long vocabularyId,
210 java.lang.String[] categoryProperties, ServiceContext serviceContext)
211 throws PortalException;
212
213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214 public ActionableDynamicQuery getActionableDynamicQuery();
215
216 public DynamicQuery dynamicQuery();
217
218 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
220 PortletDataContext portletDataContext);
221
222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
224
225
228 @Override
229 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
230 throws PortalException;
231
232 @Override
233 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
235 throws PortalException;
236
237 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238 public BaseModelSearchResult<AssetCategory> searchCategories(
239 long companyId, long groupIds, java.lang.String title,
240 long vocabularyId, int start, int end) throws PortalException;
241
242 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243 public BaseModelSearchResult<AssetCategory> searchCategories(
244 long companyId, long[] groupIds, java.lang.String title,
245 long[] parentCategoryIds, long[] vocabularyIds, int start, int end)
246 throws PortalException;
247
248 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249 public BaseModelSearchResult<AssetCategory> searchCategories(
250 long companyId, long[] groupIds, java.lang.String title,
251 long[] vocabularyIds, int start, int end) throws PortalException;
252
253 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254 public BaseModelSearchResult<AssetCategory> searchCategories(
255 long companyId, long[] groupIds, java.lang.String title,
256 long[] vocabularyIds, long[] parentCategoryIds, int start, int end,
257 Sort sort) throws PortalException;
258
259
264 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265 public int getAssetCategoriesCount();
266
267 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268 public int getAssetEntryAssetCategoriesCount(long entryId);
269
270 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271 public int getChildCategoriesCount(long parentCategoryId);
272
273 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274 public int getVocabularyCategoriesCount(long vocabularyId);
275
276 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277 public int getVocabularyRootCategoriesCount(long vocabularyId);
278
279
284 public java.lang.String getOSGiServiceIdentifier();
285
286 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287 public java.lang.String[] getCategoryNames();
288
289 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290 public java.lang.String[] getCategoryNames(java.lang.String className,
291 long classPK);
292
293 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294 public java.lang.String[] getCategoryNames(long classNameId, long classPK);
295
296
302 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
303
304
316 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
317 int end);
318
319
332 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
333 int end, OrderByComparator<T> orderByComparator);
334
335
346 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347 public List<AssetCategory> getAssetCategories(int start, int end);
348
349
356 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357 public List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(
358 java.lang.String uuid, long companyId);
359
360
370 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371 public List<AssetCategory> getAssetCategoriesByUuidAndCompanyId(
372 java.lang.String uuid, long companyId, int start, int end,
373 OrderByComparator<AssetCategory> orderByComparator);
374
375 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376 public List<AssetCategory> getAssetEntryAssetCategories(long entryId);
377
378 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379 public List<AssetCategory> getAssetEntryAssetCategories(long entryId,
380 int start, int end);
381
382 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
383 public List<AssetCategory> getAssetEntryAssetCategories(long entryId,
384 int start, int end, OrderByComparator<AssetCategory> orderByComparator);
385
386 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
387 public List<AssetCategory> getCategories();
388
389 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390 public List<AssetCategory> getCategories(Hits hits)
391 throws PortalException;
392
393 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
394 public List<AssetCategory> getCategories(java.lang.String className,
395 long classPK);
396
397 @ThreadLocalCachable
398 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399 public List<AssetCategory> getCategories(long classNameId, long classPK);
400
401 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402 public List<AssetCategory> getChildCategories(long parentCategoryId);
403
404 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405 public List<AssetCategory> getChildCategories(long parentCategoryId,
406 int start, int end, OrderByComparator<AssetCategory> obc);
407
408 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
409 public List<AssetCategory> getEntryCategories(long entryId);
410
411 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
412 public List<java.lang.Long> getSubcategoryIds(long parentCategoryId);
413
414 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
415 public List<AssetCategory> getVocabularyCategories(long parentCategoryId,
416 long vocabularyId, int start, int end,
417 OrderByComparator<AssetCategory> obc);
418
419 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
420 public List<AssetCategory> getVocabularyCategories(long vocabularyId,
421 int start, int end, OrderByComparator<AssetCategory> obc);
422
423 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
424 public List<AssetCategory> getVocabularyRootCategories(long vocabularyId,
425 int start, int end, OrderByComparator<AssetCategory> obc);
426
427 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
428 public List<AssetCategory> search(long groupId, java.lang.String name,
429 java.lang.String[] categoryProperties, int start, int end);
430
431
437 public long dynamicQueryCount(DynamicQuery dynamicQuery);
438
439
446 public long dynamicQueryCount(DynamicQuery dynamicQuery,
447 Projection projection);
448
449
455 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
456 public long[] getAssetEntryPrimaryKeys(long categoryId);
457
458 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
459 public long[] getCategoryIds(java.lang.String className, long classPK);
460
461 public void addAssetEntryAssetCategories(long entryId,
462 List<AssetCategory> assetCategories);
463
464 public void addAssetEntryAssetCategories(long entryId, long[] categoryIds);
465
466 public void addAssetEntryAssetCategory(long entryId,
467 AssetCategory assetCategory);
468
469 public void addAssetEntryAssetCategory(long entryId, long categoryId);
470
471 public void addCategoryResources(AssetCategory category,
472 boolean addGroupPermissions, boolean addGuestPermissions)
473 throws PortalException;
474
475 public void addCategoryResources(AssetCategory category,
476 ModelPermissions modelPermissions) throws PortalException;
477
478 public void clearAssetEntryAssetCategories(long entryId);
479
480 public void deleteAssetEntryAssetCategories(long entryId,
481 List<AssetCategory> assetCategories);
482
483 public void deleteAssetEntryAssetCategories(long entryId, long[] categoryIds);
484
485 public void deleteAssetEntryAssetCategory(long entryId,
486 AssetCategory assetCategory);
487
488 public void deleteAssetEntryAssetCategory(long entryId, long categoryId);
489
490 public void deleteCategories(List<AssetCategory> categories)
491 throws PortalException;
492
493 public void deleteCategories(long[] categoryIds) throws PortalException;
494
495 public void deleteVocabularyCategories(long vocabularyId)
496 throws PortalException;
497
498 public void rebuildTree(long groupId, boolean force);
499
500 public void setAssetEntryAssetCategories(long entryId, long[] categoryIds);
501 }