Package de.xima.fc.entities
Class FormRecordAccess
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.FormRecordAccess
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,ILockingVersionProviding,ITransferable,ITransferableEntity,ITransferableLockableEntity,Serializable,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class FormRecordAccess extends AbstractLockableEntity
Entity representing the access to a form record.This entity is used to store information about the access granted to a form record, including the type of access, the user reference, and the access token.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_ACCESS_EXPIRE_ATstatic StringATTR_ACCESS_GRANT_TYPEstatic StringATTR_ACCESS_GRANTED_ATstatic StringATTR_ACCESS_PASSWORDstatic StringATTR_ACCESS_TOKENstatic StringATTR_EXTERNAL_REFERENCE_IDstatic StringATTR_FORM_RECORDstatic StringATTR_UNIVERSAL_REFERENCE_IDstatic StringATTR_USER_MAILstatic StringATTR_USER_PROFILE_UUIDstatic StringCOL_ACCESS_EXPIRE_TIMESTAMPstatic StringCOL_ACCESS_GRANT_TYPEstatic StringCOL_ACCESS_GRANTED_TIMESTAMPstatic StringCOL_ACCESS_PASSWORDstatic StringCOL_ACCESS_TOKENstatic StringCOL_EXTERNAL_REFERENCE_IDstatic StringCOL_FORM_RECORD_IDstatic StringCOL_UNIVERSAL_REFERENCE_IDstatic StringCOL_USER_MAILstatic StringCOL_USER_PROFILE_UUID-
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
-
-
Constructor Summary
Constructors Constructor Description FormRecordAccess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstantgetAccessExpireAt()InstantgetAccessGrantedAt()EFormRecordAccessGrantTypegetAccessGrantType()StringgetAccessPassword()StringgetAccessToken()StringgetExternalReferenceId()VorganggetFormRecord()LonggetId()StringgetUniversalReferenceId()StringgetUserMail()UUIDgetUserProfileUuid()booleanhasUserRefAccess(IUserRef userRef)Checks if the access is granted to the given user reference.booleanisExpired()Checks if the access is expired.voidsetAccessExpireAt(Instant accessExpireAt)voidsetAccessGrantedAt(Instant accessGrantedAt)voidsetAccessGrantType(EFormRecordAccessGrantType accessGrantType)voidsetAccessPassword(String accessPassword)voidsetAccessToken(String accessToken)voidsetExternalReferenceId(String externalAccessId)voidsetFormRecord(Vorgang formRecord)voidsetId(Long id)!!!WARNING: Currently values biggerInteger.MAX_VALUEor lower thenInteger.MIN_VALUEwill be altered to null!!!voidsetUniversalReferenceId(String userReferenceId)voidsetUserMail(String accessMail)voidsetUserProfileUuid(UUID uuid)voidsetUserRef(@NotNull IUserRef userRef)Sets the user reference for this access.booleanupdateUserRef(@NotNull IUserRef userRef)Updates the user reference for this access.-
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
-
ATTR_FORM_RECORD
public static final String ATTR_FORM_RECORD
- See Also:
- Constant Field Values
-
ATTR_ACCESS_GRANT_TYPE
public static final String ATTR_ACCESS_GRANT_TYPE
- See Also:
- Constant Field Values
-
ATTR_UNIVERSAL_REFERENCE_ID
public static final String ATTR_UNIVERSAL_REFERENCE_ID
- See Also:
- Constant Field Values
-
ATTR_EXTERNAL_REFERENCE_ID
public static final String ATTR_EXTERNAL_REFERENCE_ID
- See Also:
- Constant Field Values
-
ATTR_USER_PROFILE_UUID
public static final String ATTR_USER_PROFILE_UUID
- See Also:
- Constant Field Values
-
ATTR_USER_MAIL
public static final String ATTR_USER_MAIL
- See Also:
- Constant Field Values
-
ATTR_ACCESS_TOKEN
public static final String ATTR_ACCESS_TOKEN
- See Also:
- Constant Field Values
-
ATTR_ACCESS_PASSWORD
public static final String ATTR_ACCESS_PASSWORD
- See Also:
- Constant Field Values
-
ATTR_ACCESS_GRANTED_AT
public static final String ATTR_ACCESS_GRANTED_AT
- See Also:
- Constant Field Values
-
ATTR_ACCESS_EXPIRE_AT
public static final String ATTR_ACCESS_EXPIRE_AT
- See Also:
- Constant Field Values
-
COL_FORM_RECORD_ID
public static final String COL_FORM_RECORD_ID
- See Also:
- Constant Field Values
-
COL_ACCESS_GRANT_TYPE
public static final String COL_ACCESS_GRANT_TYPE
- See Also:
- Constant Field Values
-
COL_UNIVERSAL_REFERENCE_ID
public static final String COL_UNIVERSAL_REFERENCE_ID
- See Also:
- Constant Field Values
-
COL_EXTERNAL_REFERENCE_ID
public static final String COL_EXTERNAL_REFERENCE_ID
- See Also:
- Constant Field Values
-
COL_USER_PROFILE_UUID
public static final String COL_USER_PROFILE_UUID
- See Also:
- Constant Field Values
-
COL_USER_MAIL
public static final String COL_USER_MAIL
- See Also:
- Constant Field Values
-
COL_ACCESS_TOKEN
public static final String COL_ACCESS_TOKEN
- See Also:
- Constant Field Values
-
COL_ACCESS_PASSWORD
public static final String COL_ACCESS_PASSWORD
- See Also:
- Constant Field Values
-
COL_ACCESS_GRANTED_TIMESTAMP
public static final String COL_ACCESS_GRANTED_TIMESTAMP
- See Also:
- Constant Field Values
-
COL_ACCESS_EXPIRE_TIMESTAMP
public static final String COL_ACCESS_EXPIRE_TIMESTAMP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public Long getId()
-
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
-
getFormRecord
public Vorgang getFormRecord()
-
setFormRecord
public void setFormRecord(Vorgang formRecord)
-
getAccessGrantType
public EFormRecordAccessGrantType getAccessGrantType()
-
setAccessGrantType
public void setAccessGrantType(EFormRecordAccessGrantType accessGrantType)
-
getUniversalReferenceId
public String getUniversalReferenceId()
-
setUniversalReferenceId
public void setUniversalReferenceId(String userReferenceId)
-
getAccessGrantedAt
public Instant getAccessGrantedAt()
-
setAccessGrantedAt
public void setAccessGrantedAt(Instant accessGrantedAt)
-
getAccessExpireAt
public Instant getAccessExpireAt()
-
setAccessExpireAt
public void setAccessExpireAt(Instant accessExpireAt)
-
getUserMail
public String getUserMail()
-
setUserMail
public void setUserMail(String accessMail)
-
getExternalReferenceId
public String getExternalReferenceId()
-
setExternalReferenceId
public void setExternalReferenceId(String externalAccessId)
-
getAccessToken
public String getAccessToken()
-
setAccessToken
public void setAccessToken(String accessToken)
-
getAccessPassword
public String getAccessPassword()
-
setAccessPassword
public void setAccessPassword(String accessPassword)
-
getUserProfileUuid
public UUID getUserProfileUuid()
-
setUserProfileUuid
public void setUserProfileUuid(UUID uuid)
-
setUserRef
public void setUserRef(@NotNull @NotNull IUserRef userRef)Sets the user reference for this access.This method sets the universal reference ID and the user profile UUID based on the provided user reference.
- Parameters:
userRef- The user reference to set.
-
updateUserRef
public boolean updateUserRef(@NotNull @NotNull IUserRef userRef)Updates the user reference for this access.This method updates the universal reference ID and the user profile UUID based on the provided user reference and only if they are not already set.
- Parameters:
userRef- The user reference to update.- Returns:
- true if the universal reference ID or the user profile UUID was updated, false otherwise.
-
isExpired
public boolean isExpired()
Checks if the access is expired.This method checks if the access granted until timestamp is before the current instant.
- Returns:
- true if the access is expired, false otherwise.
-
hasUserRefAccess
public boolean hasUserRefAccess(IUserRef userRef)
Checks if the access is granted to the given user reference.- Parameters:
userRef- the user reference to check- Returns:
- true if the access is granted to the given user reference, false otherwise
-
-