Package org.silverpeas.core.chat.servers
Class OpenfireServer
- java.lang.Object
-
- org.silverpeas.core.chat.servers.OpenfireServer
-
- All Implemented Interfaces:
ChatServer
@Service public class OpenfireServer extends Object implements ChatServer
Openfire server management service
It implements the access mechanism to the XMPP server OpenFire.
- Author:
- remipassmoilesel
-
-
Constructor Summary
Constructors Constructor Description OpenfireServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createRelationShip(User user1, User user2)
Creates a relationship between the two specified user in the chat server.void
createUser(User user)
Creates an account in the chat server for the specified user.void
deleteRelationShip(User user1, User user2)
Deletes the relationship existing between the two specified user in the chat server.void
deleteUser(User user)
Deletes in the chat server the account of the specified user.boolean
isUserExisting(User user)
Is the specified user has already an account in the chat server?-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.chat.servers.ChatServer
isAllowed, isUserDomainSupported
-
-
-
-
Method Detail
-
createUser
public void createUser(User user)
Description copied from interface:ChatServer
Creates an account in the chat server for the specified user. The user login in lower case (without any domain part if any) is used as the chat login and the API token is used as password. Be caution with email addresses used as login because they contain a domain part and domain parts are not supported in login by chat servers. Before creating the account, all domain part or so such interpreted, are first removed from the user login.- Specified by:
createUser
in interfaceChatServer
- Parameters:
user
- a Silverpeas user.
-
deleteUser
public void deleteUser(User user)
Description copied from interface:ChatServer
Deletes in the chat server the account of the specified user.- Specified by:
deleteUser
in interfaceChatServer
- Parameters:
user
- a Silverpeas user.
-
createRelationShip
public void createRelationShip(User user1, User user2)
Description copied from interface:ChatServer
Creates a relationship between the two specified user in the chat server. If the relationship already exists, does nothing.- Specified by:
createRelationShip
in interfaceChatServer
- Parameters:
user1
- a Silverpeas user.user2
- another Silverpeas user.
-
deleteRelationShip
public void deleteRelationShip(User user1, User user2)
Description copied from interface:ChatServer
Deletes the relationship existing between the two specified user in the chat server.- Specified by:
deleteRelationShip
in interfaceChatServer
- Parameters:
user1
- a Silverpeas user.user2
- another Silverpeas user.
-
isUserExisting
public boolean isUserExisting(User user)
Description copied from interface:ChatServer
Is the specified user has already an account in the chat server?- Specified by:
isUserExisting
in interfaceChatServer
- Parameters:
user
- a Silverpeas user.- Returns:
- true if the user has an account in the chat server, false otherwise.
-
-