Class MonitorUser


  • public class MonitorUser
    extends Object
    A monitored user.
    Since:
    11.0.0
    Version:
    $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
    • Constructor Detail

      • MonitorUser

        public MonitorUser​(String id,
                           String trackId)
        Creates a new monitor user with the specified identifier and track identifier.
        Parameters:
        id - the identifier.
        trackId - the track identifier.
        Since:
        12.0.0
      • MonitorUser

        public MonitorUser​(String id)
        Creates a new monitor user with the specified identifier.
        Parameters:
        id - the identifier.
        Since:
        11.0.0
    • Method Detail

      • getId

        public String getId()
        Returns the identifier of this user.
        Returns:
        the identifier.
        Since:
        11.0.0
      • getTrackId

        public String getTrackId()
        Returns the track identifier of this monitor user.
        Returns:
        the track identifier.
        Since:
        12.0.0
      • getVisitorId

        public long getVisitorId()
        Returns a auto-increment identifier that offers a simpler way to differentiate visitors.
        Returns:
        the auto-increment identifier.
        Throws:
        NullPointerException - if the value for this field is not available. This may happen if this method is called on a entity that was not read from the database.
        Since:
        11.0.0
      • getCreatedDateTime

        public Date getCreatedDateTime()
        Returns the date-time this user was created.
        Returns:
        the date-time this user was created.
        Since:
        11.0.0
      • getFriendlyId

        public String getFriendlyId()
        Returns the friendly identifier of this user.
        Returns:
        the friendly identifier of this user or null if it is not set.
        Since:
        11.0.0
      • setFriendlyId

        public void setFriendlyId​(String friendlyId)
                           throws PortalException
        Sets the friendly identifier of this user.
        Parameters:
        friendlyId - the friendly identifier.
        Throws:
        PortalException
        Since:
        11.0.0
      • getUntrustedFirstName

        public String getUntrustedFirstName()
        Returns the untrusted first name of this user.
        Returns:
        the untrusted first name of this user or null if it is not set.
        Since:
        12.3.0
      • setUntrustedFirstName

        public void setUntrustedFirstName​(String firstName)
        Sets the untrusted first name of this user.
        Parameters:
        untrusted - firstName the first name.
        Since:
        12.3.0
      • getUntrustedMiddleName

        public String getUntrustedMiddleName()
        Returns the untrusted middle name of this user.
        Returns:
        the untrusted middle name of this user or null if it is not set.
        Since:
        12.3.0
      • setUntrustedMiddleName

        public void setUntrustedMiddleName​(String middleName)
        Sets the untrusted middle name of this user.
        Parameters:
        middleName - the middle name.
        Since:
        12.3.0
      • getUntrustedLastName

        public String getUntrustedLastName()
        Returns the untrusted last name of this user.
        Returns:
        the last name of this user or null if it is not set.
        Since:
        12.3.0
      • setUntrustedLastName

        public void setUntrustedLastName​(String lastName)
        Sets the untrusted last name of this user.
        Parameters:
        lastName - the last name.
        Since:
        12.3.0
      • getUntrustedEmail

        public String getUntrustedEmail()
        Returns the untrusted email of this user.
        Returns:
        the email of this user or null if it is not set.
        Since:
        12.3.0
      • setUntrustedEmail

        public void setUntrustedEmail​(String email)
        Sets the untrusted email of this user.
        Parameters:
        email - the email.
        Since:
        12.3.0
      • getConsents

        public Collection<UserConsent> getConsents()
        Returns the consents.
        Returns:
        the consents
        Since:
        12.3.0
      • scheduleReindex

        public void scheduleReindex()
                             throws PortalException
        Schedules the reindexing of this monitor user on big data.
        Throws:
        PortalException
        Since:
        11.0.0
      • find

        public static MonitorUser find​(String monitorUserId)
        Returns the monitor user that corresponds to the given identifier. Uses information of monitor user identifier mappings to find the corresponding monitor user if necessary.

        This method is intended to be used as a replacement of entityManager.find(MonitorUser.class, monitorUserId) when monitor user identifier mapping is to be taken into account.

        Parameters:
        monitorUserId - the monitor user identifier.
        Returns:
        the monitor user, or null if no monitor user corresponds to the given identifier.
        Since:
        11.0.0
      • findMonitorUserByFriendlyId

        public static MonitorUser findMonitorUserByFriendlyId​(String friendlyId)
        Return monitor user by its friendly identifier if it exists.
        Parameters:
        friendlyId - the friendly identifier.
        Returns:
        A monitor user.
        Since:
        11.0.0
      • findMonitorUserByVisitorId

        public static MonitorUser findMonitorUserByVisitorId​(long visitorId)
        Return monitor user by its visitor identifier if it exists.
        Parameters:
        visitorId - the visitor identifier.
        Returns:
        A monitor user.
        Since:
        12.0.0
      • findByTrackId

        public static MonitorUser findByTrackId​(String trackId)
        Return the monitor user by its track identifier if it exists.
        Parameters:
        trackId - the track identifier.
        Returns:
        the user, or null if no user with the given track identifier was found.
        Since:
        12.0.0
      • getTrustedFirstName

        public String getTrustedFirstName()
        Returns the trusted first name.
        Returns:
        the trusted first name.
        Since:
        12.3.0
      • getTrustedMiddleName

        public String getTrustedMiddleName()
        Returns the trusted middle Name.
        Returns:
        the trusted middle Name.
        Since:
        12.3.0
      • getTrustedLastName

        public String getTrustedLastName()
        Returns the trusted last name.
        Returns:
        the trusted last name.
        Since:
        12.3.0
      • getTrustedEmail

        public String getTrustedEmail()
        Returns the trusted email.
        Returns:
        the trusted email.
        Since:
        12.3.0
      • setTrustedFirstName

        public void setTrustedFirstName​(String tFirstName)
        Sets the trusted first name.
        Parameters:
        tFirstName - the trusted first name value to set.
        Since:
        12.3.0
      • setTrustedMiddleName

        public void setTrustedMiddleName​(String tMiddleName)
        Sets the trusted middle name.
        Parameters:
        tMiddleName - the trusted middle name value to set.
        Since:
        12.3.0
      • setTrustedLastName

        public void setTrustedLastName​(String tLastName)
        Sets the trusted last name.
        Parameters:
        tLastName - the trusted last name value to set.
        Since:
        12.3.0
      • setTrustedEmail

        public void setTrustedEmail​(String tEmail)
        Sets the trusted email.
        Parameters:
        tEmail - the trusted email value to set.
        Since:
        12.3.0
      • isLoadedFromDatabase

        protected boolean isLoadedFromDatabase()
        Returns the loadedFromDatabase.
        Returns:
        the loadedFromDatabase
        Since:
        14.0.0
      • getCustomUntrustedAttributes

        public Map<UserAttribute,​List<Object>> getCustomUntrustedAttributes()
        Returns custom untrusted user attributes.
        Returns:
        custom untrusted user attributes.
        Since:
        14.0.0
      • getCustomTrustedAttributes

        public Map<UserAttribute,​List<Object>> getCustomTrustedAttributes()
        Returns custom untrusted user attributes.
        Returns:
        custom untrusted user attributes.
        Since:
        14.0.0