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.portlet.messageboards.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    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for MBMessage. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBMessageLocalServiceUtil
037     * @see com.liferay.portlet.messageboards.service.base.MBMessageLocalServiceBaseImpl
038     * @see com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface MBMessageLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link MBMessageLocalServiceUtil} to access the message-boards message local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
052                    long userId, java.lang.String userName, long groupId,
053                    java.lang.String className, long classPK, long threadId,
054                    long parentMessageId, java.lang.String subject, java.lang.String body,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws PortalException;
057    
058            public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
059                    long userId, java.lang.String userName, long groupId,
060                    java.lang.String className, long classPK, int workflowAction)
061                    throws PortalException;
062    
063            /**
064            * Adds the message-boards message to the database. Also notifies the appropriate model listeners.
065            *
066            * @param mbMessage the message-boards message
067            * @return the message-boards message that was added
068            */
069            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
070            public com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
071                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
072    
073            /**
074            * @deprecated As of 7.0.0, replaced by {@link #addMessage(long, String,
075            long, long, String, String, ServiceContext)}
076            */
077            @java.lang.Deprecated
078            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
079                    long userId, java.lang.String userName, long categoryId,
080                    java.lang.String subject, java.lang.String body,
081                    com.liferay.portal.service.ServiceContext serviceContext)
082                    throws PortalException;
083    
084            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
085                    long userId, java.lang.String userName, long groupId, long categoryId,
086                    java.lang.String subject, java.lang.String body,
087                    java.lang.String format, java.lang.String fileName, java.io.File file,
088                    boolean anonymous, double priority, boolean allowPingbacks,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws PortalException, java.io.FileNotFoundException;
091    
092            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
093                    long userId, java.lang.String userName, long groupId, long categoryId,
094                    java.lang.String subject, java.lang.String body,
095                    java.lang.String format,
096                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
097                    boolean anonymous, double priority, boolean allowPingbacks,
098                    com.liferay.portal.service.ServiceContext serviceContext)
099                    throws PortalException;
100    
101            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
102                    long userId, java.lang.String userName, long groupId, long categoryId,
103                    java.lang.String subject, java.lang.String body,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws PortalException;
106    
107            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
108                    long userId, java.lang.String userName, long groupId, long categoryId,
109                    long threadId, long parentMessageId, java.lang.String subject,
110                    java.lang.String body, java.lang.String format,
111                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
112                    boolean anonymous, double priority, boolean allowPingbacks,
113                    com.liferay.portal.service.ServiceContext serviceContext)
114                    throws PortalException;
115    
116            public void addMessageAttachment(long userId, long messageId,
117                    java.lang.String fileName, java.io.File file, java.lang.String mimeType)
118                    throws PortalException;
119    
120            public void addMessageResources(
121                    com.liferay.portlet.messageboards.model.MBMessage message,
122                    boolean addGroupPermissions, boolean addGuestPermissions)
123                    throws PortalException;
124    
125            public void addMessageResources(
126                    com.liferay.portlet.messageboards.model.MBMessage message,
127                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
128                    throws PortalException;
129    
130            public void addMessageResources(long messageId,
131                    boolean addGroupPermissions, boolean addGuestPermissions)
132                    throws PortalException;
133    
134            public void addMessageResources(long messageId,
135                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
136                    throws PortalException;
137    
138            /**
139            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
140            *
141            * @param messageId the primary key for the new message-boards message
142            * @return the new message-boards message
143            */
144            public com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
145                    long messageId);
146    
147            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
148            public com.liferay.portlet.messageboards.model.MBMessage deleteDiscussionMessage(
149                    long messageId) throws PortalException;
150    
151            public void deleteDiscussionMessages(java.lang.String className,
152                    long classPK) throws PortalException;
153    
154            /**
155            * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
156            *
157            * @param mbMessage the message-boards message
158            * @return the message-boards message that was removed
159            */
160            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
161            public com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
162                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
163    
164            /**
165            * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
166            *
167            * @param messageId the primary key of the message-boards message
168            * @return the message-boards message that was removed
169            * @throws PortalException if a message-boards message with the primary key could not be found
170            */
171            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
172            public com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
173                    long messageId) throws PortalException;
174    
175            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
176            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
177            public com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
178                    com.liferay.portlet.messageboards.model.MBMessage message)
179                    throws PortalException;
180    
181            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
182            public com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
183                    long messageId) throws PortalException;
184    
185            public void deleteMessageAttachment(long messageId,
186                    java.lang.String fileName) throws PortalException;
187    
188            public void deleteMessageAttachments(long messageId)
189                    throws PortalException;
190    
191            /**
192            * @throws PortalException
193            */
194            @Override
195            public com.liferay.portal.model.PersistedModel deletePersistedModel(
196                    com.liferay.portal.model.PersistedModel persistedModel)
197                    throws PortalException;
198    
199            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
200    
201            /**
202            * Performs a dynamic query on the database and returns the matching rows.
203            *
204            * @param dynamicQuery the dynamic query
205            * @return the matching rows
206            */
207            public <T> java.util.List<T> dynamicQuery(
208                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
209    
210            /**
211            * Performs a dynamic query on the database and returns a range of the matching rows.
212            *
213            * <p>
214            * 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.portlet.messageboards.model.impl.MBMessageModelImpl}. 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.
215            * </p>
216            *
217            * @param dynamicQuery the dynamic query
218            * @param start the lower bound of the range of model instances
219            * @param end the upper bound of the range of model instances (not inclusive)
220            * @return the range of matching rows
221            */
222            public <T> java.util.List<T> dynamicQuery(
223                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
224                    int end);
225    
226            /**
227            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
228            *
229            * <p>
230            * 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.portlet.messageboards.model.impl.MBMessageModelImpl}. 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.
231            * </p>
232            *
233            * @param dynamicQuery the dynamic query
234            * @param start the lower bound of the range of model instances
235            * @param end the upper bound of the range of model instances (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching rows
238            */
239            public <T> java.util.List<T> dynamicQuery(
240                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
241                    int end,
242                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
243    
244            /**
245            * Returns the number of rows matching the dynamic query.
246            *
247            * @param dynamicQuery the dynamic query
248            * @return the number of rows matching the dynamic query
249            */
250            public long dynamicQueryCount(
251                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
252    
253            /**
254            * Returns the number of rows matching the dynamic query.
255            *
256            * @param dynamicQuery the dynamic query
257            * @param projection the projection to apply to the query
258            * @return the number of rows matching the dynamic query
259            */
260            public long dynamicQueryCount(
261                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
262                    com.liferay.portal.kernel.dao.orm.Projection projection);
263    
264            public void emptyMessageAttachments(long messageId)
265                    throws PortalException;
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public com.liferay.portlet.messageboards.model.MBMessage fetchMBMessage(
269                    long messageId);
270    
271            /**
272            * Returns the message-boards message matching the UUID and group.
273            *
274            * @param uuid the message-boards message's UUID
275            * @param groupId the primary key of the group
276            * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
277            */
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public com.liferay.portlet.messageboards.model.MBMessage fetchMBMessageByUuidAndGroupId(
280                    java.lang.String uuid, long groupId);
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
287                    long groupId, long categoryId, int status, int start, int end);
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
291                    long groupId, long categoryId, int status, int start, int end,
292                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public int getCategoryMessagesCount(long groupId, long categoryId,
296                    int status);
297    
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
300                    long companyId, int status, int start, int end);
301    
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
304                    long companyId, int status, int start, int end,
305                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public int getCompanyMessagesCount(long companyId, int status);
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
312                    long userId, long groupId, java.lang.String className, long classPK,
313                    int status) throws PortalException;
314    
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
317                    long userId, long groupId, java.lang.String className, long classPK,
318                    int status,
319                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
320                    throws PortalException;
321    
322            /**
323            * @deprecated As of 7.0.0, replaced by {@link
324            #getDiscussionMessageDisplay(long, long, String, long, int)}
325            */
326            @java.lang.Deprecated
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
329                    long userId, long groupId, java.lang.String className, long classPK,
330                    int status, java.lang.String threadView) throws PortalException;
331    
332            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333            public int getDiscussionMessagesCount(java.lang.String className,
334                    long classPK, int status);
335    
336            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
337            public int getDiscussionMessagesCount(long classNameId, long classPK,
338                    int status);
339    
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
342                    java.lang.String className);
343    
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
346                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
347    
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
350                    long groupId, int status, int start, int end);
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
354                    long groupId, int status, int start, int end,
355                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
356    
357            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
359                    long groupId, long userId, int status, int start, int end);
360    
361            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
362            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
363                    long groupId, long userId, int status, int start, int end,
364                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
365    
366            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367            public int getGroupMessagesCount(long groupId, int status);
368    
369            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370            public int getGroupMessagesCount(long groupId, long userId, int status);
371    
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
374    
375            /**
376            * Returns the message-boards message with the primary key.
377            *
378            * @param messageId the primary key of the message-boards message
379            * @return the message-boards message
380            * @throws PortalException if a message-boards message with the primary key could not be found
381            */
382            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
383            public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
384                    long messageId) throws PortalException;
385    
386            /**
387            * Returns the message-boards message matching the UUID and group.
388            *
389            * @param uuid the message-boards message's UUID
390            * @param groupId the primary key of the group
391            * @return the matching message-boards message
392            * @throws PortalException if a matching message-boards message could not be found
393            */
394            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
395            public com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
396                    java.lang.String uuid, long groupId) throws PortalException;
397    
398            /**
399            * Returns a range of all the message-boards messages.
400            *
401            * <p>
402            * 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.portlet.messageboards.model.impl.MBMessageModelImpl}. 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.
403            * </p>
404            *
405            * @param start the lower bound of the range of message-boards messages
406            * @param end the upper bound of the range of message-boards messages (not inclusive)
407            * @return the range of message-boards messages
408            */
409            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
410            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
411                    int start, int end);
412    
413            /**
414            * Returns all the message-boards messages matching the UUID and company.
415            *
416            * @param uuid the UUID of the message-boards messages
417            * @param companyId the primary key of the company
418            * @return the matching message-boards messages, or an empty list if no matches were found
419            */
420            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
421            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
422                    java.lang.String uuid, long companyId);
423    
424            /**
425            * Returns a range of message-boards messages matching the UUID and company.
426            *
427            * @param uuid the UUID of the message-boards messages
428            * @param companyId the primary key of the company
429            * @param start the lower bound of the range of message-boards messages
430            * @param end the upper bound of the range of message-boards messages (not inclusive)
431            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
432            * @return the range of matching message-boards messages, or an empty list if no matches were found
433            */
434            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
435            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
436                    java.lang.String uuid, long companyId, int start, int end,
437                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator);
438    
439            /**
440            * Returns the number of message-boards messages.
441            *
442            * @return the number of message-boards messages
443            */
444            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
445            public int getMBMessagesCount();
446    
447            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
448            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
449                    long messageId) throws PortalException;
450    
451            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
452            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
453                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
454                    int status, boolean includePrevAndNext) throws PortalException;
455    
456            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
457            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
458                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
459                    int status, boolean includePrevAndNext,
460                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
461                    throws PortalException;
462    
463            /**
464            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long,
465            MBMessage, int, boolean)}
466            */
467            @java.lang.Deprecated
468            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
469            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
470                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
471                    int status, java.lang.String threadView, boolean includePrevAndNext)
472                    throws PortalException;
473    
474            /**
475            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long,
476            MBMessage, int, boolean, Comparator)} (
477            */
478            @java.lang.Deprecated
479            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
480            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
481                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
482                    int status, java.lang.String threadView, boolean includePrevAndNext,
483                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
484                    throws PortalException;
485    
486            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
487            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
488                    long userId, long messageId, int status, boolean includePrevAndNext)
489                    throws PortalException;
490    
491            /**
492            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long,
493            long, int, boolean)}
494            */
495            @java.lang.Deprecated
496            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
497            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
498                    long userId, long messageId, int status, java.lang.String threadView,
499                    boolean includePrevAndNext) throws PortalException;
500    
501            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
502            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
503                    java.lang.String className, long classPK, int status);
504    
505            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
506            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages();
507    
508            /**
509            * Returns the OSGi service identifier.
510            *
511            * @return the OSGi service identifier
512            */
513            public java.lang.String getOSGiServiceIdentifier();
514    
515            @Override
516            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
517            public com.liferay.portal.model.PersistedModel getPersistedModel(
518                    java.io.Serializable primaryKeyObj) throws PortalException;
519    
520            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
521            public int getPositionInThread(long messageId) throws PortalException;
522    
523            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
524            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
525                    long threadId, int status);
526    
527            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
528            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
529                    long threadId, int status,
530                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator);
531    
532            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
533            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
534                    long threadId, int status, int start, int end);
535    
536            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
537            public int getThreadMessagesCount(long threadId, int status);
538    
539            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
540            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
541                    long threadId, int status, int start, int end);
542    
543            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
544            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
545                    long userId, java.lang.String className, long classPK, int status,
546                    int start, int end,
547                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
548    
549            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
550            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
551                    long userId, long classNameId, long classPK, int status, int start,
552                    int end,
553                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
554    
555            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
556            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
557                    long userId, long[] classNameIds, int status, int start, int end,
558                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
559    
560            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
561            public int getUserDiscussionMessagesCount(long userId,
562                    java.lang.String className, long classPK, int status);
563    
564            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
565            public int getUserDiscussionMessagesCount(long userId, long classNameId,
566                    long classPK, int status);
567    
568            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
569            public int getUserDiscussionMessagesCount(long userId, long[] classNameIds,
570                    int status);
571    
572            public long moveMessageAttachmentToTrash(long userId, long messageId,
573                    java.lang.String fileName) throws PortalException;
574    
575            public void restoreMessageAttachmentFromTrash(long userId, long messageId,
576                    java.lang.String deletedFileName) throws PortalException;
577    
578            public void subscribeMessage(long userId, long messageId)
579                    throws PortalException;
580    
581            public void unsubscribeMessage(long userId, long messageId)
582                    throws PortalException;
583    
584            public void updateAnswer(
585                    com.liferay.portlet.messageboards.model.MBMessage message,
586                    boolean answer, boolean cascade) throws PortalException;
587    
588            public void updateAnswer(long messageId, boolean answer, boolean cascade)
589                    throws PortalException;
590    
591            public void updateAsset(long userId,
592                    com.liferay.portlet.messageboards.model.MBMessage message,
593                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
594                    long[] assetLinkEntryIds) throws PortalException;
595    
596            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
597                    long userId, long messageId, java.lang.String className, long classPK,
598                    java.lang.String subject, java.lang.String body,
599                    com.liferay.portal.service.ServiceContext serviceContext)
600                    throws PortalException;
601    
602            /**
603            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
604            *
605            * @param mbMessage the message-boards message
606            * @return the message-boards message that was updated
607            */
608            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
609            public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
610                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
611    
612            /**
613            * @deprecated As of 7.0.0, with no direct replacement
614            */
615            @java.lang.Deprecated
616            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
617                    long messageId, java.lang.String body) throws PortalException;
618    
619            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
620                    long userId, long messageId, java.lang.String body,
621                    com.liferay.portal.service.ServiceContext serviceContext)
622                    throws PortalException;
623    
624            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
625                    long userId, long messageId, java.lang.String subject,
626                    java.lang.String body,
627                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
628                    java.util.List<java.lang.String> existingFiles, double priority,
629                    boolean allowPingbacks,
630                    com.liferay.portal.service.ServiceContext serviceContext)
631                    throws PortalException;
632    
633            /**
634            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
635            int, ServiceContext, Map)}
636            */
637            @java.lang.Deprecated
638            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
639                    long userId, long messageId, int status,
640                    com.liferay.portal.service.ServiceContext serviceContext)
641                    throws PortalException;
642    
643            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
644                    long userId, long messageId, int status,
645                    com.liferay.portal.service.ServiceContext serviceContext,
646                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
647                    throws PortalException;
648    
649            public void updateUserName(long userId, java.lang.String userName);
650    }