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, java.lang.String threadView, boolean includePrevAndNext)
455                    throws PortalException;
456    
457            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
458            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
459                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
460                    int status, java.lang.String threadView, boolean includePrevAndNext,
461                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
462                    throws PortalException;
463    
464            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
465            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
466                    long userId, long messageId, int status, java.lang.String threadView,
467                    boolean includePrevAndNext) throws PortalException;
468    
469            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
470            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
471                    java.lang.String className, long classPK, int status);
472    
473            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
474            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages();
475    
476            /**
477            * Returns the OSGi service identifier.
478            *
479            * @return the OSGi service identifier
480            */
481            public java.lang.String getOSGiServiceIdentifier();
482    
483            @Override
484            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
485            public com.liferay.portal.model.PersistedModel getPersistedModel(
486                    java.io.Serializable primaryKeyObj) throws PortalException;
487    
488            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
489            public int getPositionInThread(long messageId) throws PortalException;
490    
491            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
492            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
493                    long threadId, int status);
494    
495            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
496            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
497                    long threadId, int status,
498                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator);
499    
500            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
501            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
502                    long threadId, int status, int start, int end);
503    
504            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
505            public int getThreadMessagesCount(long threadId, int status);
506    
507            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
508            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
509                    long threadId, int status, int start, int end);
510    
511            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
512            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
513                    long userId, java.lang.String className, long classPK, int status,
514                    int start, int end,
515                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
516    
517            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
518            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
519                    long userId, long classNameId, long classPK, int status, int start,
520                    int end,
521                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
522    
523            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
524            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
525                    long userId, long[] classNameIds, int status, int start, int end,
526                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
527    
528            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
529            public int getUserDiscussionMessagesCount(long userId,
530                    java.lang.String className, long classPK, int status);
531    
532            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
533            public int getUserDiscussionMessagesCount(long userId, long classNameId,
534                    long classPK, int status);
535    
536            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
537            public int getUserDiscussionMessagesCount(long userId, long[] classNameIds,
538                    int status);
539    
540            public long moveMessageAttachmentToTrash(long userId, long messageId,
541                    java.lang.String fileName) throws PortalException;
542    
543            public void restoreMessageAttachmentFromTrash(long userId, long messageId,
544                    java.lang.String deletedFileName) throws PortalException;
545    
546            public void subscribeMessage(long userId, long messageId)
547                    throws PortalException;
548    
549            public void unsubscribeMessage(long userId, long messageId)
550                    throws PortalException;
551    
552            public void updateAnswer(
553                    com.liferay.portlet.messageboards.model.MBMessage message,
554                    boolean answer, boolean cascade) throws PortalException;
555    
556            public void updateAnswer(long messageId, boolean answer, boolean cascade)
557                    throws PortalException;
558    
559            public void updateAsset(long userId,
560                    com.liferay.portlet.messageboards.model.MBMessage message,
561                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
562                    long[] assetLinkEntryIds) throws PortalException;
563    
564            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
565                    long userId, long messageId, java.lang.String className, long classPK,
566                    java.lang.String subject, java.lang.String body,
567                    com.liferay.portal.service.ServiceContext serviceContext)
568                    throws PortalException;
569    
570            /**
571            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
572            *
573            * @param mbMessage the message-boards message
574            * @return the message-boards message that was updated
575            */
576            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
577            public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
578                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
579    
580            /**
581            * @deprecated As of 7.0.0, with no direct replacement
582            */
583            @java.lang.Deprecated
584            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
585                    long messageId, java.lang.String body) throws PortalException;
586    
587            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
588                    long userId, long messageId, java.lang.String body,
589                    com.liferay.portal.service.ServiceContext serviceContext)
590                    throws PortalException;
591    
592            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
593                    long userId, long messageId, java.lang.String subject,
594                    java.lang.String body,
595                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
596                    java.util.List<java.lang.String> existingFiles, double priority,
597                    boolean allowPingbacks,
598                    com.liferay.portal.service.ServiceContext serviceContext)
599                    throws PortalException;
600    
601            /**
602            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
603            int, ServiceContext, Map)}
604            */
605            @java.lang.Deprecated
606            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
607                    long userId, long messageId, int status,
608                    com.liferay.portal.service.ServiceContext serviceContext)
609                    throws PortalException;
610    
611            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
612                    long userId, long messageId, int status,
613                    com.liferay.portal.service.ServiceContext serviceContext,
614                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
615                    throws PortalException;
616    
617            public void updateUserName(long userId, java.lang.String userName);
618    }