Package com.logicaldoc.core.security
Class Session
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.security.Session
- All Implemented Interfaces:
- Serializable,- Comparable<Session>
A single user session with it's unique identifier and the reference to the
 user
- Since:
- 4.6.0
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class com.logicaldoc.core.PersistentObjectDELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
- 
Method SummaryModifier and TypeMethodDescriptionintbooleanlongRetrieves the total duration of the sessiongetKey()getLogs()getNode()getSid()intlonggetUser()longinthashCode()booleanisEmpty()booleanisOpen()voidvoidvoidvoidvoidsetDecodedKey(String decodedKey) Sets the key and encode itvoidsetFinished(Date finished) voidvoidsetKeyLabel(String keyLabel) voidsetLastRenew(Date lastRenew) voidvoidsetTenantId(long tenantId) voidsetTenantName(String tenantName) voidsetUsername(String username) toString()Methods inherited from class com.logicaldoc.core.PersistentObjectgetCreation, getDeleted, getId, getLastModified, getRecordVersion, setCreation, setDeleted, setId, setLastModified, setRecordVersion
- 
Field Details- 
STATUS_OPENpublic static final int STATUS_OPEN- See Also:
 
- 
STATUS_EXPIREDpublic static final int STATUS_EXPIRED- See Also:
 
- 
STATUS_CLOSEDpublic static final int STATUS_CLOSED- See Also:
 
 
- 
- 
Method Details- 
getDictionary
- 
getSid
- 
getLastRenew
- 
isOpenpublic boolean isOpen()
- 
getStatuspublic int getStatus()
- 
setClosedpublic void setClosed()
- 
getDecodedKey
- 
setDecodedKeySets the key and encode it- Parameters:
- decodedKey- The key in readable format
- Throws:
- NoSuchAlgorithmException- Cripting error
 
- 
getUsername
- 
toString- Overrides:
- toStringin class- PersistentObject
 
- 
getUserIdpublic long getUserId()
- 
getTenantIdpublic long getTenantId()- Overrides:
- getTenantIdin class- PersistentObject
 
- 
getTenantName
- 
logError
- 
logWarn
- 
logInfo
- 
getLogs
- 
getLastError
- 
isEmptypublic boolean isEmpty()
- 
getDurationpublic long getDuration()Retrieves the total duration of the session- Returns:
- the duration in milliseconds
 
- 
getKey
- 
setKey
- 
getClient
- 
getUser
- 
setUsername
- 
setTenantIdpublic void setTenantId(long tenantId) - Overrides:
- setTenantIdin class- PersistentObject
 
- 
setTenantName
- 
getUnprotectedDocs
- 
getNode
- 
setNode
- 
setLastRenew
- 
getFinished
- 
setFinished
- 
getKeyLabel
- 
setKeyLabel
- 
compareTo- Specified by:
- compareToin interface- Comparable<Session>
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- PersistentObject
 
- 
equals- Overrides:
- equalsin class- PersistentObject
 
 
-