[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/service/protocol/event/, /sip-communicator/src/net/java/sip/communicator/impl/gui/main/...

yanas at dev.java.net yanas at dev.java.net
Thu Apr 26 13:22:03 CEST 2007


User: yanas   
Date: 2007-04-26 11:22:03+0000
Modified:
   sip-communicator/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageReceivedEvent.java
   sip-communicator/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageDeliveredEvent.java
   sip-communicator/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageDeliveryFailedEvent.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatPanel.java

Log:
 ChatRoom message events source is changed from Message to ChatRoom

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/service/protocol/event/
==================================================================================

File [changed]: ChatRoomMessageReceivedEvent.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageReceivedEvent.java?r1=1.1&r2=1.2
Delta lines:  +14 -15
---------------------
--- ChatRoomMessageReceivedEvent.java	2007-02-22 12:36:57+0000	1.1
+++ ChatRoomMessageReceivedEvent.java	2007-04-26 11:22:00+0000	1.2
@@ -29,31 +29,30 @@
     private Date timestamp = null;
 
     /**
-     * The name/id of the ChatRoom where this message was received.
+     * The received <tt>Message</tt>.
      */
-    private String chatRoomID = null;
+    private Message message = null;
 
     /**
      * Creates a <tt>MessageReceivedEvent</tt> representing reception of the
      * <tt>source</tt> message received from the specified <tt>from</tt>
      * contact.
      *
-     * @param source the <tt>Message</tt> whose reception this event represents.
+     * @param source the <tt>ChatRoom</tt> for which the message is received.
      * @param from the <tt>Contact</tt> that has sent this message.
      * @param timestamp the exact date when the event ocurred.
-     * @param chatRoomID the name/id of the chat room where this message has
-     * been received
+     * @param message the received <tt>Message</tt>.
      */
-    public ChatRoomMessageReceivedEvent(Message source,
+    public ChatRoomMessageReceivedEvent(ChatRoom source,
                                         Contact from,
                                         Date timestamp,
-                                        String chatRoomID)
+                                        Message message)
     {
         super(source);
 
         this.from = from;
         this.timestamp = timestamp;
-        this.chatRoomID = chatRoomID;
+        this.message = message;
     }
 
     /**
@@ -69,12 +68,12 @@
     }
 
     /**
-     * Returns the message that triggered this event
+     * Returns the received message.
      * @return the <tt>Message</tt> that triggered this event.
      */
-    public Message getSourceMessage()
+    public Message getMessage()
     {
-        return (Message)getSource();
+        return message;
     }
 
     /**
@@ -87,11 +86,11 @@
     }
 
     /**
-     * Returns the name of the chat room where this message has been received.
-     * @return the name of the chat room where this message has been received.
+     * Returns the <tt>ChatRoom</tt> that triggered this event.
+     * @return the <tt>ChatRoom</tt> that triggered this event.
      */
-    public String getChatRoomID()
+    public ChatRoom getSourceChatRoom()
     {
-        return chatRoomID;
+        return (ChatRoom) getSource();
     }
 }

File [changed]: ChatRoomMessageDeliveredEvent.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageDeliveredEvent.java?r1=1.1&r2=1.2
Delta lines:  +13 -15
---------------------
--- ChatRoomMessageDeliveredEvent.java	2007-02-22 12:36:32+0000	1.1
+++ ChatRoomMessageDeliveredEvent.java	2007-04-26 11:22:00+0000	1.2
@@ -30,31 +30,31 @@
      private Date timestamp = null;
 
      /**
-      * The name/id of the chat room where the message was delivered.
+      * The received <tt>Message</tt>.
       */
-     private String chatRoomID = null;
+     private Message message = null;
 
      /**
       * Creates a <tt>MessageDeliveredEvent</tt> representing delivery of the
       * <tt>source</tt> message to the specified <tt>to</tt> contact.
       *
-      * @param source the <tt>Message</tt> whose delivery this event represents.
+      * @param source the <tt>ChatRoom</tt> which triggered this event.
       * @param to the <tt>Contact</tt> that this message was sent to.
       * @param timestamp a date indicating the exact moment when the event
       * ocurred
       * @param chatRoomID the name/id of the chatroom where this message was
       * delivered.
       */
-     public ChatRoomMessageDeliveredEvent(Message source,
+     public ChatRoomMessageDeliveredEvent(ChatRoom source,
                                           Contact to,
                                           Date timestamp,
-                                          String chatRoomID)
+                                          Message message)
      {
          super(source);
 
          this.to = to;
          this.timestamp = timestamp;
-         this.chatRoomID = chatRoomID;
+         this.message = message;
      }
 
      /**
@@ -70,15 +70,14 @@
      }
 
      /**
-      * Returns the message that triggered this event
+      * Returns the received message.
       * @return the <tt>Message</tt> that triggered this event.
       */
-     public Message getSourceMessage()
+     public Message getMessage()
      {
-         return (Message) getSource();
+         return message;
      }
 
-
      /**
       * A timestamp indicating the exact date when the event ocurred.
       * @return a Date indicating when the event ocurred.
@@ -89,12 +88,11 @@
      }
 
      /**
-      * Returns the name of the chat room where this message has been delivered.
-      * @return the name of the chat room where this message has been delivered.
+      * Returns the <tt>ChatRoom</tt> that triggered this event.
+      * @return the <tt>ChatRoom</tt> that triggered this event.
       */
-     public String getChatRoomID()
+     public ChatRoom getSourceChatRoom()
      {
-         return chatRoomID;
+         return (ChatRoom) getSource();
      }
-
 }

File [changed]: ChatRoomMessageDeliveryFailedEvent.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageDeliveryFailedEvent.java?r1=1.1&r2=1.2
Delta lines:  +19 -13
---------------------
--- ChatRoomMessageDeliveryFailedEvent.java	2007-02-22 12:36:41+0000	1.1
+++ ChatRoomMessageDeliveryFailedEvent.java	2007-04-26 11:22:00+0000	1.2
@@ -64,9 +64,9 @@
      private Date timestamp = null;
 
      /**
-      * The name/id of the chat room where the message was delivered.
+      * The received <tt>Message</tt>.
       */
-     private String chatRoomID = null;
+     private Message message = null;
 
      /**
       * Creates a <tt>MessageDeliveryFailedEvent</tt> indicating failure of
@@ -78,21 +78,20 @@
       * @param errorCode an errorCode indicating the reason of the failure.
       * @param timestamp the exacte Date when it was determined that delivery
       * had failed.
-      * @param chatRoomID the name/id of the chat room that the failed message
-      * was destined to.
+      * @param message the received <tt>Message</tt>.
       */
-     public ChatRoomMessageDeliveryFailedEvent(Message source,
+     public ChatRoomMessageDeliveryFailedEvent(ChatRoom source,
                                                Contact to,
                                                int errorCode,
                                                Date timestamp,
-                                               String chatRoomID)
+                                               Message message)
      {
          super(source);
 
          this.to = to;
          this.errorCode = errorCode;
          this.timestamp = timestamp;
-         this.chatRoomID = chatRoomID;
+         this.message = message;
      }
      /**
       * Returns a reference to the <tt>Contact</tt> that the source (failed)
@@ -107,6 +106,15 @@
      }
 
      /**
+      * Returns the received message.
+      * @return the <tt>Message</tt> that triggered this event.
+      */
+     public Message getMessage()
+     {
+         return message;
+     }
+
+     /**
       * Returns an error code descibing the reason for the failure of the
       * message delivery.
       * @return an error code descibing the reason for the failure of the
@@ -130,13 +138,11 @@
      }
 
      /**
-      * Returns the name of the chat room where this message was meant to be
-      * delivered.
-      * @return the name of the chat room where this message was meant to be
-      * delivered.
+      * Returns the <tt>ChatRoom</tt> that triggered this event.
+      * @return the <tt>ChatRoom</tt> that triggered this event.
       */
-     public String getChatRoomID()
+     public ChatRoom getSourceChatRoom()
      {
-         return chatRoomID;
+         return (ChatRoom) getSource();
      }
 }

Directory: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/conference/
=========================================================================================

File [changed]: ConferenceChatPanel.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatPanel.java?r1=1.5&r2=1.6
Delta lines:  +2 -2
-------------------
--- ConferenceChatPanel.java	2007-04-24 12:26:17+0000	1.5
+++ ConferenceChatPanel.java	2007-04-26 11:22:00+0000	1.6
@@ -223,7 +223,7 @@
 
         Contact sourceContact = evt.getSourceContact();
         Date date = evt.getTimestamp();
-        Message message = evt.getSourceMessage();
+        Message message = evt.getMessage();
 
         ChatRoom chatRoom = (ChatRoom) evt.getSource();
 
@@ -257,7 +257,7 @@
         logger.trace("MESSAGE DELIVERED to contact: "
             + evt.getDestinationContact().getAddress());
 
-        Message msg = evt.getSourceMessage();
+        Message msg = evt.getMessage();
 
         ChatPanel chatPanel = null;
 




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net





More information about the commits mailing list