Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.chat.conference
Class ChatRoomProviderWrapper

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.chat.conference.ChatRoomProviderWrapper

public class ChatRoomProviderWrapper
extends Object

Author:
Yana Stamcheva, Damian Minkov

Constructor Summary
ChatRoomProviderWrapper(ProtocolProviderService protocolProvider)
          Creates an instance of ChatRoomProviderWrapper by specifying the protocol provider, corresponding to the multi user chat account.
 
Method Summary
 void addChatRoom(ChatRoomWrapper chatRoom)
          Adds the given chat room to this chat room provider.
 boolean containsChatRoom(ChatRoomWrapper chatRoom)
          Returns true if the given chat room is contained in this provider, otherwise - returns false.
 int countChatRooms()
          Returns the number of chat rooms contained in this provider.
 ChatRoomWrapper findChatRoomWrapperForChatRoom(ChatRoom chatRoom)
          Returns the chat room wrapper contained in this provider that corresponds to the given chat room.
 ChatRoomWrapper getChatRoom(int index)
           
 byte[] getIcon()
           
 byte[] getImage()
           
 String getName()
          Returns the name of this chat room provider.
 ProtocolProviderService getProtocolProvider()
          Returns the protocol provider service corresponding to this server wrapper.
 ChatRoomWrapper getSystemRoomWrapper()
          Returns the system room wrapper corresponding to this server.
 int indexOf(ChatRoomWrapper chatRoomWrapper)
          Returns the index of the given chat room in this provider.
 void removeChatRoom(ChatRoomWrapper chatRoom)
          Removes the given chat room from this provider.
 void setSystemRoom(ChatRoom systemRoom)
          Sets the system room corresponding to this server.
 void synchronizeProvider()
          Goes through the locally stored chat rooms list and for each ChatRoomWrapper tries to find the corresponding server stored ChatRoom in the specified operation set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatRoomProviderWrapper

public ChatRoomProviderWrapper(ProtocolProviderService protocolProvider)
Creates an instance of ChatRoomProviderWrapper by specifying the protocol provider, corresponding to the multi user chat account.

Parameters:
protocolProvider - protocol provider, corresponding to the multi user chat account.
Method Detail

getName

public String getName()
Returns the name of this chat room provider.

Returns:
the name of this chat room provider.

getIcon

public byte[] getIcon()

getImage

public byte[] getImage()

getSystemRoomWrapper

public ChatRoomWrapper getSystemRoomWrapper()
Returns the system room wrapper corresponding to this server.

Returns:
the system room wrapper corresponding to this server.

setSystemRoom

public void setSystemRoom(ChatRoom systemRoom)
Sets the system room corresponding to this server.

Parameters:
systemRoom - the system room to set

getProtocolProvider

public ProtocolProviderService getProtocolProvider()
Returns the protocol provider service corresponding to this server wrapper.

Returns:
the protocol provider service corresponding to this server wrapper.

addChatRoom

public void addChatRoom(ChatRoomWrapper chatRoom)
Adds the given chat room to this chat room provider.

Parameters:
chatRoom - the chat room to add.

removeChatRoom

public void removeChatRoom(ChatRoomWrapper chatRoom)
Removes the given chat room from this provider.

Parameters:
chatRoom - the chat room to remove.

containsChatRoom

public boolean containsChatRoom(ChatRoomWrapper chatRoom)
Returns true if the given chat room is contained in this provider, otherwise - returns false.

Parameters:
chatRoom - the chat room to search for.
Returns:
true if the given chat room is contained in this provider, otherwise - returns false.

findChatRoomWrapperForChatRoom

public ChatRoomWrapper findChatRoomWrapperForChatRoom(ChatRoom chatRoom)
Returns the chat room wrapper contained in this provider that corresponds to the given chat room.

Parameters:
chatRoom - the chat room we're looking for.
Returns:
the chat room wrapper contained in this provider that corresponds to the given chat room.

countChatRooms

public int countChatRooms()
Returns the number of chat rooms contained in this provider.

Returns:
the number of chat rooms contained in this provider.

getChatRoom

public ChatRoomWrapper getChatRoom(int index)

indexOf

public int indexOf(ChatRoomWrapper chatRoomWrapper)
Returns the index of the given chat room in this provider.

Parameters:
chatRoomWrapper - the chat room to search for.
Returns:
the index of the given chat room in this provider.

synchronizeProvider

public void synchronizeProvider()
Goes through the locally stored chat rooms list and for each ChatRoomWrapper tries to find the corresponding server stored ChatRoom in the specified operation set. Joins automatically all found chat rooms.


Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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