Class BasicPlatformUser

  • All Implemented Interfaces:
    PlatformUser, java.io.Serializable, org.flowable.common.engine.api.variable.VariableContainer, org.flowable.idm.api.User
    Direct Known Subclasses:
    LdapPlatformUser

    public class BasicPlatformUser
    extends java.lang.Object
    implements PlatformUser, org.flowable.common.engine.api.variable.VariableContainer
    A base implementation of PlatformUser that can be used when implementing a custom PlatformIdentityService
    Author:
    Filip Hrisafov
    See Also:
    Serialized Form
    • Field Detail

      • id

        protected java.lang.String id
      • firstName

        protected java.lang.String firstName
      • lastName

        protected java.lang.String lastName
      • displayName

        protected java.lang.String displayName
      • email

        protected java.lang.String email
      • tenantId

        protected java.lang.String tenantId
      • active

        protected java.lang.Boolean active
      • avatarId

        protected java.lang.String avatarId
      • state

        protected java.lang.String state
      • subState

        protected java.lang.String subState
      • type

        protected java.lang.String type
      • subType

        protected java.lang.String subType
      • userDefinitionKey

        protected java.lang.String userDefinitionKey
      • language

        protected java.lang.String language
      • theme

        protected java.lang.String theme
      • presence

        protected java.lang.String presence
      • presenceTime

        protected java.util.Date presenceTime
      • creatorId

        protected java.lang.String creatorId
      • creationTime

        protected java.util.Date creationTime
      • updaterId

        protected java.lang.String updaterId
      • updateTime

        protected java.util.Date updateTime
      • password

        protected java.lang.String password
    • Constructor Detail

      • BasicPlatformUser

        public BasicPlatformUser()
    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface org.flowable.idm.api.User
      • setId

        public void setId​(java.lang.String id)
        Specified by:
        setId in interface org.flowable.idm.api.User
      • getFirstName

        public java.lang.String getFirstName()
        Specified by:
        getFirstName in interface org.flowable.idm.api.User
      • setFirstName

        public void setFirstName​(java.lang.String firstName)
        Specified by:
        setFirstName in interface org.flowable.idm.api.User
      • getLastName

        public java.lang.String getLastName()
        Specified by:
        getLastName in interface org.flowable.idm.api.User
      • setLastName

        public void setLastName​(java.lang.String lastName)
        Specified by:
        setLastName in interface org.flowable.idm.api.User
      • getDisplayName

        public java.lang.String getDisplayName()
        Specified by:
        getDisplayName in interface org.flowable.idm.api.User
      • setDisplayName

        public void setDisplayName​(java.lang.String displayName)
        Specified by:
        setDisplayName in interface org.flowable.idm.api.User
      • getEmail

        public java.lang.String getEmail()
        Specified by:
        getEmail in interface org.flowable.idm.api.User
      • setEmail

        public void setEmail​(java.lang.String email)
        Specified by:
        setEmail in interface org.flowable.idm.api.User
      • isActive

        public boolean isActive()
        Description copied from interface: PlatformUser
        Returns true 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 interface PlatformUser
        Returns:
        true if this user is active
      • setActive

        public void setActive​(java.lang.Boolean active)
      • getTenantId

        public java.lang.String getTenantId()
        Specified by:
        getTenantId in interface org.flowable.idm.api.User
        Specified by:
        getTenantId in interface org.flowable.common.engine.api.variable.VariableContainer
      • setTenantId

        public void setTenantId​(java.lang.String tenantId)
        Specified by:
        setTenantId in interface org.flowable.idm.api.User
      • getAvatarId

        public java.lang.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 interface PlatformUser
        Returns:
        the optional avatar image ID
      • setAvatarId

        public void setAvatarId​(java.lang.String avatarId)
      • getState

        public java.lang.String getState()
        Description copied from interface: PlatformUser
        Returns the state of this user.
        Specified by:
        getState in interface PlatformUser
        Returns:
        the state
      • setState

        public void setState​(java.lang.String state)
      • getSubState

        public java.lang.String getSubState()
        Description copied from interface: PlatformUser
        Returns the sub state of this user.
        Specified by:
        getSubState in interface PlatformUser
        Returns:
        the sub state
      • setSubState

        public void setSubState​(java.lang.String subState)
      • getType

        public java.lang.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 interface PlatformUser
        Returns:
        the type of the user
        See Also:
        for known types
      • setType

        public void setType​(java.lang.String type)
      • setSubType

        public void setSubType​(java.lang.String subType)
      • setUserDefinitionKey

        public void setUserDefinitionKey​(java.lang.String userDefinitionKey)
      • getLanguage

        public java.lang.String getLanguage()
        Description copied from interface: PlatformUser
        Returns the language of this user.
        Specified by:
        getLanguage in interface PlatformUser
        Returns:
        the language
      • setLanguage

        public void setLanguage​(java.lang.String language)
      • setTheme

        public void setTheme​(java.lang.String theme)
      • getPresence

        public java.lang.String getPresence()
        Description copied from interface: PlatformUser
        Returns the current presence of the user.
        Specified by:
        getPresence in interface PlatformUser
        Returns:
        the presence of the user
        See Also:
        for known states
      • setPresence

        public void setPresence​(java.lang.String presence)
      • getPresenceTime

        public java.util.Date getPresenceTime()
        Description copied from interface: PlatformUser
        The time the current presence of the user was set
        Specified by:
        getPresenceTime in interface PlatformUser
        Returns:
        the time the presence of the user was set
      • setPresenceTime

        public void setPresenceTime​(java.util.Date presenceTime)
      • setCreatorId

        public void setCreatorId​(java.lang.String creatorId)
      • setCreationTime

        public void setCreationTime​(java.util.Date creationTime)
      • setUpdaterId

        public void setUpdaterId​(java.lang.String updaterId)
      • setUpdateTime

        public void setUpdateTime​(java.util.Date updateTime)
      • setIdentityInfo

        public void setIdentityInfo​(java.util.List<PlatformIdentityInfo> identityInfo)
      • findOrElseGet

        public <T> T findOrElseGet​(java.lang.String name,
                                   java.lang.Class<T> clazz,
                                   java.util.function.Supplier<T> defaultValueSupplier)
        Specified by:
        findOrElseGet in interface PlatformUser
      • findOrElse

        public <T> T findOrElse​(java.lang.String name,
                                java.lang.Class<T> clazz,
                                T defaultValue)
        Specified by:
        findOrElse in interface PlatformUser
      • getValue

        protected <T> T getValue​(java.lang.String name,
                                 java.lang.Class<T> clazz)
      • getPassword

        public java.lang.String getPassword()
        Specified by:
        getPassword in interface org.flowable.idm.api.User
      • setPassword

        public void setPassword​(java.lang.String password)
        Specified by:
        setPassword in interface org.flowable.idm.api.User
      • isPictureSet

        public boolean isPictureSet()
        Specified by:
        isPictureSet in interface org.flowable.idm.api.User
      • hasVariable

        public boolean hasVariable​(java.lang.String variableName)
        Specified by:
        hasVariable in interface org.flowable.common.engine.api.variable.VariableContainer
      • getVariable

        public java.lang.Object getVariable​(java.lang.String variableName)
        Specified by:
        getVariable in interface org.flowable.common.engine.api.variable.VariableContainer
      • setVariable

        public void setVariable​(java.lang.String variableName,
                                java.lang.Object variableValue)
        Specified by:
        setVariable in interface org.flowable.common.engine.api.variable.VariableContainer
      • setTransientVariable

        public void setTransientVariable​(java.lang.String variableName,
                                         java.lang.Object variableValue)
        Specified by:
        setTransientVariable in interface org.flowable.common.engine.api.variable.VariableContainer