Class MonitorUser


  • public class MonitorUser
    extends java.lang.Object
    A monitored user.
    Since:
    11.0.0
    Version:
    $Revision: 24861 $ $Date: 2022-02-23 17:31:18 -0300 (Wed, 23 Feb 2022) $
    • Constructor Detail

      • MonitorUser

        public MonitorUser​(java.lang.String id,
                           java.lang.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​(java.lang.String id)
        Creates a new monitor user with the specified identifier.
        Parameters:
        id - the identifier.
        Since:
        11.0.0
    • Method Detail

      • getId

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

        public java.lang.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:
        java.lang.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 java.util.Date getCreatedDateTime()
        Returns the date-time this user was created.
        Returns:
        the date-time this user was created.
        Since:
        11.0.0
      • getFriendlyId

        public java.lang.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​(java.lang.String friendlyId)
                           throws PortalException
        Sets the friendly identifier of this user.
        Parameters:
        friendlyId - the friendly identifier.
        Throws:
        PortalException
        Since:
        11.0.0
      • getUntrustedFirstName

        public java.lang.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​(java.lang.String firstName)
        Sets the untrusted first name of this user.
        Parameters:
        untrusted - firstName the first name.
        Since:
        12.3.0
      • getUntrustedMiddleName

        public java.lang.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​(java.lang.String middleName)
        Sets the untrusted middle name of this user.
        Parameters:
        middleName - the middle name.
        Since:
        12.3.0
      • getUntrustedLastName

        public java.lang.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​(java.lang.String lastName)
        Sets the untrusted last name of this user.
        Parameters:
        lastName - the last name.
        Since:
        12.3.0
      • getUntrustedEmail

        public java.lang.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​(java.lang.String email)
        Sets the untrusted email of this user.
        Parameters:
        email - the email.
        Since:
        12.3.0
      • getConsents

        public java.util.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​(java.lang.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​(java.lang.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​(java.lang.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
      • findOrCreateByTrackId

        public static MonitorUser findOrCreateByTrackId​(java.lang.String trackId)
        Returns the monitor user with the given track identifier, or persists a new one if none exists.

        The persist of a new monitor user (if necessary) occurs in a own transaction that is committed. But the monitor user returned is always attached to the current transaction.

        Parameters:
        trackId - the track identifier.
        Returns:
        the monitor user.
        Since:
        14.1.0
      • getTrustedFirstName

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

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

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

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

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

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

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

        public void setTrustedEmail​(java.lang.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 java.util.Map<UserAttribute,​java.util.List<java.lang.Object>> getCustomUntrustedAttributes()
        Returns custom untrusted user attributes.
        Returns:
        custom untrusted user attributes.
        Since:
        14.0.0
      • getCustomTrustedAttributes

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