Class UserInfo

  • Direct Known Subclasses:
    GuestInfo, ParticipantInfo

    public class UserInfo
    extends IdentityInfo
    Represent eXo user as a conversation participant for calls. Created by The eXo Platform SAS.
    Version:
    $Id: UserInfo.java 00000 Feb 23, 2017 pnedonosko $
    Author:
    Peter Nedonosko
    • Field Detail

      • TYPE_NAME

        public static final String TYPE_NAME
        The Constant TYPE_NAME.
      • LOG

        protected static final org.exoplatform.services.log.Log LOG
        The Constant LOG.
    • Constructor Detail

      • UserInfo

        public UserInfo​(String userId,
                        String firstName,
                        String lastName)
        Instantiates a new user info.
        Parameters:
        userId - the user id in the system
        firstName - the first type
        lastName - the last type
    • Method Detail

      • isGroup

        public boolean isGroup()
        Checks if it is a group.
        Specified by:
        isGroup in class IdentityInfo
        Returns:
        true, if is a group
      • getFirstName

        public String getFirstName()
        Gets the first name.
        Returns:
        the firstName
      • getLastName

        public String getLastName()
        Gets the last name.
        Returns:
        the lastName
      • addImAccount

        public UserInfo.IMInfo addImAccount​(String type,
                                            String id)
        Adds the user IM account.
        Parameters:
        type - the IM type type (e.g. gtalk)
        id - the IM id
        Returns:
        the added IM info
      • addImAccount

        public void addImAccount​(UserInfo.IMInfo... ims)
        Adds the user IM account(s). Note that if IM with some type already added an another one will be skipped.
        Parameters:
        ims - the IM account(s) to add to the user profile
      • hasImAccount

        public boolean hasImAccount​(String type)
        Checks for IM account associated with the user.
        Parameters:
        type - the IM account type
        Returns:
        true, if successful
      • getImAccount

        public Collection<UserInfo.IMInfo> getImAccount​(String type)
        Gets the IM accounts by type.
        Parameters:
        type - the type
        Returns:
        the IM accounts
      • getState

        public String getState()
        Gets the state.
        Returns:
        the state
      • setState

        public void setState​(String state)
        Sets the state.
        Parameters:
        state - the new state
      • getClientId

        public String getClientId()
        Gets the client id.
        Returns:
        the clientId
      • setClientId

        public void setClientId​(String clientId)
        Sets the client id.
        Parameters:
        clientId - the clientId to set
      • hasSameClientId

        public boolean hasSameClientId​(String clientId)
        Checks for same client id.
        Parameters:
        clientId - the client id
        Returns:
        true, if this user has same client ID (it is set and the same)