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