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 java.lang.String className, long classPK, long threadId,
50 long parentMessageId, java.lang.String subject, java.lang.String body,
51 com.liferay.portal.service.ServiceContext serviceContext)
52 throws com.liferay.portal.PortalException,
53 com.liferay.portal.SystemException {
54 return getService()
55 .addDiscussionMessage(className, classPK, threadId,
56 parentMessageId, subject, body, serviceContext);
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,
63 com.liferay.portal.service.ServiceContext serviceContext)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException {
66 return getService()
67 .addMessage(categoryId, subject, body, files, anonymous,
68 priority, serviceContext);
69 }
70
71 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
72 long categoryId, long threadId, long parentMessageId,
73 java.lang.String subject, java.lang.String body,
74 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
75 boolean anonymous, double priority,
76 com.liferay.portal.service.ServiceContext serviceContext)
77 throws com.liferay.portal.PortalException,
78 com.liferay.portal.SystemException {
79 return getService()
80 .addMessage(categoryId, threadId, parentMessageId, subject,
81 body, files, anonymous, priority, serviceContext);
82 }
83
84 public static void deleteDiscussionMessage(long groupId,
85 java.lang.String className, long classPK, long messageId)
86 throws com.liferay.portal.PortalException,
87 com.liferay.portal.SystemException {
88 getService()
89 .deleteDiscussionMessage(groupId, className, classPK, messageId);
90 }
91
92 public static void deleteMessage(long messageId)
93 throws com.liferay.portal.PortalException,
94 com.liferay.portal.SystemException {
95 getService().deleteMessage(messageId);
96 }
97
98 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
99 long categoryId, int start, int end)
100 throws com.liferay.portal.PortalException,
101 com.liferay.portal.SystemException {
102 return getService().getCategoryMessages(categoryId, start, end);
103 }
104
105 public static int getCategoryMessagesCount(long categoryId)
106 throws com.liferay.portal.SystemException {
107 return getService().getCategoryMessagesCount(categoryId);
108 }
109
110 public static java.lang.String getCategoryMessagesRSS(long categoryId,
111 int max, java.lang.String type, double version,
112 java.lang.String displayStyle, java.lang.String feedURL,
113 java.lang.String entryURL,
114 com.liferay.portal.theme.ThemeDisplay themeDisplay)
115 throws com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException {
117 return getService()
118 .getCategoryMessagesRSS(categoryId, max, type, version,
119 displayStyle, feedURL, entryURL, themeDisplay);
120 }
121
122 public static java.lang.String getCompanyMessagesRSS(long companyId,
123 int max, java.lang.String type, double version,
124 java.lang.String displayStyle, java.lang.String feedURL,
125 java.lang.String entryURL,
126 com.liferay.portal.theme.ThemeDisplay themeDisplay)
127 throws com.liferay.portal.PortalException,
128 com.liferay.portal.SystemException {
129 return getService()
130 .getCompanyMessagesRSS(companyId, max, type, version,
131 displayStyle, feedURL, entryURL, themeDisplay);
132 }
133
134 public static java.lang.String getGroupMessagesRSS(long groupId, int max,
135 java.lang.String type, double version, java.lang.String displayStyle,
136 java.lang.String feedURL, java.lang.String entryURL,
137 com.liferay.portal.theme.ThemeDisplay themeDisplay)
138 throws com.liferay.portal.PortalException,
139 com.liferay.portal.SystemException {
140 return getService()
141 .getGroupMessagesRSS(groupId, max, type, version,
142 displayStyle, feedURL, entryURL, themeDisplay);
143 }
144
145 public static java.lang.String getGroupMessagesRSS(long groupId,
146 long userId, int max, java.lang.String type, double version,
147 java.lang.String displayStyle, java.lang.String feedURL,
148 java.lang.String entryURL,
149 com.liferay.portal.theme.ThemeDisplay themeDisplay)
150 throws com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException {
152 return getService()
153 .getGroupMessagesRSS(groupId, userId, max, type, version,
154 displayStyle, feedURL, entryURL, themeDisplay);
155 }
156
157 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
158 long messageId)
159 throws com.liferay.portal.PortalException,
160 com.liferay.portal.SystemException {
161 return getService().getMessage(messageId);
162 }
163
164 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
165 long messageId)
166 throws com.liferay.portal.PortalException,
167 com.liferay.portal.SystemException {
168 return getService().getMessageDisplay(messageId);
169 }
170
171 public static java.lang.String getThreadMessagesRSS(long threadId, int max,
172 java.lang.String type, double version, java.lang.String displayStyle,
173 java.lang.String feedURL, java.lang.String entryURL,
174 com.liferay.portal.theme.ThemeDisplay themeDisplay)
175 throws com.liferay.portal.PortalException,
176 com.liferay.portal.SystemException {
177 return getService()
178 .getThreadMessagesRSS(threadId, max, type, version,
179 displayStyle, feedURL, entryURL, themeDisplay);
180 }
181
182 public static void subscribeMessage(long messageId)
183 throws com.liferay.portal.PortalException,
184 com.liferay.portal.SystemException {
185 getService().subscribeMessage(messageId);
186 }
187
188 public static void unsubscribeMessage(long messageId)
189 throws com.liferay.portal.PortalException,
190 com.liferay.portal.SystemException {
191 getService().unsubscribeMessage(messageId);
192 }
193
194 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
195 java.lang.String className, long classPK, long messageId,
196 java.lang.String subject, java.lang.String body,
197 com.liferay.portal.service.ServiceContext serviceContext)
198 throws com.liferay.portal.PortalException,
199 com.liferay.portal.SystemException {
200 return getService()
201 .updateDiscussionMessage(className, classPK, messageId,
202 subject, body, serviceContext);
203 }
204
205 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
206 long messageId, java.lang.String subject, java.lang.String body,
207 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
208 java.util.List<String> existingFiles, double priority,
209 com.liferay.portal.service.ServiceContext serviceContext)
210 throws com.liferay.portal.PortalException,
211 com.liferay.portal.SystemException {
212 return getService()
213 .updateMessage(messageId, subject, body, files,
214 existingFiles, priority, serviceContext);
215 }
216
217 public static MBMessageService getService() {
218 if (_service == null) {
219 throw new RuntimeException("MBMessageService is not set");
220 }
221
222 return _service;
223 }
224
225 public void setService(MBMessageService service) {
226 _service = service;
227 }
228
229 private static MBMessageService _service;
230 }