001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
033 public class MBMessageServiceUtil {
034
039
040
045 public static java.lang.String getBeanIdentifier() {
046 return getService().getBeanIdentifier();
047 }
048
049
054 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055 getService().setBeanIdentifier(beanIdentifier);
056 }
057
058 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
059 long groupId, java.lang.String className, long classPK,
060 java.lang.String permissionClassName, long permissionClassPK,
061 long permissionOwnerId, long threadId, long parentMessageId,
062 java.lang.String subject, java.lang.String body,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 return getService()
067 .addDiscussionMessage(groupId, className, classPK,
068 permissionClassName, permissionClassPK, permissionOwnerId,
069 threadId, parentMessageId, subject, body, serviceContext);
070 }
071
072
077 public static 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 com.liferay.portal.kernel.exception.SystemException {
086 return getService()
087 .addMessage(groupId, categoryId, threadId, parentMessageId,
088 subject, body, format, inputStreamOVPs, anonymous, priority,
089 allowPingbacks, serviceContext);
090 }
091
092 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
093 long groupId, long categoryId, java.lang.String subject,
094 java.lang.String body, 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 com.liferay.portal.kernel.exception.PortalException,
099 com.liferay.portal.kernel.exception.SystemException {
100 return getService()
101 .addMessage(groupId, categoryId, subject, body, format,
102 inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
103 }
104
105 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
106 long parentMessageId, java.lang.String subject, java.lang.String body,
107 java.lang.String format,
108 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
109 boolean anonymous, double priority, boolean allowPingbacks,
110 com.liferay.portal.service.ServiceContext serviceContext)
111 throws com.liferay.portal.kernel.exception.PortalException,
112 com.liferay.portal.kernel.exception.SystemException {
113 return getService()
114 .addMessage(parentMessageId, subject, body, format,
115 inputStreamOVPs, anonymous, priority, allowPingbacks, serviceContext);
116 }
117
118 public static void deleteDiscussionMessage(long groupId,
119 java.lang.String className, long classPK,
120 java.lang.String permissionClassName, long permissionClassPK,
121 long permissionOwnerId, long messageId)
122 throws com.liferay.portal.kernel.exception.PortalException,
123 com.liferay.portal.kernel.exception.SystemException {
124 getService()
125 .deleteDiscussionMessage(groupId, className, classPK,
126 permissionClassName, permissionClassPK, permissionOwnerId, messageId);
127 }
128
129 public static void deleteMessage(long messageId)
130 throws com.liferay.portal.kernel.exception.PortalException,
131 com.liferay.portal.kernel.exception.SystemException {
132 getService().deleteMessage(messageId);
133 }
134
135 public static void deleteMessageAttachments(long messageId)
136 throws com.liferay.portal.kernel.exception.PortalException,
137 com.liferay.portal.kernel.exception.SystemException {
138 getService().deleteMessageAttachments(messageId);
139 }
140
141 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
142 long groupId, long categoryId, int status, int start, int end)
143 throws com.liferay.portal.kernel.exception.PortalException,
144 com.liferay.portal.kernel.exception.SystemException {
145 return getService()
146 .getCategoryMessages(groupId, categoryId, status, start, end);
147 }
148
149 public static int getCategoryMessagesCount(long groupId, long categoryId,
150 int status) throws com.liferay.portal.kernel.exception.SystemException {
151 return getService().getCategoryMessagesCount(groupId, categoryId, status);
152 }
153
154 public static java.lang.String getCategoryMessagesRSS(long groupId,
155 long categoryId, int status, int max, java.lang.String type,
156 double version, java.lang.String displayStyle,
157 java.lang.String feedURL, java.lang.String entryURL,
158 com.liferay.portal.theme.ThemeDisplay themeDisplay)
159 throws com.liferay.portal.kernel.exception.PortalException,
160 com.liferay.portal.kernel.exception.SystemException {
161 return getService()
162 .getCategoryMessagesRSS(groupId, categoryId, status, max,
163 type, version, displayStyle, feedURL, entryURL, themeDisplay);
164 }
165
166 public static java.lang.String getCompanyMessagesRSS(long companyId,
167 int status, int max, java.lang.String type, double version,
168 java.lang.String displayStyle, java.lang.String feedURL,
169 java.lang.String entryURL,
170 com.liferay.portal.theme.ThemeDisplay themeDisplay)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService()
174 .getCompanyMessagesRSS(companyId, status, max, type,
175 version, displayStyle, feedURL, entryURL, themeDisplay);
176 }
177
178 public static int getGroupMessagesCount(long groupId, int status)
179 throws com.liferay.portal.kernel.exception.SystemException {
180 return getService().getGroupMessagesCount(groupId, status);
181 }
182
183 public static java.lang.String getGroupMessagesRSS(long groupId,
184 int status, int max, java.lang.String type, double version,
185 java.lang.String displayStyle, java.lang.String feedURL,
186 java.lang.String entryURL,
187 com.liferay.portal.theme.ThemeDisplay themeDisplay)
188 throws com.liferay.portal.kernel.exception.PortalException,
189 com.liferay.portal.kernel.exception.SystemException {
190 return getService()
191 .getGroupMessagesRSS(groupId, status, max, type, version,
192 displayStyle, feedURL, entryURL, themeDisplay);
193 }
194
195 public static java.lang.String getGroupMessagesRSS(long groupId,
196 long userId, int status, int max, java.lang.String type,
197 double version, java.lang.String displayStyle,
198 java.lang.String feedURL, java.lang.String entryURL,
199 com.liferay.portal.theme.ThemeDisplay themeDisplay)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException {
202 return getService()
203 .getGroupMessagesRSS(groupId, userId, status, max, type,
204 version, displayStyle, feedURL, entryURL, themeDisplay);
205 }
206
207 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
208 long messageId)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException {
211 return getService().getMessage(messageId);
212 }
213
214 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
215 long messageId, int status, java.lang.String threadView,
216 boolean includePrevAndNext)
217 throws com.liferay.portal.kernel.exception.PortalException,
218 com.liferay.portal.kernel.exception.SystemException {
219 return getService()
220 .getMessageDisplay(messageId, status, threadView,
221 includePrevAndNext);
222 }
223
224 public static int getThreadAnswersCount(long groupId, long categoryId,
225 long threadId)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getService().getThreadAnswersCount(groupId, categoryId, threadId);
228 }
229
230 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
231 long groupId, long categoryId, long threadId, int status, int start,
232 int end) throws com.liferay.portal.kernel.exception.SystemException {
233 return getService()
234 .getThreadMessages(groupId, categoryId, threadId, status,
235 start, end);
236 }
237
238 public static int getThreadMessagesCount(long groupId, long categoryId,
239 long threadId, int status)
240 throws com.liferay.portal.kernel.exception.SystemException {
241 return getService()
242 .getThreadMessagesCount(groupId, categoryId, threadId, status);
243 }
244
245 public static java.lang.String getThreadMessagesRSS(long threadId,
246 int status, int max, java.lang.String type, double version,
247 java.lang.String displayStyle, java.lang.String feedURL,
248 java.lang.String entryURL,
249 com.liferay.portal.theme.ThemeDisplay themeDisplay)
250 throws com.liferay.portal.kernel.exception.PortalException,
251 com.liferay.portal.kernel.exception.SystemException {
252 return getService()
253 .getThreadMessagesRSS(threadId, status, max, type, version,
254 displayStyle, feedURL, entryURL, themeDisplay);
255 }
256
257 public static void subscribeMessage(long messageId)
258 throws com.liferay.portal.kernel.exception.PortalException,
259 com.liferay.portal.kernel.exception.SystemException {
260 getService().subscribeMessage(messageId);
261 }
262
263 public static void unsubscribeMessage(long messageId)
264 throws com.liferay.portal.kernel.exception.PortalException,
265 com.liferay.portal.kernel.exception.SystemException {
266 getService().unsubscribeMessage(messageId);
267 }
268
269 public static void updateAnswer(long messageId, boolean answer,
270 boolean cascade)
271 throws com.liferay.portal.kernel.exception.PortalException,
272 com.liferay.portal.kernel.exception.SystemException {
273 getService().updateAnswer(messageId, answer, cascade);
274 }
275
276 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
277 java.lang.String className, long classPK,
278 java.lang.String permissionClassName, long permissionClassPK,
279 long permissionOwnerId, long messageId, java.lang.String subject,
280 java.lang.String body,
281 com.liferay.portal.service.ServiceContext serviceContext)
282 throws com.liferay.portal.kernel.exception.PortalException,
283 com.liferay.portal.kernel.exception.SystemException {
284 return getService()
285 .updateDiscussionMessage(className, classPK,
286 permissionClassName, permissionClassPK, permissionOwnerId,
287 messageId, subject, body, serviceContext);
288 }
289
290 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
291 long messageId, java.lang.String subject, java.lang.String body,
292 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
293 java.util.List<java.lang.String> existingFiles, double priority,
294 boolean allowPingbacks,
295 com.liferay.portal.service.ServiceContext serviceContext)
296 throws com.liferay.portal.kernel.exception.PortalException,
297 com.liferay.portal.kernel.exception.SystemException {
298 return getService()
299 .updateMessage(messageId, subject, body, inputStreamOVPs,
300 existingFiles, priority, allowPingbacks, serviceContext);
301 }
302
303 public static MBMessageService getService() {
304 if (_service == null) {
305 _service = (MBMessageService)PortalBeanLocatorUtil.locate(MBMessageService.class.getName());
306
307 ReferenceRegistry.registerReference(MBMessageServiceUtil.class,
308 "_service");
309 }
310
311 return _service;
312 }
313
314
317 public void setService(MBMessageService service) {
318 }
319
320 private static MBMessageService _service;
321 }