001    /**
002     * Copyright (c) 2000-2010 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 com.liferay.portal.kernel.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * <p>
025     * This interface defines the service. The default implementation is
026     * {@link
027     * com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl}.
028     * Modify methods in that class and rerun ServiceBuilder to populate this class
029     * and all other generated classes.
030     * </p>
031     *
032     * <p>
033     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
034     * </p>
035     *
036     * @author    Brian Wing Shun Chan
037     * @see       MBMessageLocalServiceUtil
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface MBMessageLocalService {
043            public com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
044                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
045                    throws com.liferay.portal.kernel.exception.SystemException;
046    
047            public com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
048                    long messageId);
049    
050            public void deleteMBMessage(long messageId)
051                    throws com.liferay.portal.kernel.exception.PortalException,
052                            com.liferay.portal.kernel.exception.SystemException;
053    
054            public void deleteMBMessage(
055                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
056                    throws com.liferay.portal.kernel.exception.SystemException;
057    
058            @SuppressWarnings("unchecked")
059            public java.util.List dynamicQuery(
060                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
061                    throws com.liferay.portal.kernel.exception.SystemException;
062    
063            @SuppressWarnings("unchecked")
064            public java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException;
067    
068            @SuppressWarnings("unchecked")
069            public java.util.List dynamicQuery(
070                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
071                    int end,
072                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
073                    throws com.liferay.portal.kernel.exception.SystemException;
074    
075            public long dynamicQueryCount(
076                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
077                    throws com.liferay.portal.kernel.exception.SystemException;
078    
079            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
080            public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
081                    long messageId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException;
084    
085            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
086            public com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
087                    java.lang.String uuid, long groupId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException;
090    
091            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
092            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
093                    int start, int end)
094                    throws com.liferay.portal.kernel.exception.SystemException;
095    
096            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
097            public int getMBMessagesCount()
098                    throws com.liferay.portal.kernel.exception.SystemException;
099    
100            public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
101                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
105                    com.liferay.portlet.messageboards.model.MBMessage mbMessage,
106                    boolean merge)
107                    throws com.liferay.portal.kernel.exception.SystemException;
108    
109            public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
110                    long userId, java.lang.String userName, long groupId,
111                    java.lang.String className, long classPK, int workflowAction)
112                    throws com.liferay.portal.kernel.exception.PortalException,
113                            com.liferay.portal.kernel.exception.SystemException;
114    
115            public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
116                    long userId, java.lang.String userName, long groupId,
117                    java.lang.String className, long classPK, long threadId,
118                    long parentMessageId, java.lang.String subject, java.lang.String body,
119                    com.liferay.portal.service.ServiceContext serviceContext)
120                    throws com.liferay.portal.kernel.exception.PortalException,
121                            com.liferay.portal.kernel.exception.SystemException;
122    
123            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
124                    long userId, java.lang.String userName, long groupId, long categoryId,
125                    long threadId, long parentMessageId, java.lang.String subject,
126                    java.lang.String body,
127                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
128                    boolean anonymous, double priority, boolean allowPingbacks,
129                    com.liferay.portal.service.ServiceContext serviceContext)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException;
132    
133            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
134                    long userId, java.lang.String userName, long groupId, long categoryId,
135                    java.lang.String subject, java.lang.String body,
136                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
137                    boolean anonymous, double priority, boolean allowPingbacks,
138                    com.liferay.portal.service.ServiceContext serviceContext)
139                    throws com.liferay.portal.kernel.exception.PortalException,
140                            com.liferay.portal.kernel.exception.SystemException;
141    
142            public void addMessageResources(long messageId,
143                    boolean addCommunityPermissions, boolean addGuestPermissions)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException;
146    
147            public void addMessageResources(long messageId,
148                    java.lang.String[] communityPermissions,
149                    java.lang.String[] guestPermissions)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException;
152    
153            public void addMessageResources(
154                    com.liferay.portlet.messageboards.model.MBMessage message,
155                    boolean addCommunityPermissions, boolean addGuestPermissions)
156                    throws com.liferay.portal.kernel.exception.PortalException,
157                            com.liferay.portal.kernel.exception.SystemException;
158    
159            public void addMessageResources(
160                    com.liferay.portlet.messageboards.model.MBMessage message,
161                    java.lang.String[] communityPermissions,
162                    java.lang.String[] guestPermissions)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException;
165    
166            public void deleteDiscussionMessage(long messageId)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException;
169    
170            public void deleteDiscussionMessages(java.lang.String className,
171                    long classPK)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException;
174    
175            public void deleteMessage(long messageId)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException;
178    
179            public void deleteMessage(
180                    com.liferay.portlet.messageboards.model.MBMessage message)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException;
183    
184            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
186                    long groupId, long categoryId, int status, int start, int end)
187                    throws com.liferay.portal.kernel.exception.SystemException;
188    
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
191                    long groupId, long categoryId, int status, int start, int end,
192                    com.liferay.portal.kernel.util.OrderByComparator obc)
193                    throws com.liferay.portal.kernel.exception.SystemException;
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public int getCategoryMessagesCount(long groupId, long categoryId,
197                    int status) throws com.liferay.portal.kernel.exception.SystemException;
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
201                    long companyId, int status, int start, int end)
202                    throws com.liferay.portal.kernel.exception.SystemException;
203    
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
206                    long companyId, int status, int start, int end,
207                    com.liferay.portal.kernel.util.OrderByComparator obc)
208                    throws com.liferay.portal.kernel.exception.SystemException;
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public int getCompanyMessagesCount(long companyId, int status)
212                    throws com.liferay.portal.kernel.exception.SystemException;
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
216                    long userId, long groupId, java.lang.String className, long classPK,
217                    int status)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException;
220    
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
223                    long userId, long groupId, java.lang.String className, long classPK,
224                    int status, java.lang.String threadView)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException;
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public int getDiscussionMessagesCount(long classNameId, long classPK,
230                    int status) throws com.liferay.portal.kernel.exception.SystemException;
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public int getDiscussionMessagesCount(java.lang.String className,
234                    long classPK, int status)
235                    throws com.liferay.portal.kernel.exception.SystemException;
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
239                    java.lang.String className)
240                    throws com.liferay.portal.kernel.exception.SystemException;
241    
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
244                    long groupId, int status, int start, int end)
245                    throws com.liferay.portal.kernel.exception.SystemException;
246    
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
249                    long groupId, int status, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator obc)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
255                    long groupId, long userId, int status, int start, int end)
256                    throws com.liferay.portal.kernel.exception.SystemException;
257    
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
260                    long groupId, long userId, int status, int start, int end,
261                    com.liferay.portal.kernel.util.OrderByComparator obc)
262                    throws com.liferay.portal.kernel.exception.SystemException;
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public int getGroupMessagesCount(long groupId, int status)
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public int getGroupMessagesCount(long groupId, long userId, int status)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
274                    long messageId)
275                    throws com.liferay.portal.kernel.exception.PortalException,
276                            com.liferay.portal.kernel.exception.SystemException;
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
280                    long messageId, int status, java.lang.String threadView,
281                    boolean includePrevAndNext)
282                    throws com.liferay.portal.kernel.exception.PortalException,
283                            com.liferay.portal.kernel.exception.SystemException;
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
287                    com.liferay.portlet.messageboards.model.MBMessage message, int status,
288                    java.lang.String threadView, boolean includePrevAndNext)
289                    throws com.liferay.portal.kernel.exception.PortalException,
290                            com.liferay.portal.kernel.exception.SystemException;
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
294                    java.lang.String className, long classPK, int status)
295                    throws com.liferay.portal.kernel.exception.SystemException;
296    
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
299                    throws com.liferay.portal.kernel.exception.SystemException;
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public int getPositionInThread(long messageId)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException;
305    
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
308                    long threadId, int status)
309                    throws com.liferay.portal.kernel.exception.SystemException;
310    
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
313                    long threadId, int status,
314                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
315                    throws com.liferay.portal.kernel.exception.SystemException;
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
319                    long threadId, int status, int start, int end)
320                    throws com.liferay.portal.kernel.exception.SystemException;
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public int getThreadMessagesCount(long threadId, int status)
324                    throws com.liferay.portal.kernel.exception.SystemException;
325    
326            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
328                    long threadId, int status, int start, int end)
329                    throws com.liferay.portal.kernel.exception.SystemException;
330    
331            public void subscribeMessage(long userId, long messageId)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException;
334    
335            public void unsubscribeMessage(long userId, long messageId)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException;
338    
339            public void updateAsset(long userId,
340                    com.liferay.portlet.messageboards.model.MBMessage message,
341                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
342                    throws com.liferay.portal.kernel.exception.PortalException,
343                            com.liferay.portal.kernel.exception.SystemException;
344    
345            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
346                    long userId, long messageId, java.lang.String subject,
347                    java.lang.String body, int workflowAction)
348                    throws com.liferay.portal.kernel.exception.PortalException,
349                            com.liferay.portal.kernel.exception.SystemException;
350    
351            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
352                    long userId, long messageId, java.lang.String subject,
353                    java.lang.String body,
354                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
355                    java.util.List<java.lang.String> existingFiles, double priority,
356                    boolean allowPingbacks,
357                    com.liferay.portal.service.ServiceContext serviceContext)
358                    throws com.liferay.portal.kernel.exception.PortalException,
359                            com.liferay.portal.kernel.exception.SystemException;
360    
361            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
362                    long messageId, java.lang.String body)
363                    throws com.liferay.portal.kernel.exception.PortalException,
364                            com.liferay.portal.kernel.exception.SystemException;
365    
366            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
367                    long userId, long messageId, int status,
368                    com.liferay.portal.service.ServiceContext serviceContext)
369                    throws com.liferay.portal.kernel.exception.PortalException,
370                            com.liferay.portal.kernel.exception.SystemException;
371    
372            public void updateUserName(long userId, java.lang.String userName)
373                    throws com.liferay.portal.kernel.exception.SystemException;
374    }