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            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
078                    long parentMessageId, java.lang.String subject, java.lang.String body,
079                    java.lang.String format,
080                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
081                    boolean anonymous, double priority, boolean allowPingbacks,
082                    com.liferay.portal.service.ServiceContext serviceContext)
083                    throws PortalException;
084    
085            public void addMessageAttachment(long messageId, java.lang.String fileName,
086                    java.io.File file, java.lang.String mimeType) throws PortalException;
087    
088            /**
089            * @deprecated As of 7.0.0, replaced by {@link
090            #deleteDiscussionMessage(long)}
091            */
092            @java.lang.Deprecated
093            public void deleteDiscussionMessage(long groupId,
094                    java.lang.String className, long classPK,
095                    java.lang.String permissionClassName, long permissionClassPK,
096                    long permissionOwnerId, long messageId) throws PortalException;
097    
098            public void deleteDiscussionMessage(long messageId)
099                    throws PortalException;
100    
101            public void deleteMessage(long messageId) throws PortalException;
102    
103            public void deleteMessageAttachment(long messageId,
104                    java.lang.String fileName) throws PortalException;
105    
106            public void deleteMessageAttachments(long messageId)
107                    throws PortalException;
108    
109            public void emptyMessageAttachments(long messageId)
110                    throws PortalException;
111    
112            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
114                    long groupId, long categoryId, int status, int start, int end)
115                    throws PortalException;
116    
117            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118            public int getCategoryMessagesCount(long groupId, long categoryId,
119                    int status);
120    
121            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122            public java.lang.String getCategoryMessagesRSS(long groupId,
123                    long categoryId, int status, int max, java.lang.String type,
124                    double version, java.lang.String displayStyle,
125                    java.lang.String feedURL, java.lang.String entryURL,
126                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
127                    throws PortalException;
128    
129            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130            public java.lang.String getCompanyMessagesRSS(long companyId, int status,
131                    int max, java.lang.String type, double version,
132                    java.lang.String displayStyle, java.lang.String feedURL,
133                    java.lang.String entryURL,
134                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
135                    throws PortalException;
136    
137            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138            public int getGroupMessagesCount(long groupId, int status);
139    
140            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141            public java.lang.String getGroupMessagesRSS(long groupId, int status,
142                    int max, java.lang.String type, double version,
143                    java.lang.String displayStyle, java.lang.String feedURL,
144                    java.lang.String entryURL,
145                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
146                    throws PortalException;
147    
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public java.lang.String getGroupMessagesRSS(long groupId, long userId,
150                    int status, int max, java.lang.String type, double version,
151                    java.lang.String displayStyle, java.lang.String feedURL,
152                    java.lang.String entryURL,
153                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
154                    throws PortalException;
155    
156            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
158                    long messageId) throws PortalException;
159    
160            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
162                    long messageId, int status, boolean includePrevAndNext)
163                    throws PortalException;
164    
165            /**
166            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long, int,
167            boolean)}
168            */
169            @java.lang.Deprecated
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
172                    long messageId, int status, java.lang.String threadView,
173                    boolean includePrevAndNext) throws PortalException;
174    
175            /**
176            * Returns the OSGi service identifier.
177            *
178            * @return the OSGi service identifier
179            */
180            public java.lang.String getOSGiServiceIdentifier();
181    
182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183            public int getThreadAnswersCount(long groupId, long categoryId,
184                    long threadId);
185    
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
188                    long groupId, long categoryId, long threadId, int status, int start,
189                    int end);
190    
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public int getThreadMessagesCount(long groupId, long categoryId,
193                    long threadId, int status);
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public java.lang.String getThreadMessagesRSS(long threadId, int status,
197                    int max, java.lang.String type, double version,
198                    java.lang.String displayStyle, java.lang.String feedURL,
199                    java.lang.String entryURL,
200                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
201                    throws PortalException;
202    
203            public void restoreMessageAttachmentFromTrash(long messageId,
204                    java.lang.String fileName) throws PortalException;
205    
206            public void subscribeMessage(long messageId) throws PortalException;
207    
208            public void unsubscribeMessage(long messageId) throws PortalException;
209    
210            public void updateAnswer(long messageId, boolean answer, boolean cascade)
211                    throws PortalException;
212    
213            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
214                    java.lang.String className, long classPK, long messageId,
215                    java.lang.String subject, java.lang.String body,
216                    com.liferay.portal.service.ServiceContext serviceContext)
217                    throws PortalException;
218    
219            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
220                    long messageId, java.lang.String subject, java.lang.String body,
221                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
222                    java.util.List<java.lang.String> existingFiles, double priority,
223                    boolean allowPingbacks,
224                    com.liferay.portal.service.ServiceContext serviceContext)
225                    throws PortalException;
226    }