Class 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 Detail

      • OpenfireServer

        public OpenfireServer()
    • 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 interface ChatServer
        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 interface ChatServer
        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 interface ChatServer
        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 interface ChatServer
        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 interface ChatServer
        Parameters:
        user - a Silverpeas user.
        Returns:
        true if the user has an account in the chat server, false otherwise.