001
014
015 package com.liferay.asset.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.asset.kernel.model.AssetEntry;
020 import com.liferay.asset.kernel.service.persistence.AssetEntryQuery;
021
022 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
023 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
025 import com.liferay.portal.kernel.dao.orm.Projection;
026 import com.liferay.portal.kernel.exception.PortalException;
027 import com.liferay.portal.kernel.exception.SystemException;
028 import com.liferay.portal.kernel.increment.BufferedIncrement;
029 import com.liferay.portal.kernel.model.PersistedModel;
030 import com.liferay.portal.kernel.search.Hits;
031 import com.liferay.portal.kernel.search.Indexable;
032 import com.liferay.portal.kernel.search.IndexableType;
033 import com.liferay.portal.kernel.service.BaseLocalService;
034 import com.liferay.portal.kernel.service.PersistedModelLocalService;
035 import com.liferay.portal.kernel.transaction.Isolation;
036 import com.liferay.portal.kernel.transaction.Propagation;
037 import com.liferay.portal.kernel.transaction.Transactional;
038 import com.liferay.portal.kernel.util.OrderByComparator;
039
040 import java.io.Serializable;
041
042 import java.util.Date;
043 import java.util.List;
044
045
057 @ProviderType
058 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
059 PortalException.class, SystemException.class})
060 public interface AssetEntryLocalService extends BaseLocalService,
061 PersistedModelLocalService {
062
067 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
068 public boolean hasAssetCategoryAssetEntries(long categoryId);
069
070 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071 public boolean hasAssetCategoryAssetEntry(long categoryId, long entryId);
072
073 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
074 public boolean hasAssetTagAssetEntries(long tagId);
075
076 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077 public boolean hasAssetTagAssetEntry(long tagId, long entryId);
078
079
085 @Indexable(type = IndexableType.REINDEX)
086 public AssetEntry addAssetEntry(AssetEntry assetEntry);
087
088
094 public AssetEntry createAssetEntry(long entryId);
095
096
102 @Indexable(type = IndexableType.DELETE)
103 public AssetEntry deleteAssetEntry(AssetEntry assetEntry);
104
105
112 @Indexable(type = IndexableType.DELETE)
113 public AssetEntry deleteAssetEntry(long entryId) throws PortalException;
114
115 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116 public AssetEntry fetchAssetEntry(long entryId);
117
118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119 public AssetEntry fetchEntry(java.lang.String className, long classPK);
120
121 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122 public AssetEntry fetchEntry(long entryId);
123
124 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125 public AssetEntry fetchEntry(long groupId, java.lang.String classUuid);
126
127
134 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135 public AssetEntry getAssetEntry(long entryId) throws PortalException;
136
137 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138 public AssetEntry getEntry(java.lang.String className, long classPK)
139 throws PortalException;
140
141 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142 public AssetEntry getEntry(long entryId) throws PortalException;
143
144 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145 public AssetEntry getEntry(long groupId, java.lang.String classUuid)
146 throws PortalException;
147
148 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149 public AssetEntry getNextEntry(long entryId) throws PortalException;
150
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public AssetEntry getParentEntry(long entryId) throws PortalException;
153
154 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155 public AssetEntry getPreviousEntry(long entryId) throws PortalException;
156
157 public AssetEntry incrementViewCounter(long userId,
158 java.lang.String className, long classPK) throws PortalException;
159
160
166 @Indexable(type = IndexableType.REINDEX)
167 public AssetEntry updateAssetEntry(AssetEntry assetEntry);
168
169
173 @java.lang.Deprecated
174 public AssetEntry updateEntry(java.lang.String className, long classPK,
175 Date publishDate, boolean visible) throws PortalException;
176
177 public AssetEntry updateEntry(java.lang.String className, long classPK,
178 Date publishDate, Date expirationDate, boolean listable, boolean visible)
179 throws PortalException;
180
181
185 @java.lang.Deprecated
186 public AssetEntry updateEntry(java.lang.String className, long classPK,
187 Date publishDate, Date expirationDate, boolean visible)
188 throws PortalException;
189
190 public AssetEntry updateEntry(long userId, long groupId,
191 java.lang.String className, long classPK, long[] categoryIds,
192 java.lang.String[] tagNames) throws PortalException;
193
194
200 @java.lang.Deprecated
201 public AssetEntry updateEntry(long userId, long groupId, Date createDate,
202 Date modifiedDate, java.lang.String className, long classPK,
203 java.lang.String classUuid, long classTypeId, long[] categoryIds,
204 java.lang.String[] tagNames, boolean listable, boolean visible,
205 Date startDate, Date endDate, Date expirationDate,
206 java.lang.String mimeType, java.lang.String title,
207 java.lang.String description, java.lang.String summary,
208 java.lang.String url, java.lang.String layoutUuid, int height,
209 int width, java.lang.Double priority) throws PortalException;
210
211 public AssetEntry updateEntry(long userId, long groupId, Date createDate,
212 Date modifiedDate, java.lang.String className, long classPK,
213 java.lang.String classUuid, long classTypeId, long[] categoryIds,
214 java.lang.String[] tagNames, boolean listable, boolean visible,
215 Date startDate, Date endDate, Date publishDate, Date expirationDate,
216 java.lang.String mimeType, java.lang.String title,
217 java.lang.String description, java.lang.String summary,
218 java.lang.String url, java.lang.String layoutUuid, int height,
219 int width, java.lang.Double priority) throws PortalException;
220
221
227 @java.lang.Deprecated
228 public AssetEntry updateEntry(long userId, long groupId, Date createDate,
229 Date modifiedDate, java.lang.String className, long classPK,
230 java.lang.String classUuid, long classTypeId, long[] categoryIds,
231 java.lang.String[] tagNames, boolean visible, Date startDate,
232 Date endDate, Date expirationDate, java.lang.String mimeType,
233 java.lang.String title, java.lang.String description,
234 java.lang.String summary, java.lang.String url,
235 java.lang.String layoutUuid, int height, int width,
236 java.lang.Integer priority, boolean sync) throws PortalException;
237
238 public AssetEntry updateVisible(AssetEntry entry, boolean visible)
239 throws PortalException;
240
241 public AssetEntry updateVisible(java.lang.String className, long classPK,
242 boolean visible) throws PortalException;
243
244 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245 public ActionableDynamicQuery getActionableDynamicQuery();
246
247 public DynamicQuery dynamicQuery();
248
249 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
251
252
255 @Override
256 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
257 throws PortalException;
258
259 @Override
260 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
262 throws PortalException;
263
264 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265 public Hits search(long companyId, long[] groupIds, long userId,
266 java.lang.String className, java.lang.String keywords, int status,
267 int start, int end);
268
269 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270 public Hits search(long companyId, long[] groupIds, long userId,
271 java.lang.String className, java.lang.String userName,
272 java.lang.String title, java.lang.String description,
273 java.lang.String assetCategoryIds, java.lang.String assetTagNames,
274 int status, boolean andSearch, int start, int end);
275
276 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277 public Hits search(long companyId, long[] groupIds, long userId,
278 java.lang.String className, long classTypeId,
279 java.lang.String keywords, boolean showNonindexable, int status,
280 int start, int end);
281
282 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283 public Hits search(long companyId, long[] groupIds, long userId,
284 java.lang.String className, long classTypeId,
285 java.lang.String keywords, boolean showNonindexable, int[] statuses,
286 int start, int end);
287
288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289 public Hits search(long companyId, long[] groupIds, long userId,
290 java.lang.String className, long classTypeId,
291 java.lang.String keywords, int status, int start, int end);
292
293 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294 public Hits search(long companyId, long[] groupIds, long userId,
295 java.lang.String className, long classTypeId,
296 java.lang.String userName, java.lang.String title,
297 java.lang.String description, java.lang.String assetCategoryIds,
298 java.lang.String assetTagNames, boolean showNonindexable, int status,
299 boolean andSearch, int start, int end);
300
301 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302 public Hits search(long companyId, long[] groupIds, long userId,
303 java.lang.String className, long classTypeId,
304 java.lang.String userName, java.lang.String title,
305 java.lang.String description, java.lang.String assetCategoryIds,
306 java.lang.String assetTagNames, boolean showNonindexable,
307 int[] statuses, boolean andSearch, int start, int end);
308
309 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310 public Hits search(long companyId, long[] groupIds, long userId,
311 java.lang.String className, long classTypeId,
312 java.lang.String userName, java.lang.String title,
313 java.lang.String description, java.lang.String assetCategoryIds,
314 java.lang.String assetTagNames, int status, boolean andSearch,
315 int start, int end);
316
317 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318 public int getAssetCategoryAssetEntriesCount(long categoryId);
319
320
325 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326 public int getAssetEntriesCount();
327
328 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329 public int getAssetTagAssetEntriesCount(long tagId);
330
331 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332 public int getCompanyEntriesCount(long companyId);
333
334 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335 public int getEntriesCount(AssetEntryQuery entryQuery);
336
337 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338 public int getEntriesCount(long[] groupIds, long[] classNameIds,
339 java.lang.String keywords, java.lang.String userName,
340 java.lang.String title, java.lang.String description,
341 java.lang.Boolean listable, boolean advancedSearch, boolean andOperator);
342
343
348 public java.lang.String getOSGiServiceIdentifier();
349
350
356 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
357
358
370 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
371 int end);
372
373
386 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
387 int end, OrderByComparator<T> orderByComparator);
388
389 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390 public List<AssetEntry> getAncestorEntries(long entryId)
391 throws PortalException;
392
393 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
394 public List<AssetEntry> getAssetCategoryAssetEntries(long categoryId);
395
396 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
397 public List<AssetEntry> getAssetCategoryAssetEntries(long categoryId,
398 int start, int end);
399
400 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401 public List<AssetEntry> getAssetCategoryAssetEntries(long categoryId,
402 int start, int end, OrderByComparator<AssetEntry> orderByComparator);
403
404
415 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
416 public List<AssetEntry> getAssetEntries(int start, int end);
417
418 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
419 public List<AssetEntry> getAssetTagAssetEntries(long tagId);
420
421 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
422 public List<AssetEntry> getAssetTagAssetEntries(long tagId, int start,
423 int end);
424
425 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
426 public List<AssetEntry> getAssetTagAssetEntries(long tagId, int start,
427 int end, OrderByComparator<AssetEntry> orderByComparator);
428
429 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
430 public List<AssetEntry> getChildEntries(long entryId)
431 throws PortalException;
432
433 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
434 public List<AssetEntry> getCompanyEntries(long companyId, int start, int end);
435
436 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
437 public List<AssetEntry> getEntries(AssetEntryQuery entryQuery);
438
439 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
440 public List<AssetEntry> getEntries(long[] groupIds, long[] classNameIds,
441 java.lang.String keywords, java.lang.String userName,
442 java.lang.String title, java.lang.String description,
443 java.lang.Boolean listable, boolean advancedSearch,
444 boolean andOperator, int start, int end, java.lang.String orderByCol1,
445 java.lang.String orderByCol2, java.lang.String orderByType1,
446 java.lang.String orderByType2);
447
448 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
449 public List<AssetEntry> getGroupEntries(long groupId);
450
451 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
452 public List<AssetEntry> getTopViewedEntries(java.lang.String className,
453 boolean asc, int start, int end);
454
455 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
456 public List<AssetEntry> getTopViewedEntries(java.lang.String[] className,
457 boolean asc, int start, int end);
458
459
465 public long dynamicQueryCount(DynamicQuery dynamicQuery);
466
467
474 public long dynamicQueryCount(DynamicQuery dynamicQuery,
475 Projection projection);
476
477 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
478 public long searchCount(long companyId, long[] groupIds, long userId,
479 java.lang.String className, long classTypeId,
480 java.lang.String keywords, boolean showNonindexable, int[] statuses);
481
482 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
483 public long searchCount(long companyId, long[] groupIds, long userId,
484 java.lang.String className, long classTypeId,
485 java.lang.String userName, java.lang.String title,
486 java.lang.String description, java.lang.String assetCategoryIds,
487 java.lang.String assetTagNames, boolean showInvisible,
488 boolean showNonindexable, int[] statuses, boolean andSearch);
489
490 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
491 public long searchCount(long companyId, long[] groupIds, long userId,
492 java.lang.String className, long classTypeId,
493 java.lang.String userName, java.lang.String title,
494 java.lang.String description, java.lang.String assetCategoryIds,
495 java.lang.String assetTagNames, boolean showNonindexable,
496 int[] statuses, boolean andSearch);
497
498
504 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
505 public long[] getAssetCategoryPrimaryKeys(long entryId);
506
507
513 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
514 public long[] getAssetTagPrimaryKeys(long entryId);
515
516 public void addAssetCategoryAssetEntries(long categoryId,
517 List<AssetEntry> assetEntries);
518
519 public void addAssetCategoryAssetEntries(long categoryId, long[] entryIds);
520
521 public void addAssetCategoryAssetEntry(long categoryId,
522 AssetEntry assetEntry);
523
524 public void addAssetCategoryAssetEntry(long categoryId, long entryId);
525
526 public void addAssetTagAssetEntries(long tagId,
527 List<AssetEntry> assetEntries);
528
529 public void addAssetTagAssetEntries(long tagId, long[] entryIds);
530
531 public void addAssetTagAssetEntry(long tagId, AssetEntry assetEntry);
532
533 public void addAssetTagAssetEntry(long tagId, long entryId);
534
535 public void clearAssetCategoryAssetEntries(long categoryId);
536
537 public void clearAssetTagAssetEntries(long tagId);
538
539 public void deleteAssetCategoryAssetEntries(long categoryId,
540 List<AssetEntry> assetEntries);
541
542 public void deleteAssetCategoryAssetEntries(long categoryId, long[] entryIds);
543
544 public void deleteAssetCategoryAssetEntry(long categoryId,
545 AssetEntry assetEntry);
546
547 public void deleteAssetCategoryAssetEntry(long categoryId, long entryId);
548
549 public void deleteAssetTagAssetEntries(long tagId,
550 List<AssetEntry> assetEntries);
551
552 public void deleteAssetTagAssetEntries(long tagId, long[] entryIds);
553
554 public void deleteAssetTagAssetEntry(long tagId, AssetEntry assetEntry);
555
556 public void deleteAssetTagAssetEntry(long tagId, long entryId);
557
558 public void deleteEntry(AssetEntry entry) throws PortalException;
559
560 public void deleteEntry(java.lang.String className, long classPK)
561 throws PortalException;
562
563 public void deleteEntry(long entryId) throws PortalException;
564
565 public void deleteGroupEntries(long groupId) throws PortalException;
566
567 @BufferedIncrement(configuration = "AssetEntry", incrementClass = com.liferay.portal.kernel.increment.NumberIncrement.class)
568 public void incrementViewCounter(long userId, java.lang.String className,
569 long classPK, int increment);
570
571 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
572 public void reindex(List<AssetEntry> entries) throws PortalException;
573
574 public void setAssetCategoryAssetEntries(long categoryId, long[] entryIds);
575
576 public void setAssetTagAssetEntries(long tagId, long[] entryIds);
577
578 public void validate(long groupId, java.lang.String className,
579 long classTypePK, long[] categoryIds, java.lang.String[] tagNames)
580 throws PortalException;
581
582
586 @java.lang.Deprecated
587 public void validate(long groupId, java.lang.String className,
588 long[] categoryIds, java.lang.String[] tagNames)
589 throws PortalException;
590 }