Package lumis.portal.user
Class UserConfig
- java.lang.Object
-
- lumis.portal.user.UserConfig
-
- All Implemented Interfaces:
Cloneable
,ICacheEntry
,ICloneableCacheEntry
@StableMinor(version="14.1", sinceVersion="14.0") public class UserConfig extends Object implements ICloneableCacheEntry
Represents a portal user- Since:
- 4.0.6
- Version:
- $Revision: 24683 $ $Date: 2021-08-23 18:55:58 -0300 (Mon, 23 Aug 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
USER_ADMINISTRATOR_ID
static String
USER_FRAMEWORKCLOCK_ID
static String
USER_GUEST_ID
static String
USER_PAGECACHE_ID
static 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()
String
getChannelId()
Map<String,Object>
getCustomAttributes()
String
getEmail()
String
getFirstName()
String
getFriendlyId()
Returns the friendly identifier of this user.String
getFullName()
String
getId()
Date
getLastLogin()
Returns the date and time of last login for this user.String
getLastName()
String
getLogin()
String
getMiddleName()
String
getOrigin()
Returns the origin of this user.String
getPassword()
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(String channelId)
void
setDisabled(boolean disabled)
void
setEmail(String email)
void
setFirstName(String firstName)
void
setId(String id)
void
setLastName(String lastName)
void
setLogin(String login)
void
setMiddleName(String middleName)
void
setMultiSession(boolean multiSession)
void
setOrigin(String origin)
Sets the origin for this user.void
setPassword(String password)
void
setPortalLogin(boolean portalLogin)
Sets if this user may be logged in normally by the portal's default authenticator.void
setProfileImage(InputStream imageStream, String mimeType)
Sets the profile image of the given user.void
setType(int type)
-
-
-
Field Detail
-
USER_ADMINISTRATOR_ID
public static final String USER_ADMINISTRATOR_ID
- See Also:
- Constant Field Values
-
USER_GUEST_ID
public static final String USER_GUEST_ID
- See Also:
- Constant Field Values
-
USER_FRAMEWORKCLOCK_ID
public static final String USER_FRAMEWORKCLOCK_ID
- See Also:
- Constant Field Values
-
USER_PAGECACHE_ID
public static final String USER_PAGECACHE_ID
- See Also:
- Constant Field Values
-
USER_SYSTEM_ID
public static final 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 classObject
-
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 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(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 String getEmail()
-
setEmail
@Deprecated public void setEmail(String email)
-
getFirstName
@Deprecated public String getFirstName()
-
setFirstName
@Deprecated public void setFirstName(String firstName)
-
getId
public String getId()
-
setId
public void setId(String id)
-
getLastName
@Deprecated public String getLastName()
-
setLastName
@Deprecated public void setLastName(String lastName)
-
getLogin
public String getLogin()
-
setLogin
public void setLogin(String login)
-
getMiddleName
@Deprecated public String getMiddleName()
-
setMiddleName
@Deprecated public void setMiddleName(String middleName)
-
isMultiSession
public boolean isMultiSession()
-
setMultiSession
public void setMultiSession(boolean multiSession)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
getType
public int getType()
-
setType
public void setType(int type)
-
getChannelId
public String getChannelId()
-
setChannelId
public void setChannelId(String channelId)
-
getProfileImageHref
public 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(InputStream imageStream, 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:
IllegalArgumentException
- if theimage stream
parameter is notnull
and themime type
parameter isnull
.PortalException
- if other error occur.- Since:
- 8.0.0
-
getFullName
@Deprecated public String getFullName()
-
getLastLogin
public 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 Map<String,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:
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 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
-
-