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