1
22
23 package com.liferay.portlet.messageboards.service;
24
25
26
47 public class MBMessageServiceUtil {
48 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
49 long groupId, java.lang.String className, long classPK, long threadId,
50 long parentMessageId, java.lang.String subject, java.lang.String body,
51 com.liferay.portal.theme.ThemeDisplay themeDisplay)
52 throws com.liferay.portal.PortalException,
53 com.liferay.portal.SystemException, java.rmi.RemoteException {
54 return getService()
55 .addDiscussionMessage(groupId, className, classPK, threadId,
56 parentMessageId, subject, body, themeDisplay);
57 }
58
59 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
60 long categoryId, java.lang.String subject, java.lang.String body,
61 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
62 boolean anonymous, double priority, java.lang.String[] tagsEntries,
63 boolean addCommunityPermissions, boolean addGuestPermissions)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException, java.rmi.RemoteException {
66 return getService()
67 .addMessage(categoryId, subject, body, files, anonymous,
68 priority, tagsEntries, addCommunityPermissions, addGuestPermissions);
69 }
70
71 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
72 long categoryId, java.lang.String subject, java.lang.String body,
73 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
74 boolean anonymous, double priority, java.lang.String[] tagsEntries,
75 java.lang.String[] communityPermissions,
76 java.lang.String[] guestPermissions)
77 throws com.liferay.portal.PortalException,
78 com.liferay.portal.SystemException, java.rmi.RemoteException {
79 return getService()
80 .addMessage(categoryId, subject, body, files, anonymous,
81 priority, tagsEntries, communityPermissions, guestPermissions);
82 }
83
84 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
85 long categoryId, java.lang.String subject, java.lang.String body,
86 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
87 boolean anonymous, double priority, java.lang.String[] tagsEntries,
88 javax.portlet.PortletPreferences prefs,
89 boolean addCommunityPermissions, boolean addGuestPermissions,
90 com.liferay.portal.theme.ThemeDisplay themeDisplay)
91 throws com.liferay.portal.PortalException,
92 com.liferay.portal.SystemException, java.rmi.RemoteException {
93 return getService()
94 .addMessage(categoryId, subject, body, files, anonymous,
95 priority, tagsEntries, prefs, addCommunityPermissions,
96 addGuestPermissions, themeDisplay);
97 }
98
99 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
100 long categoryId, java.lang.String subject, java.lang.String body,
101 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
102 boolean anonymous, double priority, java.lang.String[] tagsEntries,
103 javax.portlet.PortletPreferences prefs,
104 java.lang.String[] communityPermissions,
105 java.lang.String[] guestPermissions,
106 com.liferay.portal.theme.ThemeDisplay themeDisplay)
107 throws com.liferay.portal.PortalException,
108 com.liferay.portal.SystemException, java.rmi.RemoteException {
109 return getService()
110 .addMessage(categoryId, subject, body, files, anonymous,
111 priority, tagsEntries, prefs, communityPermissions,
112 guestPermissions, themeDisplay);
113 }
114
115 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
116 long categoryId, long threadId, long parentMessageId,
117 java.lang.String subject, java.lang.String body,
118 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
119 boolean anonymous, double priority, java.lang.String[] tagsEntries,
120 boolean addCommunityPermissions, boolean addGuestPermissions)
121 throws com.liferay.portal.PortalException,
122 com.liferay.portal.SystemException, java.rmi.RemoteException {
123 return getService()
124 .addMessage(categoryId, threadId, parentMessageId, subject,
125 body, files, anonymous, priority, tagsEntries,
126 addCommunityPermissions, addGuestPermissions);
127 }
128
129 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
130 long categoryId, long threadId, long parentMessageId,
131 java.lang.String subject, java.lang.String body,
132 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
133 boolean anonymous, double priority, java.lang.String[] tagsEntries,
134 java.lang.String[] communityPermissions,
135 java.lang.String[] guestPermissions)
136 throws com.liferay.portal.PortalException,
137 com.liferay.portal.SystemException, java.rmi.RemoteException {
138 return getService()
139 .addMessage(categoryId, threadId, parentMessageId, subject,
140 body, files, anonymous, priority, tagsEntries,
141 communityPermissions, guestPermissions);
142 }
143
144 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
145 long categoryId, long threadId, long parentMessageId,
146 java.lang.String subject, java.lang.String body,
147 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
148 boolean anonymous, double priority, java.lang.String[] tagsEntries,
149 javax.portlet.PortletPreferences prefs,
150 boolean addCommunityPermissions, boolean addGuestPermissions,
151 com.liferay.portal.theme.ThemeDisplay themeDisplay)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException, java.rmi.RemoteException {
154 return getService()
155 .addMessage(categoryId, threadId, parentMessageId, subject,
156 body, files, anonymous, priority, tagsEntries, prefs,
157 addCommunityPermissions, addGuestPermissions, themeDisplay);
158 }
159
160 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
161 long categoryId, long threadId, long parentMessageId,
162 java.lang.String subject, java.lang.String body,
163 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
164 boolean anonymous, double priority, java.lang.String[] tagsEntries,
165 javax.portlet.PortletPreferences prefs,
166 java.lang.String[] communityPermissions,
167 java.lang.String[] guestPermissions,
168 com.liferay.portal.theme.ThemeDisplay themeDisplay)
169 throws com.liferay.portal.PortalException,
170 com.liferay.portal.SystemException, java.rmi.RemoteException {
171 return getService()
172 .addMessage(categoryId, threadId, parentMessageId, subject,
173 body, files, anonymous, priority, tagsEntries, prefs,
174 communityPermissions, guestPermissions, themeDisplay);
175 }
176
177 public static void deleteDiscussionMessage(long groupId,
178 java.lang.String className, long classPK, long messageId)
179 throws com.liferay.portal.PortalException,
180 com.liferay.portal.SystemException, java.rmi.RemoteException {
181 getService()
182 .deleteDiscussionMessage(groupId, className, classPK, messageId);
183 }
184
185 public static void deleteMessage(long messageId)
186 throws com.liferay.portal.PortalException,
187 com.liferay.portal.SystemException, java.rmi.RemoteException {
188 getService().deleteMessage(messageId);
189 }
190
191 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
192 long categoryId, int start, int end)
193 throws com.liferay.portal.PortalException,
194 com.liferay.portal.SystemException, java.rmi.RemoteException {
195 return getService().getCategoryMessages(categoryId, start, end);
196 }
197
198 public static int getCategoryMessagesCount(long categoryId)
199 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
200 return getService().getCategoryMessagesCount(categoryId);
201 }
202
203 public static java.lang.String getCategoryMessagesRSS(long categoryId,
204 int max, java.lang.String type, double version,
205 java.lang.String displayStyle, java.lang.String feedURL,
206 java.lang.String entryURL,
207 com.liferay.portal.theme.ThemeDisplay themeDisplay)
208 throws com.liferay.portal.PortalException,
209 com.liferay.portal.SystemException, java.rmi.RemoteException {
210 return getService()
211 .getCategoryMessagesRSS(categoryId, max, type, version,
212 displayStyle, feedURL, entryURL, themeDisplay);
213 }
214
215 public static java.lang.String getCompanyMessagesRSS(long companyId,
216 int max, java.lang.String type, double version,
217 java.lang.String displayStyle, java.lang.String feedURL,
218 java.lang.String entryURL,
219 com.liferay.portal.theme.ThemeDisplay themeDisplay)
220 throws com.liferay.portal.PortalException,
221 com.liferay.portal.SystemException, java.rmi.RemoteException {
222 return getService()
223 .getCompanyMessagesRSS(companyId, max, type, version,
224 displayStyle, feedURL, entryURL, themeDisplay);
225 }
226
227 public static java.lang.String getGroupMessagesRSS(long groupId, int max,
228 java.lang.String type, double version, java.lang.String displayStyle,
229 java.lang.String feedURL, java.lang.String entryURL,
230 com.liferay.portal.theme.ThemeDisplay themeDisplay)
231 throws com.liferay.portal.PortalException,
232 com.liferay.portal.SystemException, java.rmi.RemoteException {
233 return getService()
234 .getGroupMessagesRSS(groupId, max, type, version,
235 displayStyle, feedURL, entryURL, themeDisplay);
236 }
237
238 public static java.lang.String getGroupMessagesRSS(long groupId,
239 long userId, int max, java.lang.String type, double version,
240 java.lang.String displayStyle, java.lang.String feedURL,
241 java.lang.String entryURL,
242 com.liferay.portal.theme.ThemeDisplay themeDisplay)
243 throws com.liferay.portal.PortalException,
244 com.liferay.portal.SystemException, java.rmi.RemoteException {
245 return getService()
246 .getGroupMessagesRSS(groupId, userId, max, type, version,
247 displayStyle, feedURL, entryURL, themeDisplay);
248 }
249
250 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
251 long messageId)
252 throws com.liferay.portal.PortalException,
253 com.liferay.portal.SystemException, java.rmi.RemoteException {
254 return getService().getMessage(messageId);
255 }
256
257 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
258 long messageId)
259 throws com.liferay.portal.PortalException,
260 com.liferay.portal.SystemException, java.rmi.RemoteException {
261 return getService().getMessageDisplay(messageId);
262 }
263
264 public static java.lang.String getThreadMessagesRSS(long threadId, int max,
265 java.lang.String type, double version, java.lang.String displayStyle,
266 java.lang.String feedURL, java.lang.String entryURL,
267 com.liferay.portal.theme.ThemeDisplay themeDisplay)
268 throws com.liferay.portal.PortalException,
269 com.liferay.portal.SystemException, java.rmi.RemoteException {
270 return getService()
271 .getThreadMessagesRSS(threadId, max, type, version,
272 displayStyle, feedURL, entryURL, themeDisplay);
273 }
274
275 public static void subscribeMessage(long messageId)
276 throws com.liferay.portal.PortalException,
277 com.liferay.portal.SystemException, java.rmi.RemoteException {
278 getService().subscribeMessage(messageId);
279 }
280
281 public static void unsubscribeMessage(long messageId)
282 throws com.liferay.portal.PortalException,
283 com.liferay.portal.SystemException, java.rmi.RemoteException {
284 getService().unsubscribeMessage(messageId);
285 }
286
287 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
288 long groupId, java.lang.String className, long classPK, long messageId,
289 java.lang.String subject, java.lang.String body)
290 throws com.liferay.portal.PortalException,
291 com.liferay.portal.SystemException, java.rmi.RemoteException {
292 return getService()
293 .updateDiscussionMessage(groupId, className, classPK,
294 messageId, subject, body);
295 }
296
297 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
298 long messageId, java.lang.String subject, java.lang.String body,
299 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
300 java.util.List<String> existingFiles, double priority,
301 java.lang.String[] tagsEntries)
302 throws com.liferay.portal.PortalException,
303 com.liferay.portal.SystemException, java.rmi.RemoteException {
304 return getService()
305 .updateMessage(messageId, subject, body, files,
306 existingFiles, priority, tagsEntries);
307 }
308
309 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
310 long messageId, java.lang.String subject, java.lang.String body,
311 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
312 java.util.List<String> existingFiles, double priority,
313 java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
314 com.liferay.portal.theme.ThemeDisplay themeDisplay)
315 throws com.liferay.portal.PortalException,
316 com.liferay.portal.SystemException, java.rmi.RemoteException {
317 return getService()
318 .updateMessage(messageId, subject, body, files,
319 existingFiles, priority, tagsEntries, prefs, themeDisplay);
320 }
321
322 public static MBMessageService getService() {
323 if (_service == null) {
324 throw new RuntimeException("MBMessageService is not set");
325 }
326
327 return _service;
328 }
329
330 public void setService(MBMessageService service) {
331 _service = service;
332 }
333
334 private static MBMessageService _service;
335 }