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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
129                    long groupId, long categoryId, int status, int start, int end)
130                    throws PortalException;
131    
132            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133            public int getCategoryMessagesCount(long groupId, long categoryId,
134                    int status);
135    
136            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137            public java.lang.String getCategoryMessagesRSS(long groupId,
138                    long categoryId, int status, int max, java.lang.String type,
139                    double version, java.lang.String displayStyle,
140                    java.lang.String feedURL, java.lang.String entryURL,
141                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
142                    throws PortalException;
143    
144            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145            public java.lang.String getCompanyMessagesRSS(long companyId, int status,
146                    int max, java.lang.String type, double version,
147                    java.lang.String displayStyle, java.lang.String feedURL,
148                    java.lang.String entryURL,
149                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
150                    throws PortalException;
151    
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public int getGroupMessagesCount(long groupId, int status);
154    
155            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156            public java.lang.String getGroupMessagesRSS(long groupId, int status,
157                    int max, java.lang.String type, double version,
158                    java.lang.String displayStyle, java.lang.String feedURL,
159                    java.lang.String entryURL,
160                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
161                    throws PortalException;
162    
163            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164            public java.lang.String getGroupMessagesRSS(long groupId, long userId,
165                    int status, int max, java.lang.String type, double version,
166                    java.lang.String displayStyle, java.lang.String feedURL,
167                    java.lang.String entryURL,
168                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
169                    throws PortalException;
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
173                    long messageId) throws PortalException;
174    
175            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
177                    long messageId, int status, boolean includePrevAndNext)
178                    throws PortalException;
179    
180            /**
181            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long, int,
182            boolean)}
183            */
184            @java.lang.Deprecated
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
187                    long messageId, int status, java.lang.String threadView,
188                    boolean includePrevAndNext) throws PortalException;
189    
190            /**
191            * Returns the OSGi service identifier.
192            *
193            * @return the OSGi service identifier
194            */
195            public java.lang.String getOSGiServiceIdentifier();
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public int getThreadAnswersCount(long groupId, long categoryId,
199                    long threadId);
200    
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
203                    long groupId, long categoryId, long threadId, int status, int start,
204                    int end);
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public int getThreadMessagesCount(long groupId, long categoryId,
208                    long threadId, int status);
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public java.lang.String getThreadMessagesRSS(long threadId, int status,
212                    int max, java.lang.String type, double version,
213                    java.lang.String displayStyle, java.lang.String feedURL,
214                    java.lang.String entryURL,
215                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
216                    throws PortalException;
217    
218            public void restoreMessageAttachmentFromTrash(long messageId,
219                    java.lang.String fileName) throws PortalException;
220    
221            public void subscribeMessage(long messageId) throws PortalException;
222    
223            public void unsubscribeMessage(long messageId) throws PortalException;
224    
225            public void updateAnswer(long messageId, boolean answer, boolean cascade)
226                    throws PortalException;
227    
228            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
229                    java.lang.String className, long classPK, long messageId,
230                    java.lang.String subject, java.lang.String body,
231                    com.liferay.portal.service.ServiceContext serviceContext)
232                    throws PortalException;
233    
234            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
235                    long messageId, java.lang.String subject, java.lang.String body,
236                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
237                    java.util.List<java.lang.String> existingFiles, double priority,
238                    boolean allowPingbacks,
239                    com.liferay.portal.service.ServiceContext serviceContext)
240                    throws PortalException;
241    }