Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.chatroomslist
Class AdHocChatRoomList

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.chatroomslist.AdHocChatRoomList

public class AdHocChatRoomList
extends Object

The AdHocChatRoomsList is the list containing all ad-hoc chat rooms.

Author:
Valentin Martinet

Constructor Summary
AdHocChatRoomList()
           
 
Method Summary
 void addAdHocChatRoom(AdHocChatRoomWrapper adHocChatRoomWrapper)
          Adds a chat room to this list.
 void addChatProvider(ProtocolProviderService pps)
          Adds a chat server and all its existing ad-hoc chat rooms.
 AdHocChatRoomWrapper findChatRoomWrapperFromAdHocChatRoom(AdHocChatRoom adHocChatRoom)
          Returns the AdHocChatRoomWrapper that correspond to the given AdHocChatRoom.
 AdHocChatRoomProviderWrapper findServerWrapperFromProvider(ProtocolProviderService protocolProvider)
          Returns the AdHocChatRoomProviderWrapper that correspond to the given ProtocolProviderService.
 void loadList()
          Initializes the list of ad-hoc chat rooms.
 void removeChatProvider(ProtocolProviderService pps)
          Removes the corresponding server and all related ad-hoc chat rooms from this list.
 void removeChatRoom(AdHocChatRoomWrapper adHocChatRoomWrapper)
          Removes the given AdHocChatRoom from the list of all ad-hoc chat rooms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdHocChatRoomList

public AdHocChatRoomList()
Method Detail

loadList

public void loadList()
Initializes the list of ad-hoc chat rooms.


addChatProvider

public void addChatProvider(ProtocolProviderService pps)
Adds a chat server and all its existing ad-hoc chat rooms.

Parameters:
pps - the ProtocolProviderService corresponding to the chat server

removeChatProvider

public void removeChatProvider(ProtocolProviderService pps)
Removes the corresponding server and all related ad-hoc chat rooms from this list.

Parameters:
pps - the ProtocolProviderService corresponding to the server to remove

addAdHocChatRoom

public void addAdHocChatRoom(AdHocChatRoomWrapper adHocChatRoomWrapper)
Adds a chat room to this list.

Parameters:
adHocChatRoomWrapper - the AdHocChatRoom to add

removeChatRoom

public void removeChatRoom(AdHocChatRoomWrapper adHocChatRoomWrapper)
Removes the given AdHocChatRoom from the list of all ad-hoc chat rooms.

Parameters:
adHocChatRoomWrapper - the AdHocChatRoomWrapper to remove

findChatRoomWrapperFromAdHocChatRoom

public AdHocChatRoomWrapper findChatRoomWrapperFromAdHocChatRoom(AdHocChatRoom adHocChatRoom)
Returns the AdHocChatRoomWrapper that correspond to the given AdHocChatRoom. If the list of ad-hoc chat rooms doesn't contain a corresponding wrapper - returns null.

Parameters:
adHocChatRoom - the ChatRoom that we're looking for
Returns:
the ChatRoomWrapper object corresponding to the given ChatRoom

findServerWrapperFromProvider

public AdHocChatRoomProviderWrapper findServerWrapperFromProvider(ProtocolProviderService protocolProvider)
Returns the AdHocChatRoomProviderWrapper that correspond to the given ProtocolProviderService. If the list doesn't contain a corresponding wrapper - returns null.

Parameters:
protocolProvider - the protocol provider that we're looking for
Returns:
the AdHocChatRoomProvider object corresponding to the given ProtocolProviderService

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.