Source Code Cross Referenced for ConversationLogEntry.java in  » Net » openfire » org » jivesoftware » openfire » muc » spi » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » openfire » org.jivesoftware.openfire.muc.spi 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $RCSfile$
003:         * $Revision: 569 $
004:         * $Date: 2004-12-01 15:31:18 -0300 (Wed, 01 Dec 2004) $
005:         *
006:         * Copyright (C) 2004 Jive Software. All rights reserved.
007:         *
008:         * This software is published under the terms of the GNU Public License (GPL),
009:         * a copy of which is included in this distribution.
010:         */package org.jivesoftware.openfire.muc.spi;
011:
012:        import java.util.Date;
013:
014:        import org.jivesoftware.openfire.muc.MUCRoom;
015:        import org.xmpp.packet.Message;
016:        import org.xmpp.packet.JID;
017:
018:        /**
019:         * Represents an entry in the conversation log of a room. An entry basically obtains the necessary
020:         * information to log from the message adding a timestamp of when the message was sent to the room.
021:         * 
022:         * @author Gaston Dombiak
023:         */
024:        class ConversationLogEntry {
025:
026:            private Date date;
027:
028:            private String subject;
029:
030:            private String body;
031:
032:            private JID sender;
033:
034:            private String nickname;
035:
036:            private long roomID;
037:
038:            /**
039:             * Creates a new ConversationLogEntry that registers that a given message was sent to a given
040:             * room on a given date.
041:             * 
042:             * @param date the date when the message was sent to the room.
043:             * @param room the room that received the message.
044:             * @param message the message to log as part of the conversation in the room.
045:             * @param sender the real XMPPAddress of the sender (e.g. john@example.org). 
046:             */
047:            public ConversationLogEntry(Date date, MUCRoom room,
048:                    Message message, JID sender) {
049:                this .date = date;
050:                this .subject = message.getSubject();
051:                this .body = message.getBody();
052:                this .sender = sender;
053:                this .roomID = room.getID();
054:                this .nickname = message.getFrom().getResource();
055:            }
056:
057:            /**
058:             * Returns the body of the logged message.
059:             * 
060:             * @return the body of the logged message.
061:             */
062:            public String getBody() {
063:                return body;
064:            }
065:
066:            /**
067:             * Returns the XMPP address of the logged message's sender.
068:             * 
069:             * @return the XMPP address of the logged message's sender.
070:             */
071:            public JID getSender() {
072:                return sender;
073:            }
074:
075:            /**
076:             * Returns the nickname that the user had at the moment that the message was sent to the room.
077:             * 
078:             * @return the nickname that the user had at the moment that the message was sent to the room.
079:             */
080:            public String getNickname() {
081:                return nickname;
082:            }
083:
084:            /**
085:             * Returns the subject of the logged message.
086:             * 
087:             * @return the subject of the logged message.
088:             */
089:            public String getSubject() {
090:                return subject;
091:            }
092:
093:            /**
094:             * Returns the date when the logged message was sent to the room.
095:             * 
096:             * @return the date when the logged message was sent to the room.
097:             */
098:            public Date getDate() {
099:                return date;
100:            }
101:
102:            /**
103:             * Returns the ID of the room where the message was sent.
104:             * 
105:             * @return the ID of the room where the message was sent.
106:             */
107:            public long getRoomID() {
108:                return roomID;
109:            }
110:
111:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.