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.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.security.access.control.AccessControlled;
023    import com.liferay.portal.kernel.transaction.Isolation;
024    import com.liferay.portal.kernel.transaction.Propagation;
025    import com.liferay.portal.kernel.transaction.Transactional;
026    import com.liferay.portal.service.BaseService;
027    
028    /**
029     * Provides the remote service interface for MBMessage. Methods of this
030     * service are expected to have security checks based on the propagated JAAS
031     * credentials because this service can be accessed remotely.
032     *
033     * @author Brian Wing Shun Chan
034     * @see MBMessageServiceUtil
035     * @see com.liferay.portlet.messageboards.service.base.MBMessageServiceBaseImpl
036     * @see com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl
037     * @generated
038     */
039    @AccessControlled
040    @JSONWebService
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface MBMessageService extends BaseService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link MBMessageServiceUtil} to access the message-boards message remote service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
051                    long groupId, java.lang.String className, long classPK, long threadId,
052                    long parentMessageId, java.lang.String subject, java.lang.String body,
053                    com.liferay.portal.service.ServiceContext serviceContext)
054                    throws PortalException;
055    
056            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
057                    long categoryId, java.lang.String subject, java.lang.String body,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws PortalException;
060    
061            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
062                    long groupId, long categoryId, java.lang.String subject,
063                    java.lang.String body, java.lang.String format,
064                    java.lang.String fileName, java.io.File file, boolean anonymous,
065                    double priority, boolean allowPingbacks,
066                    com.liferay.portal.service.ServiceContext serviceContext)
067                    throws PortalException, java.io.FileNotFoundException;
068    
069            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
070                    long groupId, long categoryId, java.lang.String subject,
071                    java.lang.String body, java.lang.String format,
072                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
073                    boolean anonymous, double priority, boolean allowPingbacks,
074                    com.liferay.portal.service.ServiceContext serviceContext)
075                    throws PortalException;
076    
077            /**
078            * @deprecated As of 6.2.0, replaced by {@link #addMessage(long, String,
079            String, String, List, boolean, double, boolean,
080            ServiceContext)}
081            */
082            @java.lang.Deprecated
083            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
084                    long groupId, long categoryId, long threadId, long parentMessageId,
085                    java.lang.String subject, java.lang.String body,
086                    java.lang.String format,
087                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
088                    boolean anonymous, double priority, boolean allowPingbacks,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws PortalException;
091    
092            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
093                    long parentMessageId, java.lang.String subject, java.lang.String body,
094                    java.lang.String format,
095                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
096                    boolean anonymous, double priority, boolean allowPingbacks,
097                    com.liferay.portal.service.ServiceContext serviceContext)
098                    throws PortalException;
099    
100            public void addMessageAttachment(long messageId, java.lang.String fileName,
101                    java.io.File file, java.lang.String mimeType) throws PortalException;
102    
103            /**
104            * @deprecated As of 7.0.0, replaced by {@link
105            #deleteDiscussionMessage(long)}
106            */
107            @java.lang.Deprecated
108            public void deleteDiscussionMessage(long groupId,
109                    java.lang.String className, long classPK,
110                    java.lang.String permissionClassName, long permissionClassPK,
111                    long permissionOwnerId, long messageId) throws PortalException;
112    
113            public void deleteDiscussionMessage(long messageId)
114                    throws PortalException;
115    
116            public void deleteMessage(long messageId) throws PortalException;
117    
118            public void deleteMessageAttachment(long messageId,
119                    java.lang.String fileName) throws PortalException;
120    
121            public void deleteMessageAttachments(long messageId)
122                    throws PortalException;
123    
124            public void emptyMessageAttachments(long messageId)
125                    throws PortalException;
126    
127            /**
128            * Returns the Spring bean ID for this bean.
129            *
130            * @return the Spring bean ID for this bean
131            */
132            public java.lang.String getBeanIdentifier();
133    
134            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
136                    long groupId, long categoryId, int status, int start, int end)
137                    throws PortalException;
138    
139            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140            public int getCategoryMessagesCount(long groupId, long categoryId,
141                    int status);
142    
143            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144            public java.lang.String getCategoryMessagesRSS(long groupId,
145                    long categoryId, int status, int max, java.lang.String type,
146                    double version, java.lang.String displayStyle,
147                    java.lang.String feedURL, java.lang.String entryURL,
148                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
149                    throws PortalException;
150    
151            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152            public java.lang.String getCompanyMessagesRSS(long companyId, int status,
153                    int max, java.lang.String type, double version,
154                    java.lang.String displayStyle, java.lang.String feedURL,
155                    java.lang.String entryURL,
156                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
157                    throws PortalException;
158    
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public int getGroupMessagesCount(long groupId, int status);
161    
162            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163            public java.lang.String getGroupMessagesRSS(long groupId, int status,
164                    int max, java.lang.String type, double version,
165                    java.lang.String displayStyle, java.lang.String feedURL,
166                    java.lang.String entryURL,
167                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
168                    throws PortalException;
169    
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public java.lang.String getGroupMessagesRSS(long groupId, long userId,
172                    int status, int max, java.lang.String type, double version,
173                    java.lang.String displayStyle, java.lang.String feedURL,
174                    java.lang.String entryURL,
175                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
176                    throws PortalException;
177    
178            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
180                    long messageId) throws PortalException;
181    
182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
184                    long messageId, int status, java.lang.String threadView,
185                    boolean includePrevAndNext) throws PortalException;
186    
187            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188            public int getThreadAnswersCount(long groupId, long categoryId,
189                    long threadId);
190    
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
193                    long groupId, long categoryId, long threadId, int status, int start,
194                    int end);
195    
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public int getThreadMessagesCount(long groupId, long categoryId,
198                    long threadId, int status);
199    
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public java.lang.String getThreadMessagesRSS(long threadId, int status,
202                    int max, java.lang.String type, double version,
203                    java.lang.String displayStyle, java.lang.String feedURL,
204                    java.lang.String entryURL,
205                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
206                    throws PortalException;
207    
208            public void restoreMessageAttachmentFromTrash(long messageId,
209                    java.lang.String fileName) throws PortalException;
210    
211            /**
212            * Sets the Spring bean ID for this bean.
213            *
214            * @param beanIdentifier the Spring bean ID for this bean
215            */
216            public void setBeanIdentifier(java.lang.String beanIdentifier);
217    
218            public void subscribeMessage(long messageId) throws PortalException;
219    
220            public void unsubscribeMessage(long messageId) throws PortalException;
221    
222            public void updateAnswer(long messageId, boolean answer, boolean cascade)
223                    throws PortalException;
224    
225            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
226                    java.lang.String className, long classPK, long messageId,
227                    java.lang.String subject, java.lang.String body,
228                    com.liferay.portal.service.ServiceContext serviceContext)
229                    throws PortalException;
230    
231            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
232                    long messageId, java.lang.String subject, java.lang.String body,
233                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
234                    java.util.List<java.lang.String> existingFiles, double priority,
235                    boolean allowPingbacks,
236                    com.liferay.portal.service.ServiceContext serviceContext)
237                    throws PortalException;
238    }