Class UserServiceImpl

  • All Implemented Interfaces:
    org.exoplatform.chat.services.UserService

    @Named("userService")
    @ApplicationScoped
    @Singleton
    public class UserServiceImpl
    extends Object
    implements org.exoplatform.chat.services.UserService
    • Constructor Detail

      • UserServiceImpl

        public UserServiceImpl()
    • Method Detail

      • toggleFavorite

        public void toggleFavorite​(String user,
                                   String targetUser)
        Specified by:
        toggleFavorite in interface org.exoplatform.chat.services.UserService
      • addFavorite

        public void addFavorite​(String user,
                                String room)
        Specified by:
        addFavorite in interface org.exoplatform.chat.services.UserService
      • removeFavorite

        public void removeFavorite​(String user,
                                   String room)
        Specified by:
        removeFavorite in interface org.exoplatform.chat.services.UserService
      • setPreferredNotification

        public void setPreferredNotification​(String user,
                                             String notifManner)
                                      throws Exception
        This methode is responsible for setting a notification channel for a specific user available channels : -on-site -desktop -bip
        Specified by:
        setPreferredNotification in interface org.exoplatform.chat.services.UserService
        Throws:
        Exception
      • setNotificationTrigger

        public void setNotificationTrigger​(String user,
                                           String notifCond)
                                    throws Exception
        This methode is responsible for setting a notification triggers for a specific user available triggers : -mention -even-on-do-not-disturb
        Specified by:
        setNotificationTrigger in interface org.exoplatform.chat.services.UserService
        Throws:
        Exception
      • setRoomNotificationTrigger

        public void setRoomNotificationTrigger​(String user,
                                               String room,
                                               String notifCondition,
                                               String notifConditionType,
                                               long time)
                                        throws Exception
        This methode is responsible for setting a notification triggers for a specific user in a specific room available triggers : -mention -key-words
        Specified by:
        setRoomNotificationTrigger in interface org.exoplatform.chat.services.UserService
        Throws:
        Exception
      • getUserDesktopNotificationSettings

        public org.exoplatform.chat.model.NotificationSettingsBean getUserDesktopNotificationSettings​(String user)
                                                                                               throws org.json.JSONException
        Specified by:
        getUserDesktopNotificationSettings in interface org.exoplatform.chat.services.UserService
        Throws:
        org.json.JSONException
      • isFavorite

        public boolean isFavorite​(String user,
                                  String targetUser)
        Specified by:
        isFavorite in interface org.exoplatform.chat.services.UserService
      • addUserFullName

        public void addUserFullName​(String user,
                                    String fullname)
        Specified by:
        addUserFullName in interface org.exoplatform.chat.services.UserService
      • addUserEmail

        public void addUserEmail​(String user,
                                 String email)
        Specified by:
        addUserEmail in interface org.exoplatform.chat.services.UserService
      • deleteUser

        public void deleteUser​(String user)
        Specified by:
        deleteUser in interface org.exoplatform.chat.services.UserService
      • setEnabledUser

        public void setEnabledUser​(String user,
                                   Boolean isEnabled)
        Specified by:
        setEnabledUser in interface org.exoplatform.chat.services.UserService
      • setExternalUser

        public void setExternalUser​(String user,
                                    String isExternal)
        Specified by:
        setExternalUser in interface org.exoplatform.chat.services.UserService
      • setSpaces

        public void setSpaces​(String user,
                              List<org.exoplatform.chat.model.SpaceBean> spaces)
        Specified by:
        setSpaces in interface org.exoplatform.chat.services.UserService
      • addTeamRoom

        public void addTeamRoom​(String user,
                                String teamRoomId)
        Specified by:
        addTeamRoom in interface org.exoplatform.chat.services.UserService
      • addTeamUsers

        public void addTeamUsers​(String teamRoomId,
                                 List<String> users)
        Specified by:
        addTeamUsers in interface org.exoplatform.chat.services.UserService
      • removeTeamUsers

        public void removeTeamUsers​(String teamRoomId,
                                    List<String> users)
        Specified by:
        removeTeamUsers in interface org.exoplatform.chat.services.UserService
      • getTeams

        public List<org.exoplatform.chat.model.RoomBean> getTeams​(String user)
        Specified by:
        getTeams in interface org.exoplatform.chat.services.UserService
      • getRoom

        public org.exoplatform.chat.model.RoomBean getRoom​(String user,
                                                           String roomId)
        Specified by:
        getRoom in interface org.exoplatform.chat.services.UserService
      • getSpaces

        public List<org.exoplatform.chat.model.SpaceBean> getSpaces​(String user)
        Specified by:
        getSpaces in interface org.exoplatform.chat.services.UserService
      • getUsersInRoomChatOneToOne

        public List<org.exoplatform.chat.model.UserBean> getUsersInRoomChatOneToOne​(String roomId)
        Specified by:
        getUsersInRoomChatOneToOne in interface org.exoplatform.chat.services.UserService
      • getUsers

        public List<org.exoplatform.chat.model.UserBean> getUsers​(String roomId)
        Specified by:
        getUsers in interface org.exoplatform.chat.services.UserService
      • getUsers

        public List<org.exoplatform.chat.model.UserBean> getUsers​(String filter,
                                                                  boolean fullBean)
        Specified by:
        getUsers in interface org.exoplatform.chat.services.UserService
      • getUsers

        public List<org.exoplatform.chat.model.UserBean> getUsers​(String roomId,
                                                                  String filter,
                                                                  int limit)
        Specified by:
        getUsers in interface org.exoplatform.chat.services.UserService
      • getUsers

        public List<org.exoplatform.chat.model.UserBean> getUsers​(String roomId,
                                                                  List<String> onlineUsers,
                                                                  String filter,
                                                                  int limit,
                                                                  boolean onlyOnlineUsers)
        Specified by:
        getUsers in interface org.exoplatform.chat.services.UserService
      • setStatus

        public String setStatus​(String user,
                                String status)
        Specified by:
        setStatus in interface org.exoplatform.chat.services.UserService
      • setAsAdmin

        public void setAsAdmin​(String user,
                               boolean isAdmin)
        Specified by:
        setAsAdmin in interface org.exoplatform.chat.services.UserService
      • isAdmin

        public boolean isAdmin​(String user)
        Specified by:
        isAdmin in interface org.exoplatform.chat.services.UserService
      • getStatus

        public String getStatus​(String user)
        Specified by:
        getStatus in interface org.exoplatform.chat.services.UserService
      • getUserFullName

        public String getUserFullName​(String user)
        Specified by:
        getUserFullName in interface org.exoplatform.chat.services.UserService
      • getUser

        public org.exoplatform.chat.model.UserBean getUser​(String user)
        Specified by:
        getUser in interface org.exoplatform.chat.services.UserService
      • getUser

        public org.exoplatform.chat.model.UserBean getUser​(String user,
                                                           boolean withFavorites)
        Specified by:
        getUser in interface org.exoplatform.chat.services.UserService
      • getUsersFilterBy

        public List<String> getUsersFilterBy​(String user,
                                             String room,
                                             String type)
        Specified by:
        getUsersFilterBy in interface org.exoplatform.chat.services.UserService
      • getNumberOfUsers

        public int getNumberOfUsers()
        Specified by:
        getNumberOfUsers in interface org.exoplatform.chat.services.UserService
      • getUsersCount

        public long getUsersCount​(String room,
                                  String filter)
        Specified by:
        getUsersCount in interface org.exoplatform.chat.services.UserService
      • getActiveUsersCount

        public long getActiveUsersCount​(String room,
                                        String filter)
        Specified by:
        getActiveUsersCount in interface org.exoplatform.chat.services.UserService