001
014
015 package com.liferay.asset.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.asset.kernel.model.AssetVocabulary;
020
021 import com.liferay.exportimport.kernel.lar.PortletDataContext;
022
023 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
025 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
027 import com.liferay.portal.kernel.dao.orm.Projection;
028 import com.liferay.portal.kernel.exception.PortalException;
029 import com.liferay.portal.kernel.exception.SystemException;
030 import com.liferay.portal.kernel.model.PersistedModel;
031 import com.liferay.portal.kernel.model.SystemEventConstants;
032 import com.liferay.portal.kernel.search.BaseModelSearchResult;
033 import com.liferay.portal.kernel.search.Hits;
034 import com.liferay.portal.kernel.search.Indexable;
035 import com.liferay.portal.kernel.search.IndexableType;
036 import com.liferay.portal.kernel.search.Sort;
037 import com.liferay.portal.kernel.service.BaseLocalService;
038 import com.liferay.portal.kernel.service.PersistedModelLocalService;
039 import com.liferay.portal.kernel.service.ServiceContext;
040 import com.liferay.portal.kernel.service.permission.ModelPermissions;
041 import com.liferay.portal.kernel.systemevent.SystemEvent;
042 import com.liferay.portal.kernel.transaction.Isolation;
043 import com.liferay.portal.kernel.transaction.Propagation;
044 import com.liferay.portal.kernel.transaction.Transactional;
045 import com.liferay.portal.kernel.util.OrderByComparator;
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 AssetVocabularyLocalService extends BaseLocalService,
069 PersistedModelLocalService {
070
075
076
082 @Indexable(type = IndexableType.REINDEX)
083 public AssetVocabulary addAssetVocabulary(AssetVocabulary assetVocabulary);
084
085 public AssetVocabulary addDefaultVocabulary(long groupId)
086 throws PortalException;
087
088 public AssetVocabulary addVocabulary(long userId, long groupId,
089 java.lang.String title, ServiceContext serviceContext)
090 throws PortalException;
091
092 @Indexable(type = IndexableType.REINDEX)
093 public AssetVocabulary addVocabulary(long userId, long groupId,
094 java.lang.String title, Map<Locale, java.lang.String> titleMap,
095 Map<Locale, java.lang.String> descriptionMap,
096 java.lang.String settings, ServiceContext serviceContext)
097 throws PortalException;
098
099 public void addVocabularyResources(AssetVocabulary vocabulary,
100 boolean addGroupPermissions, boolean addGuestPermissions)
101 throws PortalException;
102
103 public void addVocabularyResources(AssetVocabulary vocabulary,
104 ModelPermissions modelPermissions) throws PortalException;
105
106
112 public AssetVocabulary createAssetVocabulary(long vocabularyId);
113
114
120 @Indexable(type = IndexableType.DELETE)
121 public AssetVocabulary deleteAssetVocabulary(
122 AssetVocabulary assetVocabulary);
123
124
131 @Indexable(type = IndexableType.DELETE)
132 public AssetVocabulary deleteAssetVocabulary(long vocabularyId)
133 throws PortalException;
134
135
138 @Override
139 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
140 throws PortalException;
141
142 public void deleteVocabularies(long groupId) throws PortalException;
143
144 @Indexable(type = IndexableType.DELETE)
145 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
146 public AssetVocabulary deleteVocabulary(AssetVocabulary vocabulary)
147 throws PortalException;
148
149 public void deleteVocabulary(long vocabularyId) throws PortalException;
150
151 public DynamicQuery dynamicQuery();
152
153
159 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
160
161
173 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
174 int end);
175
176
189 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
190 int end, OrderByComparator<T> orderByComparator);
191
192
198 public long dynamicQueryCount(DynamicQuery dynamicQuery);
199
200
207 public long dynamicQueryCount(DynamicQuery dynamicQuery,
208 Projection projection);
209
210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211 public AssetVocabulary fetchAssetVocabulary(long vocabularyId);
212
213
220 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221 public AssetVocabulary fetchAssetVocabularyByUuidAndGroupId(
222 java.lang.String uuid, long groupId);
223
224 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225 public ActionableDynamicQuery getActionableDynamicQuery();
226
227
238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239 public List<AssetVocabulary> getAssetVocabularies(int start, int end);
240
241
248 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249 public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
250 java.lang.String uuid, long companyId);
251
252
262 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263 public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
264 java.lang.String uuid, long companyId, int start, int end,
265 OrderByComparator<AssetVocabulary> orderByComparator);
266
267
272 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273 public int getAssetVocabulariesCount();
274
275
282 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283 public AssetVocabulary getAssetVocabulary(long vocabularyId)
284 throws PortalException;
285
286
294 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295 public AssetVocabulary getAssetVocabularyByUuidAndGroupId(
296 java.lang.String uuid, long groupId) throws PortalException;
297
298 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299 public List<AssetVocabulary> getCompanyVocabularies(long companyId);
300
301 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
303 PortletDataContext portletDataContext);
304
305 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306 public List<AssetVocabulary> getGroupVocabularies(long groupId)
307 throws PortalException;
308
309 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310 public List<AssetVocabulary> getGroupVocabularies(long groupId,
311 boolean addDefaultVocabulary) throws PortalException;
312
313 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314 public List<AssetVocabulary> getGroupVocabularies(long groupId,
315 java.lang.String name, int start, int end,
316 OrderByComparator<AssetVocabulary> obc);
317
318 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319 public List<AssetVocabulary> getGroupVocabularies(long[] groupIds);
320
321 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322 public int getGroupVocabulariesCount(long[] groupIds);
323
324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325 public AssetVocabulary getGroupVocabulary(long groupId,
326 java.lang.String name) throws PortalException;
327
328 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329 public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds);
330
331 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332 public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
333 java.lang.String className);
334
335 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336 public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
337 java.lang.String className, long classTypePK);
338
339 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
341
342
347 public java.lang.String getOSGiServiceIdentifier();
348
349 @Override
350 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
352 throws PortalException;
353
354 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355 public List<AssetVocabulary> getVocabularies(Hits hits)
356 throws PortalException;
357
358 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359 public List<AssetVocabulary> getVocabularies(long[] vocabularyIds)
360 throws PortalException;
361
362 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363 public AssetVocabulary getVocabulary(long vocabularyId)
364 throws PortalException;
365
366 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367 public BaseModelSearchResult<AssetVocabulary> searchVocabularies(
368 long companyId, long groupId, java.lang.String title, int start, int end)
369 throws PortalException;
370
371 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
372 public BaseModelSearchResult<AssetVocabulary> searchVocabularies(
373 long companyId, long groupId, java.lang.String title, int start,
374 int end, Sort sort) throws PortalException;
375
376
382 @Indexable(type = IndexableType.REINDEX)
383 public AssetVocabulary updateAssetVocabulary(
384 AssetVocabulary assetVocabulary);
385
386 @Indexable(type = IndexableType.REINDEX)
387 public AssetVocabulary updateVocabulary(long vocabularyId,
388 java.lang.String title, Map<Locale, java.lang.String> titleMap,
389 Map<Locale, java.lang.String> descriptionMap,
390 java.lang.String settings, ServiceContext serviceContext)
391 throws PortalException;
392 }