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