001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for UserNotificationEvent. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see UserNotificationEventLocalServiceUtil
034     * @see com.liferay.portal.service.base.UserNotificationEventLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.UserNotificationEventLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface UserNotificationEventLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link UserNotificationEventLocalServiceUtil} to access the user notification event local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserNotificationEventLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048            public com.liferay.portal.model.UserNotificationEvent addUserNotificationEvent(
049                    long userId, boolean actionRequired,
050                    com.liferay.portal.kernel.notifications.NotificationEvent notificationEvent)
051                    throws PortalException;
052    
053            public com.liferay.portal.model.UserNotificationEvent addUserNotificationEvent(
054                    long userId,
055                    com.liferay.portal.kernel.notifications.NotificationEvent notificationEvent)
056                    throws PortalException;
057    
058            /**
059            * @deprecated As of 7.0.0 {@link #addUserNotificationEvent(long, String,
060            long, int, long, String, boolean, ServiceContext)}
061            */
062            @java.lang.Deprecated
063            public com.liferay.portal.model.UserNotificationEvent addUserNotificationEvent(
064                    long userId, java.lang.String type, long timestamp, long deliverBy,
065                    java.lang.String payload, boolean archived,
066                    com.liferay.portal.service.ServiceContext serviceContext)
067                    throws PortalException;
068    
069            public com.liferay.portal.model.UserNotificationEvent addUserNotificationEvent(
070                    long userId, java.lang.String type, long timestamp, int deliveryType,
071                    long deliverBy, java.lang.String payload, boolean actionRequired,
072                    boolean archived,
073                    com.liferay.portal.service.ServiceContext serviceContext)
074                    throws PortalException;
075    
076            public com.liferay.portal.model.UserNotificationEvent addUserNotificationEvent(
077                    long userId, java.lang.String type, long timestamp, int deliveryType,
078                    long deliverBy, java.lang.String payload, boolean archived,
079                    com.liferay.portal.service.ServiceContext serviceContext)
080                    throws PortalException;
081    
082            /**
083            * Adds the user notification event to the database. Also notifies the appropriate model listeners.
084            *
085            * @param userNotificationEvent the user notification event
086            * @return the user notification event that was added
087            */
088            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
089            public com.liferay.portal.model.UserNotificationEvent addUserNotificationEvent(
090                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent);
091    
092            public java.util.List<com.liferay.portal.model.UserNotificationEvent> addUserNotificationEvents(
093                    long userId,
094                    java.util.Collection<com.liferay.portal.kernel.notifications.NotificationEvent> notificationEvents)
095                    throws PortalException;
096    
097            /**
098            * Creates a new user notification event with the primary key. Does not add the user notification event to the database.
099            *
100            * @param userNotificationEventId the primary key for the new user notification event
101            * @return the new user notification event
102            */
103            public com.liferay.portal.model.UserNotificationEvent createUserNotificationEvent(
104                    long userNotificationEventId);
105    
106            /**
107            * @throws PortalException
108            */
109            @Override
110            public com.liferay.portal.model.PersistedModel deletePersistedModel(
111                    com.liferay.portal.model.PersistedModel persistedModel)
112                    throws PortalException;
113    
114            /**
115            * Deletes the user notification event from the database. Also notifies the appropriate model listeners.
116            *
117            * @param userNotificationEvent the user notification event
118            * @return the user notification event that was removed
119            */
120            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
121            public com.liferay.portal.model.UserNotificationEvent deleteUserNotificationEvent(
122                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent);
123    
124            /**
125            * Deletes the user notification event with the primary key from the database. Also notifies the appropriate model listeners.
126            *
127            * @param userNotificationEventId the primary key of the user notification event
128            * @return the user notification event that was removed
129            * @throws PortalException if a user notification event with the primary key could not be found
130            */
131            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
132            public com.liferay.portal.model.UserNotificationEvent deleteUserNotificationEvent(
133                    long userNotificationEventId) throws PortalException;
134    
135            public void deleteUserNotificationEvent(java.lang.String uuid,
136                    long companyId);
137    
138            public void deleteUserNotificationEvents(
139                    java.util.Collection<java.lang.String> uuids, long companyId);
140    
141            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
142    
143            /**
144            * Performs a dynamic query on the database and returns the matching rows.
145            *
146            * @param dynamicQuery the dynamic query
147            * @return the matching rows
148            */
149            public <T> java.util.List<T> dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
151    
152            /**
153            * Performs a dynamic query on the database and returns a range of the matching rows.
154            *
155            * <p>
156            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserNotificationEventModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
157            * </p>
158            *
159            * @param dynamicQuery the dynamic query
160            * @param start the lower bound of the range of model instances
161            * @param end the upper bound of the range of model instances (not inclusive)
162            * @return the range of matching rows
163            */
164            public <T> java.util.List<T> dynamicQuery(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
166                    int end);
167    
168            /**
169            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
170            *
171            * <p>
172            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserNotificationEventModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
173            * </p>
174            *
175            * @param dynamicQuery the dynamic query
176            * @param start the lower bound of the range of model instances
177            * @param end the upper bound of the range of model instances (not inclusive)
178            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
179            * @return the ordered range of matching rows
180            */
181            public <T> java.util.List<T> dynamicQuery(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
183                    int end,
184                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
185    
186            /**
187            * Returns the number of rows matching the dynamic query.
188            *
189            * @param dynamicQuery the dynamic query
190            * @return the number of rows matching the dynamic query
191            */
192            public long dynamicQueryCount(
193                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
194    
195            /**
196            * Returns the number of rows matching the dynamic query.
197            *
198            * @param dynamicQuery the dynamic query
199            * @param projection the projection to apply to the query
200            * @return the number of rows matching the dynamic query
201            */
202            public long dynamicQueryCount(
203                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
204                    com.liferay.portal.kernel.dao.orm.Projection projection);
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public com.liferay.portal.model.UserNotificationEvent fetchUserNotificationEvent(
208                    long userNotificationEventId);
209    
210            /**
211            * Returns the user notification event with the matching UUID and company.
212            *
213            * @param uuid the user notification event's UUID
214            * @param companyId the primary key of the company
215            * @return the matching user notification event, or <code>null</code> if a matching user notification event could not be found
216            */
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public com.liferay.portal.model.UserNotificationEvent fetchUserNotificationEventByUuidAndCompanyId(
219                    java.lang.String uuid, long companyId);
220    
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
223    
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
226                    long userId, boolean actionRequired, boolean archived);
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
230                    long userId, boolean actionRequired, boolean archived, int start,
231                    int end);
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
235                    long userId, boolean archived);
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
239                    long userId, boolean archived, int start, int end);
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
243                    long userId, int deliveryType, boolean actionRequired, boolean archived);
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
247                    long userId, int deliveryType, boolean actionRequired,
248                    boolean archived, int start, int end);
249    
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
252                    long userId, int deliveryType, boolean archived);
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getArchivedUserNotificationEvents(
256                    long userId, int deliveryType, boolean archived, int start, int end);
257    
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public int getArchivedUserNotificationEventsCount(long userId,
260                    boolean actionRequired, boolean archived);
261    
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public int getArchivedUserNotificationEventsCount(long userId,
264                    boolean archived);
265    
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public int getArchivedUserNotificationEventsCount(long userId,
268                    int deliveryType, boolean actionRequired, boolean archived);
269    
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public int getArchivedUserNotificationEventsCount(long userId,
272                    int deliveryType, boolean archived);
273    
274            /**
275            * Returns the Spring bean ID for this bean.
276            *
277            * @return the Spring bean ID for this bean
278            */
279            public java.lang.String getBeanIdentifier();
280    
281            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
283                    long userId, boolean delivered);
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
287                    long userId, boolean delivered, boolean actionRequired);
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
291                    long userId, boolean delivered, boolean actionRequired, int start,
292                    int end);
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
296                    long userId, boolean delivered, int start, int end);
297    
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
300                    long userId, int deliveryType, boolean delivered);
301    
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
304                    long userId, int deliveryType, boolean delivered, boolean actionRequired);
305    
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
308                    long userId, int deliveryType, boolean delivered,
309                    boolean actionRequired, int start, int end);
310    
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getDeliveredUserNotificationEvents(
313                    long userId, int deliveryType, boolean delivered, int start, int end);
314    
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public int getDeliveredUserNotificationEventsCount(long userId,
317                    boolean delivered);
318    
319            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320            public int getDeliveredUserNotificationEventsCount(long userId,
321                    boolean delivered, boolean actionRequired);
322    
323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324            public int getDeliveredUserNotificationEventsCount(long userId,
325                    int deliveryType, boolean delivered);
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public int getDeliveredUserNotificationEventsCount(long userId,
329                    int deliveryType, boolean delivered, boolean actionRequired);
330    
331            @Override
332            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333            public com.liferay.portal.model.PersistedModel getPersistedModel(
334                    java.io.Serializable primaryKeyObj) throws PortalException;
335    
336            /**
337            * Returns the user notification event with the primary key.
338            *
339            * @param userNotificationEventId the primary key of the user notification event
340            * @return the user notification event
341            * @throws PortalException if a user notification event with the primary key could not be found
342            */
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public com.liferay.portal.model.UserNotificationEvent getUserNotificationEvent(
345                    long userNotificationEventId) throws PortalException;
346    
347            /**
348            * Returns the user notification event with the matching UUID and company.
349            *
350            * @param uuid the user notification event's UUID
351            * @param companyId the primary key of the company
352            * @return the matching user notification event
353            * @throws PortalException if a matching user notification event could not be found
354            */
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public com.liferay.portal.model.UserNotificationEvent getUserNotificationEventByUuidAndCompanyId(
357                    java.lang.String uuid, long companyId) throws PortalException;
358    
359            /**
360            * Returns a range of all the user notification events.
361            *
362            * <p>
363            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserNotificationEventModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
364            * </p>
365            *
366            * @param start the lower bound of the range of user notification events
367            * @param end the upper bound of the range of user notification events (not inclusive)
368            * @return the range of user notification events
369            */
370            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getUserNotificationEvents(
372                    int start, int end);
373    
374            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
375            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getUserNotificationEvents(
376                    long userId);
377    
378            /**
379            * @deprecated As of 6.2.0 {@link #getArchivedUserNotificationEvents(long,
380            boolean)}
381            */
382            @java.lang.Deprecated
383            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
384            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getUserNotificationEvents(
385                    long userId, boolean archived);
386    
387            /**
388            * @deprecated As of 6.2.0 {@link #getArchivedUserNotificationEvents(long,
389            boolean, int, int)}
390            */
391            @java.lang.Deprecated
392            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getUserNotificationEvents(
394                    long userId, boolean archived, int start, int end);
395    
396            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
397            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getUserNotificationEvents(
398                    long userId, int deliveryType);
399    
400            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getUserNotificationEvents(
402                    long userId, int deliveryType, int start, int end);
403    
404            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405            public java.util.List<com.liferay.portal.model.UserNotificationEvent> getUserNotificationEvents(
406                    long userId, int start, int end);
407    
408            /**
409            * Returns the number of user notification events.
410            *
411            * @return the number of user notification events
412            */
413            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
414            public int getUserNotificationEventsCount();
415    
416            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
417            public int getUserNotificationEventsCount(long userId);
418    
419            /**
420            * @deprecated As of 6.2.0 {@link
421            #getArchivedUserNotificationEventsCount(long, boolean)}
422            */
423            @java.lang.Deprecated
424            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
425            public int getUserNotificationEventsCount(long userId, boolean archived);
426    
427            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
428            public int getUserNotificationEventsCount(long userId, int deliveryType);
429    
430            public com.liferay.portal.model.UserNotificationEvent sendUserNotificationEvents(
431                    long userId, java.lang.String portletId, int deliveryType,
432                    boolean actionRequired,
433                    com.liferay.portal.kernel.json.JSONObject notificationEventJSONObject)
434                    throws PortalException;
435    
436            public com.liferay.portal.model.UserNotificationEvent sendUserNotificationEvents(
437                    long userId, java.lang.String portletId, int deliveryType,
438                    com.liferay.portal.kernel.json.JSONObject notificationEventJSONObject)
439                    throws PortalException;
440    
441            /**
442            * Sets the Spring bean ID for this bean.
443            *
444            * @param beanIdentifier the Spring bean ID for this bean
445            */
446            public void setBeanIdentifier(java.lang.String beanIdentifier);
447    
448            /**
449            * Updates the user notification event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
450            *
451            * @param userNotificationEvent the user notification event
452            * @return the user notification event that was updated
453            */
454            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
455            public com.liferay.portal.model.UserNotificationEvent updateUserNotificationEvent(
456                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent);
457    
458            public com.liferay.portal.model.UserNotificationEvent updateUserNotificationEvent(
459                    java.lang.String uuid, long companyId, boolean archive);
460    
461            public java.util.List<com.liferay.portal.model.UserNotificationEvent> updateUserNotificationEvents(
462                    java.util.Collection<java.lang.String> uuids, long companyId,
463                    boolean archive);
464    }