Class UserProfile

java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, de.xima.cmn.dao.interfaces.ILockableEntity<Long>, IFileMapProviding<UserProfileFile, UserProfileFileData>, ILockingVersionProviding, ITransferable, ITransferableEntity, ITransferableLockableEntity, IUUIDEntity, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>

@Entity public class UserProfile extends AbstractLockableEntity implements IUUIDEntity, IFileMapProviding<UserProfileFile, UserProfileFileData>
User profiles store information about a specific user that may be able to sign in using multiple UserIdentitys.
Since:
8.0.0.
Author:
XIMA Media GmbH
See Also:
  • Field Details

  • Constructor Details

    • UserProfile

      public UserProfile()
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
    • setId

      public void setId(Long id)
      Description copied from class: AbstractEntity
      !!!WARNING: Currently values bigger Integer.MAX_VALUE or lower then Integer.MIN_VALUE will be altered to null!!!
      Specified by:
      setId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
      Overrides:
      setId in class AbstractEntity
      Parameters:
      id - Long the database-id to set
    • getUUID

      public String getUUID()
      Description copied from interface: IUUIDEntity
      Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for example client scopes or project scope.
      Specified by:
      getUUID in interface IUUIDEntity
      Returns:
      The UUID of the entity.
    • setUUID

      public void setUUID(String uuid)
      Description copied from interface: IUUIDEntity
      Sets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for example client scopes or project scope.
      Specified by:
      setUUID in interface IUUIDEntity
      Parameters:
      uuid - The UUID of the entity.
    • getUUIDObject

      public UUID getUUIDObject()
      Description copied from interface: IUUIDEntity
      Gets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for example client scopes or project scope.
      Specified by:
      getUUIDObject in interface IUUIDEntity
      Returns:
      The UUID of the entity.
    • setUUIDObject

      public void setUUIDObject(UUID uuid)
    • getPrimaryEmail

      public UserEmail getPrimaryEmail()
    • setPrimaryEmail

      public void setPrimaryEmail(UserEmail primaryEmail)
    • getPrimaryEmailAddress

      public String getPrimaryEmailAddress()
    • getEmails

      public List<UserEmail> getEmails()
    • setEmails

      public void setEmails(List<UserEmail> emails)
    • addEmail

      public boolean addEmail(UserEmail email)
    • getEmail

      @Nullable public UserEmail getEmail(String emailAddress)
    • hasEmail

      public boolean hasEmail(String emailAddress)
    • getFirstName

      public String getFirstName()
    • setFirstName

      public void setFirstName(String firstName)
    • getFamilyName

      public String getFamilyName()
    • setFamilyName

      public void setFamilyName(String familyName)
    • getDisplayName

      public String getDisplayName()
    • getUserName

      public String getUserName()
    • setUserName

      public void setUserName(String userName)
    • getGender

      public EGender getGender()
    • setGender

      public void setGender(EGender gender)
    • getRole

      public String getRole()
    • setRole

      public void setRole(String role)
    • getPermissions

      public Set<String> getPermissions()
    • setPermissions

      public void setPermissions(Set<String> permissions)
    • getSystemPermissions

      public Set<String> getSystemPermissions()
      Returns:
      An unmodifiable set of the user profiles system permissions. Every permission in the set is kept in its original state (with the system permission prefix).
    • addSystemPermission

      public void addSystemPermission(IAccessProperty accessProperty)
    • addSystemPermission

      public void addSystemPermission(String permission)
    • addGeneralPermission

      public void addGeneralPermission(IAccessProperty accessProperty)
    • addGeneralPermission

      public void addGeneralPermission(String permission)
    • addPermission

      public void addPermission(String permission)
    • hasSystemPermission

      public boolean hasSystemPermission(IAccessProperty accessProp)
    • hasSystemPermission

      public boolean hasSystemPermission(String permission)
    • hasGeneralPermission

      public boolean hasGeneralPermission(IAccessProperty accessProp)
    • hasGeneralPermission

      public boolean hasGeneralPermission(String permission)
    • getDefaultLocale

      public Locale getDefaultLocale()
    • setDefaultLocale

      public void setDefaultLocale(Locale defaultLocale)
    • getCreatedInstant

      public Instant getCreatedInstant()
    • setCreatedInstant

      public void setCreatedInstant(Instant createdInstant)
    • isActive

      public boolean isActive()
    • setActive

      public void setActive(boolean active)
    • getUserCredentials

      public UserCredentials getUserCredentials()
    • setUserCredentials

      public void setUserCredentials(UserCredentials userCredentials)
    • setUserCredentialsPassword

      public void setUserCredentialsPassword(String clearTextPassword)
    • getUserCredentialsSetUuid

      public UUID getUserCredentialsSetUuid()
    • setUserCredentialsSetUuid

      public void setUserCredentialsSetUuid(UUID userCredentialsSetUuid)
    • getUserCredentialsSetExpireInstant

      public Instant getUserCredentialsSetExpireInstant()
    • setUserCredentialsSetExpireInstant

      public void setUserCredentialsSetExpireInstant(Instant userCredentialsSetExpireInstant)
    • getMfaConfig

      public UserProfileMfa getMfaConfig()
    • setMfaConfig

      public void setMfaConfig(UserProfileMfa mfaConfig)
    • getMfaLastAuthenticatedInstant

      public Instant getMfaLastAuthenticatedInstant()
      The last time the user was authenticated using multi-factor authentication.

      This is used to determine if the user needs to re-authenticate using MFA.

      Returns:
      the last authenticated instant, or null if not set
    • setMfaLastAuthenticatedInstant

      public void setMfaLastAuthenticatedInstant(Instant mfaLastAuthenticatedInstant)
      Sets the last time the user was authenticated using multi-factor authentication.

      This is used to determine if the user needs to re-authenticate using MFA.

      Parameters:
      mfaLastAuthenticatedInstant - the last authenticated instant, or null to unset
    • getMfaType

      public EMultiFactorAuthenticationType getMfaType()
    • setMfaType

      public void setMfaType(EMultiFactorAuthenticationType mfaType)
    • isMfaActive

      public boolean isMfaActive()
    • getMergeRequestUuid

      public UUID getMergeRequestUuid()
    • setMergeRequestUuid

      public void setMergeRequestUuid(UUID mergeRequestUuid)
    • getMergeRequestExpireInstant

      public Instant getMergeRequestExpireInstant()
    • setMergeRequestExpireInstant

      public void setMergeRequestExpireInstant(Instant mergeRequestExpireInstant)
    • getMergeRequestProfile

      public UserProfile getMergeRequestProfile()
    • setMergeRequestProfile

      public void setMergeRequestProfile(UserProfile mergeRequestProfile)
    • getDeleteRequestUuid

      public UUID getDeleteRequestUuid()
    • setDeleteRequestUuid

      public void setDeleteRequestUuid(UUID deleteRequestUuid)
    • getDeleteRequestExpireInstant

      public Instant getDeleteRequestExpireInstant()
    • setDeleteRequestExpireInstant

      public void setDeleteRequestExpireInstant(Instant deleteRequestExpireInstant)
    • getUserIdentities

      public List<UserIdentity> getUserIdentities()
    • setUserIdentities

      public void setUserIdentities(List<UserIdentity> userIdentities)
    • getUserPortals

      public Set<UserPortal> getUserPortals()
    • setUserPortals

      public void setUserPortals(Set<UserPortal> userPortals)
    • getUserIdentity

      public UserIdentity getUserIdentity(String identifier, IClientDescriptor clientDescriptor)
    • addUserIdentity

      public boolean addUserIdentity(UserIdentity identity)
    • removeUserIdentity

      public boolean removeUserIdentity(UserIdentity identity)
    • getIdentities

      public List<IUserIdentity> getIdentities()
    • getDirectClientAuthorizations

      public List<DirectClientAuthorization> getDirectClientAuthorizations()
    • setDirectClientAuthorizations

      public void setDirectClientAuthorizations(List<DirectClientAuthorization> clientAuthorizations)
    • addDirectClientAuthorization

      public boolean addDirectClientAuthorization(DirectClientAuthorization clientAuthorization)
    • getDirectClientAuthorization

      public DirectClientAuthorization getDirectClientAuthorization(Mandant client)
    • getDirectClientAuthorization

      public DirectClientAuthorization getDirectClientAuthorization(Long clientId)
    • removeDirectClientAuthorization

      public boolean removeDirectClientAuthorization(DirectClientAuthorization clientAuthorization)
    • getCustomPropertiesModel

      public UserProfileProperties getCustomPropertiesModel()
    • setCustomPropertiesModel

      public void setCustomPropertiesModel(UserProfileProperties customPropertiesModel)
    • getActiveProfileImage

      public UserProfileFile getActiveProfileImage()
    • setActiveProfileImageData

      public void setActiveProfileImageData(File file, Object userRef) throws FileNotFoundException, IOException
      Throws:
      FileNotFoundException
      IOException
    • setActiveProfileImageData

      public void setActiveProfileImageData(byte[] data, String fileName, Object userRef)
    • removeActiveProfileImage

      public void removeActiveProfileImage()
    • getFileMap

      public Map<String, UserProfileFile> getFileMap()
      Specified by:
      getFileMap in interface IFileMapProviding<UserProfileFile, UserProfileFileData>
    • setFileMap

      public void setFileMap(Map<String, UserProfileFile> fileMap)
      Description copied from interface: IFileMapProviding
      DON'T USE! Hibernate is managing this collection, so if it is overridden, Hibernate can't keep track of it anymore. Use IFileMapProviding.putFile(String, IKeyDependentFileEntity), IFileMapProviding.removeFile(String) or IFileMapProviding.getFileMap() instead to modify the map.
      Specified by:
      setFileMap in interface IFileMapProviding<UserProfileFile, UserProfileFileData>
    • newFileEntiy

      public UserProfileFile newFileEntiy()
      Description copied from interface: IFileMapProviding
      Creates a new instance of file entity which is connected to the base entity (this). However this entity is not yet persisted nor is it connected to file key
      Specified by:
      newFileEntiy in interface IFileMapProviding<UserProfileFile, UserProfileFileData>
      Returns:
      a new file entity connected to this entity
    • prePersist

      public void prePersist()