Package lumis.portal.user
Class UserConfig
- java.lang.Object
-
- lumis.portal.user.UserConfig
-
- All Implemented Interfaces:
java.lang.Cloneable
,ICacheEntry
,ICloneableCacheEntry
@StableMinor(version="16.0", sinceVersion="14.0") public class UserConfig extends java.lang.Object implements ICloneableCacheEntry
Represents a portal user- Since:
- 4.0.6
- Version:
- $Revision: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
USER_ADMINISTRATOR_ID
static java.lang.String
USER_FRAMEWORKCLOCK_ID
static java.lang.String
USER_GUEST_ID
static java.lang.String
USER_PAGECACHE_ID
static java.lang.String
USER_SYSTEM_ID
static int
USER_TYPE_COMMON
static int
USER_TYPE_FRAMEWORK
-
Constructor Summary
Constructors Constructor Description UserConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description UserConfig
clone()
java.lang.String
getChannelId()
java.util.Map<java.lang.String,java.lang.Object>
getCustomAttributes()
java.lang.String
getEmail()
java.lang.String
getFirstName()
java.lang.String
getFriendlyId()
Returns the friendly identifier of this user.java.lang.String
getFullName()
java.lang.String
getId()
java.util.Date
getLastLogin()
Returns the date and time of last login for this user.java.lang.String
getLastName()
java.lang.String
getLogin()
java.lang.String
getMiddleName()
java.lang.String
getOrigin()
Returns the origin of this user.java.lang.String
getPassword()
java.lang.String
getProfileImageHref()
Returns the href of this user profile image.IUserPropertiesReadOnly
getProperties()
IUserProperties
getTrustedProperties()
Returns this user's trusted properties.int
getType()
IUserProperties
getUntrustedProperties()
Returns this user's untrusted properties.long
getVisitorId()
Returns the visitor identifier of this user.boolean
isDisabled()
boolean
isMultiSession()
boolean
isPortalLogin()
Indicates if this user may be logged in normally by the portal's default authenticator.void
setChannelId(java.lang.String channelId)
void
setDisabled(boolean disabled)
void
setEmail(java.lang.String email)
void
setFirstName(java.lang.String firstName)
void
setId(java.lang.String id)
void
setLastName(java.lang.String lastName)
void
setLogin(java.lang.String login)
void
setMiddleName(java.lang.String middleName)
void
setMultiSession(boolean multiSession)
void
setOrigin(java.lang.String origin)
Sets the origin for this user.void
setPassword(java.lang.String password)
void
setPortalLogin(boolean portalLogin)
Sets if this user may be logged in normally by the portal's default authenticator.void
setProfileImage(java.io.InputStream imageStream, java.lang.String mimeType)
Sets the profile image of the given user.void
setType(int type)
-
-
-
Field Detail
-
USER_ADMINISTRATOR_ID
public static final java.lang.String USER_ADMINISTRATOR_ID
- See Also:
- Constant Field Values
-
USER_GUEST_ID
public static final java.lang.String USER_GUEST_ID
- See Also:
- Constant Field Values
-
USER_FRAMEWORKCLOCK_ID
public static final java.lang.String USER_FRAMEWORKCLOCK_ID
- See Also:
- Constant Field Values
-
USER_PAGECACHE_ID
public static final java.lang.String USER_PAGECACHE_ID
- See Also:
- Constant Field Values
-
USER_SYSTEM_ID
public static final java.lang.String USER_SYSTEM_ID
- See Also:
- Constant Field Values
-
USER_TYPE_COMMON
public static final int USER_TYPE_COMMON
- See Also:
- Constant Field Values
-
USER_TYPE_FRAMEWORK
public static final int USER_TYPE_FRAMEWORK
- See Also:
- Constant Field Values
-
-
Method Detail
-
clone
public UserConfig clone()
- Specified by:
clone
in interfaceICloneableCacheEntry
- Overrides:
clone
in classjava.lang.Object
-
isPortalLogin
public boolean isPortalLogin()
Indicates if this user may be logged in normally by the portal's default authenticator.Users whose passwords are authenticated externally and should not use the password in the portal database must have this attribute set to false to prevent from being authenticated against the password stored in the portal database.
- Returns:
- if this user may be logged in normally by the portal's default authenticator.
- Since:
- 4.0.8
-
setPortalLogin
public void setPortalLogin(boolean portalLogin)
Sets if this user may be logged in normally by the portal's default authenticator.- Parameters:
portalLogin
- the value to set.- Since:
- 4.0.8
- See Also:
isPortalLogin()
-
getOrigin
public java.lang.String getOrigin()
Returns the origin of this user. The origin is used to identify from where the user was added, for example, was imported from an external repository.- Returns:
- the origin of this user.
null
indicates the user was added normally. - Since:
- 4.0.8
-
setOrigin
public void setOrigin(java.lang.String origin)
Sets the origin for this user.- Parameters:
origin
- the origin to set.- Since:
- 4.0.8
- See Also:
getOrigin()
-
isDisabled
public boolean isDisabled()
-
setDisabled
public void setDisabled(boolean disabled)
-
getEmail
@Deprecated public java.lang.String getEmail()
-
setEmail
@Deprecated public void setEmail(java.lang.String email)
-
getFirstName
@Deprecated public java.lang.String getFirstName()
-
setFirstName
@Deprecated public void setFirstName(java.lang.String firstName)
-
getId
public java.lang.String getId()
-
setId
public void setId(java.lang.String id)
-
getLastName
@Deprecated public java.lang.String getLastName()
-
setLastName
@Deprecated public void setLastName(java.lang.String lastName)
-
getLogin
public java.lang.String getLogin()
-
setLogin
public void setLogin(java.lang.String login)
-
getMiddleName
@Deprecated public java.lang.String getMiddleName()
-
setMiddleName
@Deprecated public void setMiddleName(java.lang.String middleName)
-
isMultiSession
public boolean isMultiSession()
-
setMultiSession
public void setMultiSession(boolean multiSession)
-
getPassword
public java.lang.String getPassword()
-
setPassword
public void setPassword(java.lang.String password)
-
getType
public int getType()
-
setType
public void setType(int type)
-
getChannelId
public java.lang.String getChannelId()
-
setChannelId
public void setChannelId(java.lang.String channelId)
-
getProfileImageHref
public java.lang.String getProfileImageHref()
Returns the href of this user profile image.- Returns:
- the href of this user profile image.
- Since:
- 8.0.0
-
setProfileImage
public void setProfileImage(java.io.InputStream imageStream, java.lang.String mimeType) throws PortalException
Sets the profile image of the given user.- Parameters:
imageStream
- an input stream of the image to set, ornull
if the current profile image, if any, is to be deleted. This stream will be consumed but not closed by this method.mimeType
- the MIME type of the image. This parameter is ignored ifimageStream
isnull
.- Throws:
java.lang.IllegalArgumentException
- if theimage stream
parameter is notnull
and themime type
parameter isnull
.PortalException
- if other error occur.- Since:
- 8.0.0
-
getFullName
@Deprecated public java.lang.String getFullName()
-
getLastLogin
public java.util.Date getLastLogin()
Returns the date and time of last login for this user.- Returns:
- the date, or
null
if this user never logged in. - Since:
- 6.2.0
-
getCustomAttributes
@Deprecated public java.util.Map<java.lang.String,java.lang.Object> getCustomAttributes()
Deprecated.Returns a map with the values of custom attributes of this user. To modify the value of custom attributes of this user, the returned map may be modified and the changes will be persisted whenIUserManager.update(lumis.portal.authentication.SessionConfig, UserConfig, ITransaction)
is called, like other user properties.- Returns:
- a map where the key of the map is the attribute identifier and the value of the map is the attribute value, with a type that corresponds to the attribute data type.
- Since:
- 11.0.0
-
getVisitorId
public long getVisitorId()
Returns the visitor identifier of this user.- Returns:
- the visitor identifier.
- Throws:
java.lang.IllegalStateException
- if this user was not persisted or obtained usingIUserManager
, so its visitor identifier was not generated, or if this user is the special guest user.- Since:
- 12.0.0
-
getFriendlyId
public java.lang.String getFriendlyId()
Returns the friendly identifier of this user.- Returns:
- the friendly identifier.
- Since:
- 12.0.0
-
getTrustedProperties
public IUserProperties getTrustedProperties()
Returns this user's trusted properties. The trusted properties represents properties provided by trusted sources such as an authenticated user and always overwrites any corresponding untrusted property.- Returns:
- the trusted properties.
- Since:
- 12.0.0
- See Also:
getUntrustedProperties()
,getProperties()
-
getUntrustedProperties
public IUserProperties getUntrustedProperties()
Returns this user's untrusted properties. The untrusted properties represents properties provided by untrusted sources such as unauthenticated information collected by user monitoring. It is always overwritten by corresponding untrusted property.- Returns:
- the untrusted properties.
- Since:
- 12.0.0
- See Also:
getTrustedProperties()
,getProperties()
-
getProperties
public IUserPropertiesReadOnly getProperties()
- Returns:
- the properties.
- Since:
- 12.0.0
-
-