Package de.xima.fc.entities
Class UserProfile
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.UserProfile
-
- 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 multipleUserIdentity
s.- Since:
- 8.0.0.
- Author:
- XIMA Media GmbH
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description UserProfile()
-
Method Summary
-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface de.xima.fc.entities.interfaces.IFileMapProviding
putFile, removeFile, setFileData, setFileData
-
-
-
-
Field Detail
-
COL_PRIMARY_EMAIL
public static final String COL_PRIMARY_EMAIL
- See Also:
- Constant Field Values
-
COL_FIRST_NAME
public static final String COL_FIRST_NAME
- See Also:
- Constant Field Values
-
COL_FAMILY_NAME
public static final String COL_FAMILY_NAME
- See Also:
- Constant Field Values
-
COL_USER_NAME
public static final String COL_USER_NAME
- See Also:
- Constant Field Values
-
COL_GENDER
public static final String COL_GENDER
- See Also:
- Constant Field Values
-
COL_ROLE
public static final String COL_ROLE
- See Also:
- Constant Field Values
-
COL_DEFAULT_LOCALE
public static final String COL_DEFAULT_LOCALE
- See Also:
- Constant Field Values
-
COL_CREATED_TIMESTAMP
public static final String COL_CREATED_TIMESTAMP
- See Also:
- Constant Field Values
-
COL_FLAG_SYSTEM_ROLE
public static final String COL_FLAG_SYSTEM_ROLE
- See Also:
- Constant Field Values
-
COL_FLAG_ACTIVE
public static final String COL_FLAG_ACTIVE
- See Also:
- Constant Field Values
-
COL_CREDENTIALS_SET_UUID
public static final String COL_CREDENTIALS_SET_UUID
- See Also:
- Constant Field Values
-
COL_CREDENTIALS_SET_EXPIRE_TIMESTAMP
public static final String COL_CREDENTIALS_SET_EXPIRE_TIMESTAMP
- See Also:
- Constant Field Values
-
COL_MERGE_REQUEST_UUID
public static final String COL_MERGE_REQUEST_UUID
- See Also:
- Constant Field Values
-
COL_MERGE_REQUEST_EXPIRE_TIMESTAMP
public static final String COL_MERGE_REQUEST_EXPIRE_TIMESTAMP
- See Also:
- Constant Field Values
-
COL_MERGE_REQUEST_PROFILE_ID
public static final String COL_MERGE_REQUEST_PROFILE_ID
- See Also:
- Constant Field Values
-
COL_DELETE_REQUEST_UUID
public static final String COL_DELETE_REQUEST_UUID
- See Also:
- Constant Field Values
-
COL_DELETE_REQUEST_EXPIRE_TIMESTAMP
public static final String COL_DELETE_REQUEST_EXPIRE_TIMESTAMP
- See Also:
- Constant Field Values
-
ATTR_PRIMARY_EMAIL
public static final String ATTR_PRIMARY_EMAIL
- See Also:
- Constant Field Values
-
ATTR_FIRST_NAME
public static final String ATTR_FIRST_NAME
- See Also:
- Constant Field Values
-
ATTR_FAMILY_NAME
public static final String ATTR_FAMILY_NAME
- See Also:
- Constant Field Values
-
ATTR_USER_NAME
public static final String ATTR_USER_NAME
- See Also:
- Constant Field Values
-
ATTR_GENDER
public static final String ATTR_GENDER
- See Also:
- Constant Field Values
-
ATTR_ROLE
public static final String ATTR_ROLE
- See Also:
- Constant Field Values
-
ATTR_DEFAULT_LOCALE
public static final String ATTR_DEFAULT_LOCALE
- See Also:
- Constant Field Values
-
ATTR_CREATED_INSTANT
public static final String ATTR_CREATED_INSTANT
- See Also:
- Constant Field Values
-
ATTR_SYSTEM_ROLE
public static final String ATTR_SYSTEM_ROLE
- See Also:
- Constant Field Values
-
ATTR_ACTIVE
public static final String ATTR_ACTIVE
- See Also:
- Constant Field Values
-
ATTR_USER_IDENTITIES
public static final String ATTR_USER_IDENTITIES
- See Also:
- Constant Field Values
-
ATTR_USER_CREDENTIALS
public static final String ATTR_USER_CREDENTIALS
- See Also:
- Constant Field Values
-
ATTR_USER_CREDENTIALS_SET_UUID
public static final String ATTR_USER_CREDENTIALS_SET_UUID
- See Also:
- Constant Field Values
-
ATTR_USER_CREDENTIALS_SET_EXPIRE_INSTANT
public static final String ATTR_USER_CREDENTIALS_SET_EXPIRE_INSTANT
- See Also:
- Constant Field Values
-
ATTR_CREDENTIALS_SET_UUID
public static final String ATTR_CREDENTIALS_SET_UUID
- See Also:
- Constant Field Values
-
ATTR_CREDENTIALS_SET_EXPIRE_INSTANT
public static final String ATTR_CREDENTIALS_SET_EXPIRE_INSTANT
- See Also:
- Constant Field Values
-
ATTR_MERGE_REQUEST_UUID
public static final String ATTR_MERGE_REQUEST_UUID
- See Also:
- Constant Field Values
-
ATTR_MERGE_REQUEST_EXPIRE_INSTANT
public static final String ATTR_MERGE_REQUEST_EXPIRE_INSTANT
- See Also:
- Constant Field Values
-
ATTR_MERGE_REQUEST_PROFILE
public static final String ATTR_MERGE_REQUEST_PROFILE
- See Also:
- Constant Field Values
-
ATTR_DELETE_REQUEST_UUID
public static final String ATTR_DELETE_REQUEST_UUID
- See Also:
- Constant Field Values
-
ATTR_DELETE_REQUEST_EXPIRE_ISNTANT
public static final String ATTR_DELETE_REQUEST_EXPIRE_ISNTANT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setId
public void setId(Long id)
Description copied from class:AbstractEntity
!!!WARNING: Currently values biggerInteger.MAX_VALUE
or lower thenInteger.MIN_VALUE
will be altered to null!!!- Specified by:
setId
in interfacede.xima.cmn.dao.interfaces.IEntity<Long>
- Overrides:
setId
in classAbstractEntity
- Parameters:
id
-Long
the database-id to set
-
getUUID
public String getUUID()
- Specified by:
getUUID
in interfaceIUUIDEntity
- Returns:
- UUID (Universal Unique Identifier) that identifies this type of entity. Usually is unique within a context,
e.g.
Mandant
,Projekt
, ...
-
setUUID
public void setUUID(String uuid)
- Specified by:
setUUID
in interfaceIUUIDEntity
-
getUUIDObject
public UUID getUUIDObject()
- Specified by:
getUUIDObject
in interfaceIUUIDEntity
-
setUUIDObject
public void setUUIDObject(UUID uuid)
-
getPrimaryEmail
public UserEmail getPrimaryEmail()
-
setPrimaryEmail
public void setPrimaryEmail(UserEmail primaryEmail)
-
getPrimaryEmailAddress
public String getPrimaryEmailAddress()
-
addEmail
public boolean addEmail(UserEmail email)
-
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)
-
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)
-
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)
-
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)
-
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 interfaceIFileMapProviding<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. UseIFileMapProviding.putFile(String, IKeyDependentFileEntity)
,IFileMapProviding.removeFile(String)
orIFileMapProviding.getFileMap()
instead to modify the map.- Specified by:
setFileMap
in interfaceIFileMapProviding<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 interfaceIFileMapProviding<UserProfileFile,UserProfileFileData>
- Returns:
- a new file entity connected to this entity
-
prePersist
public void prePersist()
-
-