-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDirectMessageService.html
358 lines (284 loc) · 13.7 KB
/
DirectMessageService.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- **************************************************************** -->
<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
<!-- **************************************************************** -->
<html>
<head>
<!-- Generated by groovydoc (1.8.8) on Thu Jul 11 14:46:37 CEST 2013 -->
<title>DirectMessageService (Groovy Documentation)</title>
<meta name="date" content="2013-07-11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DirectMessageService (Groovy Documentation)";
}
}
</script>
<noscript>
</noscript>
</head><body onload="windowTitle();" bgcolor="white">
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.kaleidos.directmessages</FONT>
<BR>
<span CLASS="ClassTitleFont">[Groovy] Class DirectMessageService</span></H2>
<pre>java.lang.Object
net.kaleidos.directmessages.DirectMessageService
</pre><hr>
<PRE>class DirectMessageService
</PRE>
<P>
Service for the direct messages
<DL><DT><B>Authors:</B></DT><DD>Pablo Alba <[email protected]></DD></DL>
</P>
<hr>
<!-- =========== NESTED CLASS SUMMARY =========== -->
<A NAME="nested_summary"><!-- --></A>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<A NAME="enum_constant_summary"><!-- --></A>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<!-- =========== PROPERTY SUMMARY =========== -->
<A NAME="property_summary"><!-- --></A>
<!-- =========== ELEMENT SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#D5D5FF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD>
<CODE><B><a href="#DirectMessageService()">DirectMessageService</a></B>()</CODE>
<BR>
<P></P>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2" CLASS="ClassHeadingFont">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>long</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#countUnreadMessagesBetweenUsers(long, long)">countUnreadMessagesBetweenUsers</a></b>(long fromId, long toId)</CODE>
<BR>
<P>Count the number of unread messages between two users, mixing sended and received messages</P>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>long</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#countUnreadedMessages(long, boolean, java.util.List)">countUnreadedMessages</a></b>(long id, boolean onlyLast = false, java.util.List filterIds = [])</CODE>
<BR>
<P>Count the number of messages that the user has received, and hasn't read</P>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>java.util.List</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#getLastMessages(long, int, int, java.util.List)">getLastMessages</a></b>(long id, int offset = 0, int itemsByPage = -1, java.util.List filterIds = [])</CODE>
<BR>
<P>Get a list of the conversations of the user, that is, 'last' messages. </P>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>java.util.List</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#getMessages(long, long, boolean, int, int)">getMessages</a></b>(long id1, long id2, boolean onlyLast = false, int offset = 0, int itemsByPage = -1)</CODE>
<BR>
<P>Get a list of the messages between two users. </P>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>java.util.List</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#getMessages(long)">getMessages</a></b>(long messageId)</CODE>
<BR>
<P>Get a list of the messages between the same users that a given message. </P>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>java.util.List</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#getMessagesBetweenUsers(long, long, int, int)">getMessagesBetweenUsers</a></b>(long fromId, long toId, int offset = 0, int itemsByPage = -1)</CODE>
<BR>
<P>Get a list of the messages from an user to another, order by date
Admit pagination</P>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>void</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#markAsRead(java.util.List)">markAsRead</a></b>(java.util.List messages)</CODE>
<BR>
<P>Mark a list of messages as read</P>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1" CLASS="ClassItemFont">
<CODE>Message</CODE></FONT>
</TD>
<TD>
<CODE><b><a href="#sendMessage(long, long, java.lang.String)">sendMessage</a></b>(long fromId, long toId, java.lang.String text)</CODE>
<BR>
<P>Send a message from an user to another</P>
</TD>
</TR>
</TABLE>
<table BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<tr CLASS="TableSubHeadingColor"><th ALIGN="left" COLSPAN="2">
<b>Methods inherited from class java.lang.Object</b>
</th></tr>
<tr class="TableRowColor"><td colspan='2'>java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()</td></tr>
</table>
<P>
<!-- ============ ENUM CONSTANT DETAIL ========== -->
<A NAME="enum_constant_detail"><!-- --></A>
<!-- =========== FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<!-- =========== PROPERTY DETAIL =========== -->
<A NAME="prop_detail"><!-- --></A>
<!-- =========== ELEMENT DETAIL =========== -->
<A NAME="element_detail"><!-- --></A>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DirectMessageService()"><!-- --></A><H3>
DirectMessageService</H3>
<PRE><B>DirectMessageService</B>()</PRE>
<DL>
<DD>
</DD>
<P>
</DL>
<HR>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="countUnreadMessagesBetweenUsers(long, long)"><!-- --></A><H3>
countUnreadMessagesBetweenUsers</H3>
<PRE>long <B>countUnreadMessagesBetweenUsers</B>(long fromId, long toId)</PRE>
<DL>
<DD> Count the number of unread messages between two users, mixing sended and received messages
<DL><DT><B>Parameters:</B></DT><DD><code>fromId</code> - Id of the user that send the message</DD><DD><code>toId</code> - Id of the user that receives the message</DD></DL><DL><DT><B>Returns:</B></DT><DD>long</DD></DL>
</DD>
<P>
</DL>
<HR>
<A NAME="countUnreadedMessages(long, boolean, java.util.List)"><!-- --></A><H3>
countUnreadedMessages</H3>
<PRE>long <B>countUnreadedMessages</B>(long id, boolean onlyLast = false, java.util.List filterIds = [])</PRE>
<DL>
<DD> Count the number of messages that the user has received, and hasn't read
<DL><DT><B>Parameters:</B></DT><DD><code>id</code> - Id of the user</DD><DD><code>onlyLast</code> - Count only the last message</DD><DD><code>filterIds</code> - List of ids of users of with do not want to get the messages</DD></DL><DL><DT><B>Returns:</B></DT><DD>long</DD></DL>
</DD>
<P>
</DL>
<HR>
<A NAME="getLastMessages(long, int, int, java.util.List)"><!-- --></A><H3>
getLastMessages</H3>
<PRE>java.util.List <B>getLastMessages</B>(long id, int offset = 0, int itemsByPage = -1, java.util.List filterIds = [])</PRE>
<DL>
<DD> Get a list of the conversations of the user, that is, 'last' messages. It is a list that mix sended and received messages, order by date
<DL><DT><B>Parameters:</B></DT><DD><code>id</code> - Id of the user</DD><DD><code>offset</code> - Number of messages to skip (for pagination)</DD><DD><code>itemsByPage</code> - Number of messages to return (for pagination). -1 will return all messages.</DD><DD><code>filterIds</code> - List of ids of users of with do not wat to get the messages</DD></DL><DL><DT><B>Returns:</B></DT><DD>a list of Messages</DD></DL>
</DD>
<P>
</DL>
<HR>
<A NAME="getMessages(long, long, boolean, int, int)"><!-- --></A><H3>
getMessages</H3>
<PRE>java.util.List <B>getMessages</B>(long id1, long id2, boolean onlyLast = false, int offset = 0, int itemsByPage = -1)</PRE>
<DL>
<DD> Get a list of the messages between two users. It is a list that mix sended and received messages, order by date
Admit pagination
<DL><DT><B>Parameters:</B></DT><DD><code>id1</code> - Id of one of the users</DD><DD><code>id2</code> - Id of the other of the users</DD><DD><code>onlyLast</code> - Return only the last message</DD><DD><code>offset</code> - For pagination, first</DD><DD><code>itemsByPage</code> - For pagination, maximun number of messages to return. If it is -1, returns all messages.</DD></DL><DL><DT><B>Returns:</B></DT><DD>a list of Messages</DD></DL>
</DD>
<P>
</DL>
<HR>
<A NAME="getMessages(long)"><!-- --></A><H3>
getMessages</H3>
<PRE>java.util.List <B>getMessages</B>(long messageId)</PRE>
<DL>
<DD> Get a list of the messages between the same users that a given message. It is a list that mix sended and received messages, order by date
<DL><DT><B>Parameters:</B></DT><DD><code>messageId</code> - Id of the message</DD></DL><DL><DT><B>Returns:</B></DT><DD>a list of Messages</DD></DL>
</DD>
<P>
</DL>
<HR>
<A NAME="getMessagesBetweenUsers(long, long, int, int)"><!-- --></A><H3>
getMessagesBetweenUsers</H3>
<PRE>java.util.List <B>getMessagesBetweenUsers</B>(long fromId, long toId, int offset = 0, int itemsByPage = -1)</PRE>
<DL>
<DD> Get a list of the messages from an user to another, order by date
Admit pagination
<DL><DT><B>Parameters:</B></DT><DD><code>fromId</code> - Id of the user that send the message</DD><DD><code>toId</code> - Id of the user that receives the message</DD></DL><DL><DT><B>Returns:</B></DT><DD>a list of Messages</DD></DL>
</DD>
<P>
</DL>
<HR>
<A NAME="markAsRead(java.util.List)"><!-- --></A><H3>
markAsRead</H3>
<PRE>void <B>markAsRead</B>(java.util.List messages)</PRE>
<DL>
<DD> Mark a list of messages as read
<DL><DT><B>Parameters:</B></DT><DD><code>messages</code> - List of messages</DD></DL>
</DD>
<P>
</DL>
<HR>
<A NAME="sendMessage(long, long, java.lang.String)"><!-- --></A><H3>
sendMessage</H3>
<PRE>Message <B>sendMessage</B>(long fromId, long toId, java.lang.String text)</PRE>
<DL>
<DD> Send a message from an user to another
<DL><DT><B>Parameters:</B></DT><DD><code>fromId</code> - Id of the user that send the message</DD><DD><code>toId</code> - Id of the user that receives the message</DD><DD><code>text</code> - The text of the message</DD></DL><DL><DT><B>Returns:</B></DT><DD>a Message</DD></DL>
</DD>
<P>
</DL>
<HR>
<!-- ========= END OF CLASS DATA ========= -->
<p>Groovy Documentation</p>
<hr>
</body>
</html>