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>
public class Session extends PersistentObject implements 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Session.Log
-
Field Summary
Fields Modifier and Type Field Description static int
STATUS_CLOSED
static int
STATUS_EXPIRED
static int
STATUS_OPEN
-
Fields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Session o)
boolean
equals(Object obj)
Client
getClient()
Date
getCreation()
Map<String,Object>
getDictionary()
String
getKey()
Session.Log
getLastError()
Date
getLastRenew()
List<Session.Log>
getLogs()
String
getNode()
String
getPassword()
String
getSid()
int
getStatus()
long
getTenantId()
String
getTenantName()
Map<Long,String>
getUnprotectedDocs()
User
getUser()
long
getUserId()
String
getUsername()
int
hashCode()
boolean
isEmpty()
boolean
isOpen()
void
logError(String message)
void
logInfo(String message)
void
logWarn(String message)
void
setClosed()
void
setCreation(Date creation)
void
setKey(String key)
void
setLastRenew(Date lastRenew)
void
setNode(String node)
void
setPassword(String password)
void
setTenantId(long tenantId)
void
setTenantName(String tenantName)
void
setUsername(String username)
String
toString()
-
Methods inherited from class com.logicaldoc.core.PersistentObject
getDeleted, getId, getLastModified, getRecordVersion, setDeleted, setId, setLastModified, setRecordVersion
-
-
-
-
Field Detail
-
STATUS_OPEN
public static final int STATUS_OPEN
- See Also:
- Constant Field Values
-
STATUS_EXPIRED
public static final int STATUS_EXPIRED
- See Also:
- Constant Field Values
-
STATUS_CLOSED
public static final int STATUS_CLOSED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSid
public String getSid()
-
getCreation
public Date getCreation()
-
getLastRenew
public Date getLastRenew()
-
isOpen
public boolean isOpen()
-
getStatus
public int getStatus()
-
setClosed
public void setClosed()
-
getUsername
public String getUsername()
-
toString
public String toString()
- Overrides:
toString
in classPersistentObject
-
compareTo
public int compareTo(Session o)
- Specified by:
compareTo
in interfaceComparable<Session>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPersistentObject
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classPersistentObject
-
getUserId
public long getUserId()
-
getTenantId
public long getTenantId()
- Overrides:
getTenantId
in classPersistentObject
-
getTenantName
public String getTenantName()
-
getPassword
public String getPassword()
-
logError
public void logError(String message)
-
logWarn
public void logWarn(String message)
-
logInfo
public void logInfo(String message)
-
getLogs
public List<Session.Log> getLogs()
-
getLastError
public Session.Log getLastError()
-
isEmpty
public boolean isEmpty()
-
getKey
public String getKey()
-
setKey
public void setKey(String key)
-
getClient
public Client getClient()
-
getUser
public User getUser()
-
setTenantId
public void setTenantId(long tenantId)
- Overrides:
setTenantId
in classPersistentObject
-
setTenantName
public void setTenantName(String tenantName)
-
getNode
public String getNode()
-
setNode
public void setNode(String node)
-
setCreation
public void setCreation(Date creation)
-
setLastRenew
public void setLastRenew(Date lastRenew)
-
setUsername
public void setUsername(String username)
-
setPassword
public void setPassword(String password)
-
-