001
014
015 package com.liferay.portal.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.IndexableActionableDynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.Projection;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.json.JSONObject;
026 import com.liferay.portal.kernel.notifications.NotificationEvent;
027 import com.liferay.portal.kernel.search.Indexable;
028 import com.liferay.portal.kernel.search.IndexableType;
029 import com.liferay.portal.kernel.transaction.Isolation;
030 import com.liferay.portal.kernel.transaction.Propagation;
031 import com.liferay.portal.kernel.transaction.Transactional;
032 import com.liferay.portal.kernel.util.OrderByComparator;
033 import com.liferay.portal.model.PersistedModel;
034 import com.liferay.portal.model.UserNotificationEvent;
035
036 import java.io.Serializable;
037
038 import java.util.Collection;
039 import java.util.List;
040
041
053 @ProviderType
054 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
055 PortalException.class, SystemException.class})
056 public interface UserNotificationEventLocalService extends BaseLocalService,
057 PersistedModelLocalService {
058
063 public UserNotificationEvent addUserNotificationEvent(long userId,
064 boolean actionRequired, NotificationEvent notificationEvent)
065 throws PortalException;
066
067 public UserNotificationEvent addUserNotificationEvent(long userId,
068 NotificationEvent notificationEvent) throws PortalException;
069
070
074 @java.lang.Deprecated
075 public UserNotificationEvent addUserNotificationEvent(long userId,
076 java.lang.String type, long timestamp, long deliverBy,
077 java.lang.String payload, boolean archived,
078 com.liferay.portal.service.ServiceContext serviceContext)
079 throws PortalException;
080
081 public UserNotificationEvent addUserNotificationEvent(long userId,
082 java.lang.String type, long timestamp, int deliveryType,
083 long deliverBy, java.lang.String payload, boolean actionRequired,
084 boolean archived,
085 com.liferay.portal.service.ServiceContext serviceContext)
086 throws PortalException;
087
088 public UserNotificationEvent addUserNotificationEvent(long userId,
089 java.lang.String type, long timestamp, int deliveryType,
090 long deliverBy, java.lang.String payload, boolean archived,
091 com.liferay.portal.service.ServiceContext serviceContext)
092 throws PortalException;
093
094
100 @Indexable(type = IndexableType.REINDEX)
101 public UserNotificationEvent addUserNotificationEvent(
102 UserNotificationEvent userNotificationEvent);
103
104 public List<UserNotificationEvent> addUserNotificationEvents(long userId,
105 Collection<NotificationEvent> notificationEvents)
106 throws PortalException;
107
108
114 public UserNotificationEvent createUserNotificationEvent(
115 long userNotificationEventId);
116
117
120 @Override
121 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
122 throws PortalException;
123
124
130 @Indexable(type = IndexableType.DELETE)
131 public UserNotificationEvent deleteUserNotificationEvent(
132 UserNotificationEvent userNotificationEvent);
133
134
141 @Indexable(type = IndexableType.DELETE)
142 public UserNotificationEvent deleteUserNotificationEvent(
143 long userNotificationEventId) throws PortalException;
144
145 public void deleteUserNotificationEvent(java.lang.String uuid,
146 long companyId);
147
148 public void deleteUserNotificationEvents(
149 Collection<java.lang.String> uuids, long companyId);
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 UserNotificationEvent fetchUserNotificationEvent(
212 long userNotificationEventId);
213
214
221 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222 public UserNotificationEvent fetchUserNotificationEventByUuidAndCompanyId(
223 java.lang.String uuid, long companyId);
224
225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226 public ActionableDynamicQuery getActionableDynamicQuery();
227
228 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
230 long userId, boolean actionRequired, boolean archived);
231
232 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
234 long userId, boolean actionRequired, boolean archived, int start,
235 int end);
236
237 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
239 long userId, boolean archived);
240
241 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
243 long userId, boolean archived, int start, int end);
244
245 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
247 long userId, int deliveryType, boolean actionRequired, boolean archived);
248
249 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
251 long userId, int deliveryType, boolean actionRequired,
252 boolean archived, int start, int end);
253
254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
256 long userId, int deliveryType, boolean archived);
257
258 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
260 long userId, int deliveryType, boolean archived, int start, int end);
261
262 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263 public int getArchivedUserNotificationEventsCount(long userId,
264 boolean actionRequired, boolean archived);
265
266 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267 public int getArchivedUserNotificationEventsCount(long userId,
268 boolean archived);
269
270 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271 public int getArchivedUserNotificationEventsCount(long userId,
272 int deliveryType, boolean actionRequired, boolean archived);
273
274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275 public int getArchivedUserNotificationEventsCount(long userId,
276 int deliveryType, boolean archived);
277
278 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
280 long userId, boolean delivered);
281
282 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
284 long userId, boolean delivered, boolean actionRequired);
285
286 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
288 long userId, boolean delivered, boolean actionRequired, int start,
289 int end);
290
291 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
293 long userId, boolean delivered, int start, int end);
294
295 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
297 long userId, int deliveryType, boolean delivered);
298
299 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
301 long userId, int deliveryType, boolean delivered, boolean actionRequired);
302
303 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
305 long userId, int deliveryType, boolean delivered,
306 boolean actionRequired, int start, int end);
307
308 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
310 long userId, int deliveryType, boolean delivered, int start, int end);
311
312 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313 public int getDeliveredUserNotificationEventsCount(long userId,
314 boolean delivered);
315
316 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317 public int getDeliveredUserNotificationEventsCount(long userId,
318 boolean delivered, boolean actionRequired);
319
320 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321 public int getDeliveredUserNotificationEventsCount(long userId,
322 int deliveryType, boolean delivered);
323
324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325 public int getDeliveredUserNotificationEventsCount(long userId,
326 int deliveryType, boolean delivered, boolean actionRequired);
327
328 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
330
331
336 public java.lang.String getOSGiServiceIdentifier();
337
338 @Override
339 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
341 throws PortalException;
342
343 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344 public List<UserNotificationEvent> getTypeNotificationEvents(
345 java.lang.String type);
346
347
354 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355 public UserNotificationEvent getUserNotificationEvent(
356 long userNotificationEventId) throws PortalException;
357
358
366 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367 public UserNotificationEvent getUserNotificationEventByUuidAndCompanyId(
368 java.lang.String uuid, long companyId) throws PortalException;
369
370
381 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
382 public List<UserNotificationEvent> getUserNotificationEvents(int start,
383 int end);
384
385 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
386 public List<UserNotificationEvent> getUserNotificationEvents(long userId);
387
388 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
389 public List<UserNotificationEvent> getUserNotificationEvents(long userId,
390 int deliveryType);
391
392 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393 public List<UserNotificationEvent> getUserNotificationEvents(long userId,
394 int deliveryType, int start, int end);
395
396 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
397 public List<UserNotificationEvent> getUserNotificationEvents(long userId,
398 int start, int end);
399
400
405 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
406 public int getUserNotificationEventsCount();
407
408 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
409 public int getUserNotificationEventsCount(long userId);
410
411 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
412 public int getUserNotificationEventsCount(long userId, int deliveryType);
413
414 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
415 public int getUserNotificationEventsCount(long userId,
416 java.lang.String type, int deliveryType, boolean archived);
417
418 public UserNotificationEvent sendUserNotificationEvents(long userId,
419 java.lang.String portletId, int deliveryType, boolean actionRequired,
420 JSONObject notificationEventJSONObject) throws PortalException;
421
422 public UserNotificationEvent sendUserNotificationEvents(long userId,
423 java.lang.String portletId, int deliveryType,
424 JSONObject notificationEventJSONObject) throws PortalException;
425
426
432 @Indexable(type = IndexableType.REINDEX)
433 public UserNotificationEvent updateUserNotificationEvent(
434 UserNotificationEvent userNotificationEvent);
435
436 public UserNotificationEvent updateUserNotificationEvent(
437 java.lang.String uuid, long companyId, boolean archive);
438
439 public List<UserNotificationEvent> updateUserNotificationEvents(
440 Collection<java.lang.String> uuids, long companyId, boolean archive);
441 }