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
/**
* $RCSfile$
* $Revision$
* $Date$
*
* Copyright (C) 2004 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.messenger;
import org.xmpp.packet.Message;
import org.dom4j.Element;
import java.util.Date;
/**
* Subclass of Message that keeps the date when the offline message was stored in the database.
* The creation date and the user may be used as a unique identifier of the offline message.
*
* @author Gaston Dombiak
*/
public class OfflineMessage extends Message {
private Date creationDate;
public OfflineMessage(Date creationDate, Element element) {
super(element);
this.creationDate = creationDate;
}
/**
* Returns the date when the offline message was stored in the database.
*
* @return the date the offline message was stored.
*/
public Date getCreationDate() {
return creationDate;
}
}