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            /**
373            * Returns the message-boards message with the primary key.
374            *
375            * @param messageId the primary key of the message-boards message
376            * @return the message-boards message
377            * @throws PortalException if a message-boards message with the primary key could not be found
378            */
379            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
380            public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
381                    long messageId) throws PortalException;
382    
383            /**
384            * Returns the message-boards message matching the UUID and group.
385            *
386            * @param uuid the message-boards message's UUID
387            * @param groupId the primary key of the group
388            * @return the matching message-boards message
389            * @throws PortalException if a matching message-boards message could not be found
390            */
391            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
392            public com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
393                    java.lang.String uuid, long groupId) throws PortalException;
394    
395            /**
396            * Returns a range of all the message-boards messages.
397            *
398            * <p>
399            * 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.
400            * </p>
401            *
402            * @param start the lower bound of the range of message-boards messages
403            * @param end the upper bound of the range of message-boards messages (not inclusive)
404            * @return the range of message-boards messages
405            */
406            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
407            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
408                    int start, int end);
409    
410            /**
411            * Returns all the message-boards messages matching the UUID and company.
412            *
413            * @param uuid the UUID of the message-boards messages
414            * @param companyId the primary key of the company
415            * @return the matching message-boards messages, or an empty list if no matches were found
416            */
417            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
418            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
419                    java.lang.String uuid, long companyId);
420    
421            /**
422            * Returns a range of message-boards messages matching the UUID and company.
423            *
424            * @param uuid the UUID of the message-boards messages
425            * @param companyId the primary key of the company
426            * @param start the lower bound of the range of message-boards messages
427            * @param end the upper bound of the range of message-boards messages (not inclusive)
428            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
429            * @return the range of matching message-boards messages, or an empty list if no matches were found
430            */
431            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
432            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
433                    java.lang.String uuid, long companyId, int start, int end,
434                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator);
435    
436            /**
437            * Returns the number of message-boards messages.
438            *
439            * @return the number of message-boards messages
440            */
441            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
442            public int getMBMessagesCount();
443    
444            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
445            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
446                    long messageId) throws PortalException;
447    
448            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
449            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
450                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
451                    int status, java.lang.String threadView, boolean includePrevAndNext)
452                    throws PortalException;
453    
454            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
455            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
456                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
457                    int status, java.lang.String threadView, boolean includePrevAndNext,
458                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
459                    throws PortalException;
460    
461            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
462            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
463                    long userId, long messageId, int status, java.lang.String threadView,
464                    boolean includePrevAndNext) throws PortalException;
465    
466            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
467            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
468                    java.lang.String className, long classPK, int status);
469    
470            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
471            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages();
472    
473            /**
474            * Returns the OSGi service identifier.
475            *
476            * @return the OSGi service identifier
477            */
478            public java.lang.String getOSGiServiceIdentifier();
479    
480            @Override
481            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
482            public com.liferay.portal.model.PersistedModel getPersistedModel(
483                    java.io.Serializable primaryKeyObj) throws PortalException;
484    
485            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
486            public int getPositionInThread(long messageId) throws PortalException;
487    
488            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
489            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
490                    long threadId, int status);
491    
492            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
493            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
494                    long threadId, int status,
495                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator);
496    
497            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
498            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
499                    long threadId, int status, int start, int end);
500    
501            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
502            public int getThreadMessagesCount(long threadId, int status);
503    
504            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
505            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
506                    long threadId, int status, int start, int end);
507    
508            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
509            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
510                    long userId, java.lang.String className, long classPK, int status,
511                    int start, int end,
512                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
513    
514            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
515            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
516                    long userId, long classNameId, long classPK, int status, int start,
517                    int end,
518                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
519    
520            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
521            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
522                    long userId, long[] classNameIds, int status, int start, int end,
523                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
524    
525            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
526            public int getUserDiscussionMessagesCount(long userId,
527                    java.lang.String className, long classPK, int status);
528    
529            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
530            public int getUserDiscussionMessagesCount(long userId, long classNameId,
531                    long classPK, int status);
532    
533            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
534            public int getUserDiscussionMessagesCount(long userId, long[] classNameIds,
535                    int status);
536    
537            public long moveMessageAttachmentToTrash(long userId, long messageId,
538                    java.lang.String fileName) throws PortalException;
539    
540            public void restoreMessageAttachmentFromTrash(long userId, long messageId,
541                    java.lang.String deletedFileName) throws PortalException;
542    
543            public void subscribeMessage(long userId, long messageId)
544                    throws PortalException;
545    
546            public void unsubscribeMessage(long userId, long messageId)
547                    throws PortalException;
548    
549            public void updateAnswer(
550                    com.liferay.portlet.messageboards.model.MBMessage message,
551                    boolean answer, boolean cascade) throws PortalException;
552    
553            public void updateAnswer(long messageId, boolean answer, boolean cascade)
554                    throws PortalException;
555    
556            public void updateAsset(long userId,
557                    com.liferay.portlet.messageboards.model.MBMessage message,
558                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
559                    long[] assetLinkEntryIds) throws PortalException;
560    
561            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
562                    long userId, long messageId, java.lang.String className, long classPK,
563                    java.lang.String subject, java.lang.String body,
564                    com.liferay.portal.service.ServiceContext serviceContext)
565                    throws PortalException;
566    
567            /**
568            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
569            *
570            * @param mbMessage the message-boards message
571            * @return the message-boards message that was updated
572            */
573            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
574            public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
575                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
576    
577            /**
578            * @deprecated As of 7.0.0, with no direct replacement
579            */
580            @java.lang.Deprecated
581            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
582                    long messageId, java.lang.String body) throws PortalException;
583    
584            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
585                    long userId, long messageId, java.lang.String body,
586                    com.liferay.portal.service.ServiceContext serviceContext)
587                    throws PortalException;
588    
589            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
590                    long userId, long messageId, java.lang.String subject,
591                    java.lang.String body,
592                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
593                    java.util.List<java.lang.String> existingFiles, double priority,
594                    boolean allowPingbacks,
595                    com.liferay.portal.service.ServiceContext serviceContext)
596                    throws PortalException;
597    
598            /**
599            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
600            int, ServiceContext, Map)}
601            */
602            @java.lang.Deprecated
603            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
604                    long userId, long messageId, int status,
605                    com.liferay.portal.service.ServiceContext serviceContext)
606                    throws PortalException;
607    
608            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
609                    long userId, long messageId, int status,
610                    com.liferay.portal.service.ServiceContext serviceContext,
611                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
612                    throws PortalException;
613    
614            public void updateUserName(long userId, java.lang.String userName);
615    }