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
105 public AssetVocabulary createAssetVocabulary(long vocabularyId);
106
107
113 @Indexable(type = IndexableType.DELETE)
114 public AssetVocabulary deleteAssetVocabulary(
115 AssetVocabulary assetVocabulary);
116
117
124 @Indexable(type = IndexableType.DELETE)
125 public AssetVocabulary deleteAssetVocabulary(long vocabularyId)
126 throws PortalException;
127
128 @Indexable(type = IndexableType.DELETE)
129 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
130 public AssetVocabulary deleteVocabulary(AssetVocabulary vocabulary)
131 throws PortalException;
132
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public AssetVocabulary fetchAssetVocabulary(long vocabularyId);
135
136
143 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144 public AssetVocabulary fetchAssetVocabularyByUuidAndGroupId(
145 java.lang.String uuid, long groupId);
146
147
154 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155 public AssetVocabulary getAssetVocabulary(long vocabularyId)
156 throws PortalException;
157
158
166 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167 public AssetVocabulary getAssetVocabularyByUuidAndGroupId(
168 java.lang.String uuid, long groupId) throws PortalException;
169
170 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171 public AssetVocabulary getGroupVocabulary(long groupId,
172 java.lang.String name) throws PortalException;
173
174 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175 public AssetVocabulary getVocabulary(long vocabularyId)
176 throws PortalException;
177
178
184 @Indexable(type = IndexableType.REINDEX)
185 public AssetVocabulary updateAssetVocabulary(
186 AssetVocabulary assetVocabulary);
187
188 @Indexable(type = IndexableType.REINDEX)
189 public AssetVocabulary updateVocabulary(long vocabularyId,
190 java.lang.String title, Map<Locale, java.lang.String> titleMap,
191 Map<Locale, java.lang.String> descriptionMap,
192 java.lang.String settings, ServiceContext serviceContext)
193 throws PortalException;
194
195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196 public ActionableDynamicQuery getActionableDynamicQuery();
197
198 public DynamicQuery dynamicQuery();
199
200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
202 PortletDataContext portletDataContext);
203
204 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
206
207
210 @Override
211 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
212 throws PortalException;
213
214 @Override
215 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
217 throws PortalException;
218
219 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220 public BaseModelSearchResult<AssetVocabulary> searchVocabularies(
221 long companyId, long groupId, java.lang.String title, int start, int end)
222 throws PortalException;
223
224 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225 public BaseModelSearchResult<AssetVocabulary> searchVocabularies(
226 long companyId, long groupId, java.lang.String title, int start,
227 int end, Sort sort) throws PortalException;
228
229
234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235 public int getAssetVocabulariesCount();
236
237 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238 public int getGroupVocabulariesCount(long[] groupIds);
239
240
245 public java.lang.String getOSGiServiceIdentifier();
246
247
253 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
254
255
267 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
268 int end);
269
270
283 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
284 int end, OrderByComparator<T> orderByComparator);
285
286
297 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298 public List<AssetVocabulary> getAssetVocabularies(int start, int end);
299
300
307 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308 public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
309 java.lang.String uuid, long companyId);
310
311
321 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322 public List<AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
323 java.lang.String uuid, long companyId, int start, int end,
324 OrderByComparator<AssetVocabulary> orderByComparator);
325
326 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327 public List<AssetVocabulary> getCompanyVocabularies(long companyId);
328
329 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330 public List<AssetVocabulary> getGroupVocabularies(long groupId)
331 throws PortalException;
332
333 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334 public List<AssetVocabulary> getGroupVocabularies(long groupId,
335 boolean addDefaultVocabulary) throws PortalException;
336
337 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338 public List<AssetVocabulary> getGroupVocabularies(long groupId,
339 java.lang.String name, int start, int end,
340 OrderByComparator<AssetVocabulary> obc);
341
342 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
343 public List<AssetVocabulary> getGroupVocabularies(long[] groupIds);
344
345 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346 public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds);
347
348 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349 public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
350 java.lang.String className);
351
352 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353 public List<AssetVocabulary> getGroupsVocabularies(long[] groupIds,
354 java.lang.String className, long classTypePK);
355
356 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357 public List<AssetVocabulary> getVocabularies(Hits hits)
358 throws PortalException;
359
360 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361 public List<AssetVocabulary> getVocabularies(long[] vocabularyIds)
362 throws PortalException;
363
364
370 public long dynamicQueryCount(DynamicQuery dynamicQuery);
371
372
379 public long dynamicQueryCount(DynamicQuery dynamicQuery,
380 Projection projection);
381
382 public void addVocabularyResources(AssetVocabulary vocabulary,
383 boolean addGroupPermissions, boolean addGuestPermissions)
384 throws PortalException;
385
386 public void addVocabularyResources(AssetVocabulary vocabulary,
387 ModelPermissions modelPermissions) throws PortalException;
388
389 public void deleteVocabularies(long groupId) throws PortalException;
390
391 public void deleteVocabulary(long vocabularyId) throws PortalException;
392 }