001
014
015 package com.liferay.portal.kernel.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.model.PersistedModel;
027 import com.liferay.portal.kernel.model.UserNotificationEvent;
028 import com.liferay.portal.kernel.notifications.NotificationEvent;
029 import com.liferay.portal.kernel.search.Indexable;
030 import com.liferay.portal.kernel.search.IndexableType;
031 import com.liferay.portal.kernel.transaction.Isolation;
032 import com.liferay.portal.kernel.transaction.Propagation;
033 import com.liferay.portal.kernel.transaction.Transactional;
034 import com.liferay.portal.kernel.util.OrderByComparator;
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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
064 public ActionableDynamicQuery getActionableDynamicQuery();
065
066 public DynamicQuery dynamicQuery();
067
068 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
069 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
070
071
074 @Override
075 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
076 throws PortalException;
077
078 @Override
079 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
081 throws PortalException;
082
083
089 @Indexable(type = IndexableType.REINDEX)
090 public UserNotificationEvent addUserNotificationEvent(
091 UserNotificationEvent userNotificationEvent);
092
093 public UserNotificationEvent addUserNotificationEvent(long userId,
094 boolean actionRequired, NotificationEvent notificationEvent)
095 throws PortalException;
096
097 public UserNotificationEvent addUserNotificationEvent(long userId,
098 NotificationEvent notificationEvent) throws PortalException;
099
100 public UserNotificationEvent addUserNotificationEvent(long userId,
101 java.lang.String type, long timestamp, int deliveryType,
102 long deliverBy, java.lang.String payload, boolean actionRequired,
103 boolean archived, ServiceContext serviceContext)
104 throws PortalException;
105
106 public UserNotificationEvent addUserNotificationEvent(long userId,
107 java.lang.String type, long timestamp, int deliveryType,
108 long deliverBy, java.lang.String payload, boolean archived,
109 ServiceContext serviceContext) throws PortalException;
110
111
115 @java.lang.Deprecated
116 public UserNotificationEvent addUserNotificationEvent(long userId,
117 java.lang.String type, long timestamp, long deliverBy,
118 java.lang.String payload, boolean archived,
119 ServiceContext serviceContext) throws PortalException;
120
121
127 public UserNotificationEvent createUserNotificationEvent(
128 long userNotificationEventId);
129
130
136 @Indexable(type = IndexableType.DELETE)
137 public UserNotificationEvent deleteUserNotificationEvent(
138 UserNotificationEvent userNotificationEvent);
139
140
147 @Indexable(type = IndexableType.DELETE)
148 public UserNotificationEvent deleteUserNotificationEvent(
149 long userNotificationEventId) throws PortalException;
150
151 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152 public UserNotificationEvent fetchUserNotificationEvent(
153 long userNotificationEventId);
154
155
162 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163 public UserNotificationEvent fetchUserNotificationEventByUuidAndCompanyId(
164 java.lang.String uuid, long companyId);
165
166
173 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174 public UserNotificationEvent getUserNotificationEvent(
175 long userNotificationEventId) throws PortalException;
176
177
185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186 public UserNotificationEvent getUserNotificationEventByUuidAndCompanyId(
187 java.lang.String uuid, long companyId) throws PortalException;
188
189 public UserNotificationEvent sendUserNotificationEvents(long userId,
190 java.lang.String portletId, int deliveryType, boolean actionRequired,
191 JSONObject notificationEventJSONObject) throws PortalException;
192
193 public UserNotificationEvent sendUserNotificationEvents(long userId,
194 java.lang.String portletId, int deliveryType,
195 JSONObject notificationEventJSONObject) throws PortalException;
196
197
203 @Indexable(type = IndexableType.REINDEX)
204 public UserNotificationEvent updateUserNotificationEvent(
205 UserNotificationEvent userNotificationEvent);
206
207 public UserNotificationEvent updateUserNotificationEvent(
208 java.lang.String uuid, long companyId, boolean archive);
209
210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211 public int getArchivedUserNotificationEventsCount(long userId,
212 boolean actionRequired, boolean archived);
213
214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215 public int getArchivedUserNotificationEventsCount(long userId,
216 boolean archived);
217
218 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219 public int getArchivedUserNotificationEventsCount(long userId,
220 int deliveryType, boolean actionRequired, boolean archived);
221
222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223 public int getArchivedUserNotificationEventsCount(long userId,
224 int deliveryType, boolean archived);
225
226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227 public int getDeliveredUserNotificationEventsCount(long userId,
228 boolean delivered);
229
230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231 public int getDeliveredUserNotificationEventsCount(long userId,
232 boolean delivered, boolean actionRequired);
233
234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235 public int getDeliveredUserNotificationEventsCount(long userId,
236 int deliveryType, boolean delivered);
237
238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239 public int getDeliveredUserNotificationEventsCount(long userId,
240 int deliveryType, boolean delivered, boolean actionRequired);
241
242
247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248 public int getUserNotificationEventsCount();
249
250 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251 public int getUserNotificationEventsCount(long userId);
252
253 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254 public int getUserNotificationEventsCount(long userId, int deliveryType);
255
256 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257 public int getUserNotificationEventsCount(long userId,
258 java.lang.String type, int deliveryType, boolean archived);
259
260
265 public java.lang.String getOSGiServiceIdentifier();
266
267 public List<UserNotificationEvent> addUserNotificationEvents(long userId,
268 Collection<NotificationEvent> notificationEvents)
269 throws PortalException;
270
271
277 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
278
279
291 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
292 int end);
293
294
307 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
308 int end, OrderByComparator<T> orderByComparator);
309
310 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
312 long userId, boolean actionRequired, boolean archived);
313
314 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
316 long userId, boolean actionRequired, boolean archived, int start,
317 int end);
318
319 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
321 long userId, boolean archived);
322
323 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
325 long userId, boolean archived, int start, int end);
326
327 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
329 long userId, int deliveryType, boolean actionRequired, boolean archived);
330
331 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
333 long userId, int deliveryType, boolean actionRequired,
334 boolean archived, int start, int end);
335
336 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
337 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
338 long userId, int deliveryType, boolean archived);
339
340 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341 public List<UserNotificationEvent> getArchivedUserNotificationEvents(
342 long userId, int deliveryType, boolean archived, int start, int end);
343
344 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
346 long userId, boolean delivered);
347
348 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
350 long userId, boolean delivered, boolean actionRequired);
351
352 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
354 long userId, boolean delivered, boolean actionRequired, int start,
355 int end);
356
357 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
359 long userId, boolean delivered, int start, int end);
360
361 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
362 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
363 long userId, int deliveryType, boolean delivered);
364
365 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
366 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
367 long userId, int deliveryType, boolean delivered, boolean actionRequired);
368
369 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
371 long userId, int deliveryType, boolean delivered,
372 boolean actionRequired, int start, int end);
373
374 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
375 public List<UserNotificationEvent> getDeliveredUserNotificationEvents(
376 long userId, int deliveryType, boolean delivered, int start, int end);
377
378 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379 public List<UserNotificationEvent> getTypeNotificationEvents(
380 java.lang.String type);
381
382
393 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
394 public List<UserNotificationEvent> getUserNotificationEvents(int start,
395 int end);
396
397 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398 public List<UserNotificationEvent> getUserNotificationEvents(long userId);
399
400 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401 public List<UserNotificationEvent> getUserNotificationEvents(long userId,
402 int deliveryType);
403
404 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405 public List<UserNotificationEvent> getUserNotificationEvents(long userId,
406 int deliveryType, int start, int end);
407
408 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
409 public List<UserNotificationEvent> getUserNotificationEvents(long userId,
410 int start, int end);
411
412 public List<UserNotificationEvent> updateUserNotificationEvents(
413 Collection<java.lang.String> uuids, long companyId, boolean archive);
414
415
421 public long dynamicQueryCount(DynamicQuery dynamicQuery);
422
423
430 public long dynamicQueryCount(DynamicQuery dynamicQuery,
431 Projection projection);
432
433 public void deleteUserNotificationEvent(java.lang.String uuid,
434 long companyId);
435
436 public void deleteUserNotificationEvents(
437 Collection<java.lang.String> uuids, long companyId);
438 }