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