Package de.xima.fc.entities
Class UserCredentials
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.UserCredentials
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,ILockingVersionProviding,ITransferable,ITransferableEntity,ITransferableLockableEntity,IUserIdentity,IUUIDEntity,Serializable,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class UserCredentials extends AbstractLockableEntity implements IUserIdentity
User credentials are the entries of the default formcycle authenticator. They store information about credentials that users may use to sign in using the formcycle authenticator.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_PASSWORD_HASHstatic StringATTR_PASSWORD_SET_INSTANTstatic StringATTR_USER_NAMEstatic StringATTR_USER_PROFILEstatic StringCOL_PASSWORD_HASHstatic StringCOL_PASSWORD_SET_TIMESTAMPstatic StringCOL_USER_PROFILE_ID-
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, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description UserCredentials()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckPassword(String pasword)IClientDescriptorgetClientDescriptor()LonggetId()StringgetIdentifier()StringgetPasswordHash()InstantgetPasswordSetInstant()UserProfilegetUserProfile()StringgetUUID()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUIDgetUUIDObject()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.booleanisExpired(int expireIntervalDays)Return whether or not the credentials are expired given the time interval of how long the credentials are valid until they expire (in days).voidsetId(Long id)!!!WARNING: Currently values biggerInteger.MAX_VALUEor lower thenInteger.MIN_VALUEwill be altered to null!!!voidsetPassword(String password)voidsetPasswordHash(String passwordHash)voidsetPasswordSetInstant(Instant passwordSetInstant)voidsetUserProfile(UserProfile userProfile)voidsetUUID(String uuid)Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.voidsetUUIDObject(UUID uuid)-
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
-
-
-
-
Field Detail
-
COL_PASSWORD_HASH
public static final String COL_PASSWORD_HASH
- See Also:
- Constant Field Values
-
COL_PASSWORD_SET_TIMESTAMP
public static final String COL_PASSWORD_SET_TIMESTAMP
- See Also:
- Constant Field Values
-
COL_USER_PROFILE_ID
public static final String COL_USER_PROFILE_ID
- See Also:
- Constant Field Values
-
ATTR_USER_NAME
public static final String ATTR_USER_NAME
- See Also:
- Constant Field Values
-
ATTR_PASSWORD_HASH
public static final String ATTR_PASSWORD_HASH
- See Also:
- Constant Field Values
-
ATTR_PASSWORD_SET_INSTANT
public static final String ATTR_PASSWORD_SET_INSTANT
- See Also:
- Constant Field Values
-
ATTR_USER_PROFILE
public static final String ATTR_USER_PROFILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setId
public void setId(Long id)
Description copied from class:AbstractEntity!!!WARNING: Currently values biggerInteger.MAX_VALUEor lower thenInteger.MIN_VALUEwill be altered to null!!!- Specified by:
setIdin interfacede.xima.cmn.dao.interfaces.IEntity<Long>- Overrides:
setIdin classAbstractEntity- Parameters:
id-Longthe database-id to set
-
getUUID
public String getUUID()
Description copied from interface:IUUIDEntityGets 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 exampleclient scopesorproject scope.- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUID
public void setUUID(String uuid)
Description copied from interface:IUUIDEntitySets 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 exampleclient scopesorproject scope.- Specified by:
setUUIDin interfaceIUUIDEntity- Parameters:
uuid- The UUID of the entity.
-
getUUIDObject
public UUID getUUIDObject()
Description copied from interface:IUUIDEntityGets 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 exampleclient scopesorproject scope.- Specified by:
getUUIDObjectin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUIDObject
public void setUUIDObject(UUID uuid)
-
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifierin interfaceIUserIdentity- Returns:
- a string that uniquely identifies a user within the
clientof this user identity.
-
setPassword
public void setPassword(String password)
-
getPasswordHash
public String getPasswordHash()
-
setPasswordHash
public void setPasswordHash(String passwordHash)
-
checkPassword
public boolean checkPassword(String pasword)
-
getPasswordSetInstant
public Instant getPasswordSetInstant()
-
setPasswordSetInstant
public void setPasswordSetInstant(Instant passwordSetInstant)
-
isExpired
public boolean isExpired(int expireIntervalDays)
Return whether or not the credentials are expired given the time interval of how long the credentials are valid until they expire (in days).- Parameters:
expireIntervalDays- time interval of how long the credentials are valid until they expire (in days).- Returns:
trueif the credentials are expired given the time interval of how long the credentials are valid until they expire (in days) andfalseotherwise.
-
getUserProfile
public UserProfile getUserProfile()
- Specified by:
getUserProfilein interfaceIUserIdentity- Returns:
- the user profile this identity is connected to.
-
setUserProfile
public void setUserProfile(UserProfile userProfile)
-
getClientDescriptor
public IClientDescriptor getClientDescriptor()
- Specified by:
getClientDescriptorin interfaceIUserIdentity- Returns:
- the client descriptor that is used for signing in.
-
-