Package com.flowable.idm.engine.impl
Class BasicPlatformUser
- java.lang.Object
-
- com.flowable.idm.engine.impl.BasicPlatformUser
-
- All Implemented Interfaces:
PlatformUser
,Serializable
,VariableContainer
,User
- Direct Known Subclasses:
LdapPlatformUser
public class BasicPlatformUser extends Object implements PlatformUser, VariableContainer
A base implementation ofPlatformUser
that can be used when implementing a customPlatformIdentityService
- Author:
- Filip Hrisafov
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Boolean
active
protected String
avatarId
protected Date
creationTime
protected String
creatorId
protected String
displayName
protected String
email
protected String
firstName
protected String
id
protected List<PlatformIdentityInfo>
identityInfo
protected String
language
protected String
lastName
protected String
password
protected String
presence
protected Date
presenceTime
protected String
state
protected String
subState
protected String
subType
protected String
tenantId
protected String
theme
protected String
type
protected String
updaterId
protected Date
updateTime
protected String
userDefinitionKey
-
Constructor Summary
Constructors Constructor Description BasicPlatformUser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
findOrElse(String name, Class<T> clazz, T defaultValue)
<T> T
findOrElseGet(String name, Class<T> clazz, Supplier<T> defaultValueSupplier)
String
getAvatarId()
Returns the optional avatar image ID, if this user has an avatar saved in their profile.Date
getCreationTime()
String
getCreatorId()
String
getDisplayName()
String
getEmail()
String
getFirstName()
String
getId()
List<PlatformIdentityInfo>
getIdentityInfo()
Returns the identity info properties of this user.String
getLanguage()
Returns the language of this user.String
getLastName()
String
getPassword()
String
getPresence()
Returns the current presence of the user.Date
getPresenceTime()
The time the current presence of the user was setString
getState()
Returns the state of this user.String
getSubState()
Returns the sub state of this user.String
getSubType()
String
getTenantId()
String
getTheme()
String
getType()
The type of the user.String
getUpdaterId()
Date
getUpdateTime()
String
getUserDefinitionKey()
protected <T> T
getValue(String name, Class<T> clazz)
Object
getVariable(String variableName)
boolean
hasVariable(String variableName)
boolean
isActive()
Returnstrue
if this user is active,false
if it is deactivated,null
if cannot be determined because the state field is not available.boolean
isPictureSet()
void
setActive(Boolean active)
void
setAvatarId(String avatarId)
void
setCreationTime(Date creationTime)
void
setCreatorId(String creatorId)
void
setDisplayName(String displayName)
void
setEmail(String email)
void
setFirstName(String firstName)
void
setId(String id)
void
setIdentityInfo(List<PlatformIdentityInfo> identityInfo)
void
setLanguage(String language)
void
setLastName(String lastName)
void
setPassword(String password)
void
setPresence(String presence)
void
setPresenceTime(Date presenceTime)
void
setState(String state)
void
setSubState(String subState)
void
setSubType(String subType)
void
setTenantId(String tenantId)
void
setTheme(String theme)
void
setTransientVariable(String variableName, Object variableValue)
void
setType(String type)
void
setUpdaterId(String updaterId)
void
setUpdateTime(Date updateTime)
void
setUserDefinitionKey(String userDefinitionKey)
void
setVariable(String variableName, Object variableValue)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flowable.core.idm.api.PlatformUser
findString, isBot, isExternalUser
-
-
-
-
Field Detail
-
id
protected String id
-
firstName
protected String firstName
-
lastName
protected String lastName
-
displayName
protected String displayName
-
email
protected String email
-
tenantId
protected String tenantId
-
active
protected Boolean active
-
avatarId
protected String avatarId
-
state
protected String state
-
subState
protected String subState
-
type
protected String type
-
subType
protected String subType
-
userDefinitionKey
protected String userDefinitionKey
-
language
protected String language
-
theme
protected String theme
-
presence
protected String presence
-
presenceTime
protected Date presenceTime
-
creatorId
protected String creatorId
-
creationTime
protected Date creationTime
-
updaterId
protected String updaterId
-
updateTime
protected Date updateTime
-
password
protected String password
-
identityInfo
protected List<PlatformIdentityInfo> identityInfo
-
-
Method Detail
-
getFirstName
public String getFirstName()
- Specified by:
getFirstName
in interfaceUser
-
setFirstName
public void setFirstName(String firstName)
- Specified by:
setFirstName
in interfaceUser
-
getLastName
public String getLastName()
- Specified by:
getLastName
in interfaceUser
-
setLastName
public void setLastName(String lastName)
- Specified by:
setLastName
in interfaceUser
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceUser
-
setDisplayName
public void setDisplayName(String displayName)
- Specified by:
setDisplayName
in interfaceUser
-
isActive
public boolean isActive()
Description copied from interface:PlatformUser
Returnstrue
if this user is active,false
if it is deactivated,null
if cannot be determined because the state field is not available.- Specified by:
isActive
in interfacePlatformUser
- Returns:
true
if this user is active
-
setActive
public void setActive(Boolean active)
-
getTenantId
public String getTenantId()
- Specified by:
getTenantId
in interfaceUser
- Specified by:
getTenantId
in interfaceVariableContainer
-
setTenantId
public void setTenantId(String tenantId)
- Specified by:
setTenantId
in interfaceUser
-
getAvatarId
public String getAvatarId()
Description copied from interface:PlatformUser
Returns the optional avatar image ID, if this user has an avatar saved in their profile. This can be a content item ID- Specified by:
getAvatarId
in interfacePlatformUser
- Returns:
- the optional avatar image ID
-
setAvatarId
public void setAvatarId(String avatarId)
-
getState
public String getState()
Description copied from interface:PlatformUser
Returns the state of this user.- Specified by:
getState
in interfacePlatformUser
- Returns:
- the state
-
setState
public void setState(String state)
-
getSubState
public String getSubState()
Description copied from interface:PlatformUser
Returns the sub state of this user.- Specified by:
getSubState
in interfacePlatformUser
- Returns:
- the sub state
-
setSubState
public void setSubState(String subState)
-
getType
public String getType()
Description copied from interface:PlatformUser
The type of the user. It is possible that a user does not have this set, in this case this is a normal non special user.- Specified by:
getType
in interfacePlatformUser
- Returns:
- the type of the user
- See Also:
for known types
-
setType
public void setType(String type)
-
getSubType
public String getSubType()
- Specified by:
getSubType
in interfacePlatformUser
-
setSubType
public void setSubType(String subType)
-
getUserDefinitionKey
public String getUserDefinitionKey()
- Specified by:
getUserDefinitionKey
in interfacePlatformUser
-
setUserDefinitionKey
public void setUserDefinitionKey(String userDefinitionKey)
-
getLanguage
public String getLanguage()
Description copied from interface:PlatformUser
Returns the language of this user.- Specified by:
getLanguage
in interfacePlatformUser
- Returns:
- the language
-
setLanguage
public void setLanguage(String language)
-
getTheme
public String getTheme()
- Specified by:
getTheme
in interfacePlatformUser
-
setTheme
public void setTheme(String theme)
-
getPresence
public String getPresence()
Description copied from interface:PlatformUser
Returns the current presence of the user.- Specified by:
getPresence
in interfacePlatformUser
- Returns:
- the presence of the user
- See Also:
for known states
-
setPresence
public void setPresence(String presence)
-
getPresenceTime
public Date getPresenceTime()
Description copied from interface:PlatformUser
The time the current presence of the user was set- Specified by:
getPresenceTime
in interfacePlatformUser
- Returns:
- the time the presence of the user was set
-
setPresenceTime
public void setPresenceTime(Date presenceTime)
-
getCreatorId
public String getCreatorId()
- Specified by:
getCreatorId
in interfacePlatformUser
-
setCreatorId
public void setCreatorId(String creatorId)
-
getCreationTime
public Date getCreationTime()
- Specified by:
getCreationTime
in interfacePlatformUser
-
setCreationTime
public void setCreationTime(Date creationTime)
-
getUpdaterId
public String getUpdaterId()
- Specified by:
getUpdaterId
in interfacePlatformUser
-
setUpdaterId
public void setUpdaterId(String updaterId)
-
getUpdateTime
public Date getUpdateTime()
- Specified by:
getUpdateTime
in interfacePlatformUser
-
setUpdateTime
public void setUpdateTime(Date updateTime)
-
getIdentityInfo
public List<PlatformIdentityInfo> getIdentityInfo()
Description copied from interface:PlatformUser
Returns the identity info properties of this user.- Specified by:
getIdentityInfo
in interfacePlatformUser
- Returns:
- the identity info properties
-
setIdentityInfo
public void setIdentityInfo(List<PlatformIdentityInfo> identityInfo)
-
findOrElseGet
public <T> T findOrElseGet(String name, Class<T> clazz, Supplier<T> defaultValueSupplier)
- Specified by:
findOrElseGet
in interfacePlatformUser
-
findOrElse
public <T> T findOrElse(String name, Class<T> clazz, T defaultValue)
- Specified by:
findOrElse
in interfacePlatformUser
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfaceUser
-
setPassword
public void setPassword(String password)
- Specified by:
setPassword
in interfaceUser
-
isPictureSet
public boolean isPictureSet()
- Specified by:
isPictureSet
in interfaceUser
-
hasVariable
public boolean hasVariable(String variableName)
- Specified by:
hasVariable
in interfaceVariableContainer
-
getVariable
public Object getVariable(String variableName)
- Specified by:
getVariable
in interfaceVariableContainer
-
setVariable
public void setVariable(String variableName, Object variableValue)
- Specified by:
setVariable
in interfaceVariableContainer
-
setTransientVariable
public void setTransientVariable(String variableName, Object variableValue)
- Specified by:
setTransientVariable
in interfaceVariableContainer
-
-