public class ChatRoomProviderWrapperImpl extends java.lang.Object implements ChatRoomProviderWrapper
Constructor and Description |
---|
ChatRoomProviderWrapperImpl(ProtocolProviderService protocolProvider)
Creates an instance of ChatRoomProviderWrapper by specifying
the protocol provider, corresponding to the multi user chat account.
|
Modifier and Type | Method and Description |
---|---|
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 |
findChatRoomWrapperForChatRoomID(java.lang.String chatRoomID)
Returns the chat room wrapper contained in this provider that corresponds
to the chat room with the given id.
|
ChatRoomWrapper |
getChatRoom(int index) |
byte[] |
getIcon() |
byte[] |
getImage() |
java.lang.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. |
public ChatRoomProviderWrapperImpl(ProtocolProviderService protocolProvider)
protocolProvider
- protocol provider, corresponding to the multi
user chat account.public java.lang.String getName()
getName
in interface ChatRoomProviderWrapper
public byte[] getIcon()
getIcon
in interface ChatRoomProviderWrapper
public byte[] getImage()
getImage
in interface ChatRoomProviderWrapper
public ChatRoomWrapper getSystemRoomWrapper()
getSystemRoomWrapper
in interface ChatRoomProviderWrapper
public void setSystemRoom(ChatRoom systemRoom)
setSystemRoom
in interface ChatRoomProviderWrapper
systemRoom
- the system room to setpublic ProtocolProviderService getProtocolProvider()
getProtocolProvider
in interface ChatRoomProviderWrapper
public void addChatRoom(ChatRoomWrapper chatRoom)
addChatRoom
in interface ChatRoomProviderWrapper
chatRoom
- the chat room to add.public void removeChatRoom(ChatRoomWrapper chatRoom)
removeChatRoom
in interface ChatRoomProviderWrapper
chatRoom
- the chat room to remove.public boolean containsChatRoom(ChatRoomWrapper chatRoom)
true
if the given chat room is contained in this
provider, otherwise - returns false
.containsChatRoom
in interface ChatRoomProviderWrapper
chatRoom
- the chat room to search for.true
if the given chat room is contained in this
provider, otherwise - returns false
.public ChatRoomWrapper findChatRoomWrapperForChatRoom(ChatRoom chatRoom)
findChatRoomWrapperForChatRoom
in interface ChatRoomProviderWrapper
chatRoom
- the chat room we're looking for.public ChatRoomWrapper findChatRoomWrapperForChatRoomID(java.lang.String chatRoomID)
findChatRoomWrapperForChatRoomID
in interface ChatRoomProviderWrapper
chatRoomID
- the id of the chat room we're looking for.public int countChatRooms()
countChatRooms
in interface ChatRoomProviderWrapper
public ChatRoomWrapper getChatRoom(int index)
getChatRoom
in interface ChatRoomProviderWrapper
public int indexOf(ChatRoomWrapper chatRoomWrapper)
indexOf
in interface ChatRoomProviderWrapper
chatRoomWrapper
- the chat room to search for.public void synchronizeProvider()
ChatRoomWrapper
tries to find the corresponding server stored
ChatRoom
in the specified operation set. Joins automatically all
found chat rooms.synchronizeProvider
in interface ChatRoomProviderWrapper
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.