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