Package lumis.portal.monitor.impl
Class MonitorUser
- java.lang.Object
-
- lumis.portal.monitor.impl.MonitorUser
-
public class MonitorUser extends Object
A monitored user.- Since:
- 11.0.0
- Version:
- $Revision: 24861 $ $Date: 2022-02-23 17:31:18 -0300 (Wed, 23 Feb 2022) $
-
-
Constructor Summary
Constructors Constructor Description MonitorUser(String id)
Creates a new monitor user with the specified identifier.MonitorUser(String id, String trackId)
Creates a new monitor user with the specified identifier and track identifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MonitorUser
find(String monitorUserId)
Returns the monitor user that corresponds to the given identifier.static MonitorUser
findByTrackId(String trackId)
Return the monitor user by its track identifier if it exists.static MonitorUser
findMonitorUserByFriendlyId(String friendlyId)
Return monitor user by its friendly identifier if it exists.static MonitorUser
findMonitorUserByVisitorId(long visitorId)
Return monitor user by its visitor identifier if it exists.static MonitorUser
findOrCreateByTrackId(String trackId)
Returns the monitor user with the given track identifier, or persists a new one if none exists.Collection<UserConsent>
getConsents()
Returns the consents.Date
getCreatedDateTime()
Returns the date-time this user was created.Map<UserAttribute,List<Object>>
getCustomTrustedAttributes()
Returns custom untrusted user attributes.Map<UserAttribute,List<Object>>
getCustomUntrustedAttributes()
Returns custom untrusted user attributes.String
getFriendlyId()
Returns the friendly identifier of this user.String
getId()
Returns the identifier of this user.String
getTrackId()
Returns the track identifier of this monitor user.String
getTrustedEmail()
Returns the trusted email.String
getTrustedFirstName()
Returns the trusted first name.String
getTrustedFullName()
Returns the trusted full name of this user.String
getTrustedLastName()
Returns the trusted last name.String
getTrustedMiddleName()
Returns the trusted middle Name.String
getUntrustedEmail()
Returns the untrusted email of this user.String
getUntrustedFirstName()
Returns the untrusted first name of this user.String
getUntrustedFullName()
Returns the untrusted full name of this user.String
getUntrustedLastName()
Returns the untrusted last name of this user.String
getUntrustedMiddleName()
Returns the untrusted middle name of this user.long
getVisitorId()
Returns a auto-increment identifier that offers a simpler way to differentiate visitors.protected boolean
isLoadedFromDatabase()
Returns the loadedFromDatabase.void
scheduleReindex()
Schedules the reindexing of this monitor user on big data.void
setFriendlyId(String friendlyId)
Sets the friendly identifier of this user.void
setTrustedEmail(String tEmail)
Sets the trusted email.void
setTrustedFirstName(String tFirstName)
Sets the trusted first name.void
setTrustedLastName(String tLastName)
Sets the trusted last name.void
setTrustedMiddleName(String tMiddleName)
Sets the trusted middle name.void
setUntrustedEmail(String email)
Sets the untrusted email of this user.void
setUntrustedFirstName(String firstName)
Sets the untrusted first name of this user.void
setUntrustedLastName(String lastName)
Sets the untrusted last name of this user.void
setUntrustedMiddleName(String middleName)
Sets the untrusted middle name of this user.
-
-
-
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
-
getUntrustedFullName
public String getUntrustedFullName()
Returns the untrusted full name of this user. It is calculated from thegetUntrustedFirstName()
,getUntrustedMiddleName()
andgetUntrustedLastName()
.- Returns:
- the untrusted full name of this user.
- 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
-
findOrCreateByTrackId
public static MonitorUser findOrCreateByTrackId(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 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
-
getTrustedFullName
public String getTrustedFullName()
Returns the trusted full name of this user. It is calculated from thegetTrustedFirstName()
,getTrustedMiddleName()
andgetTrustedLastName()
.- Returns:
- the trusted full name of this user.
- 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
-
-