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:
  • Field Details

  • Method Details

    • getDictionary

      public Map<String,Object> getDictionary()
    • getSid

      public String getSid()
    • getLastRenew

      public Date getLastRenew()
    • isOpen

      public boolean isOpen()
    • getStatus

      public int getStatus()
    • setClosed

      public void setClosed()
    • getDecodedKey

      public String getDecodedKey()
    • setDecodedKey

      public void setDecodedKey(String decodedKey) throws NoSuchAlgorithmException
      Sets the key and encode it
      Parameters:
      decodedKey - The key in readable format
      Throws:
      NoSuchAlgorithmException - Cripting error
    • getUsername

      public String getUsername()
    • toString

      public String toString()
      Overrides:
      toString in class PersistentObject
    • getUserId

      public long getUserId()
    • getTenantId

      public long getTenantId()
      Overrides:
      getTenantId in class PersistentObject
    • getTenantName

      public String getTenantName()
    • 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()
    • getDuration

      public long getDuration()
      Retrieves the total duration of the session
      Returns:
      the duration in milliseconds
    • getKey

      public String getKey()
    • setKey

      public void setKey(String key)
    • getClient

      public Client getClient()
    • getUser

      public User getUser()
    • setUsername

      public void setUsername(String username)
    • setTenantId

      public void setTenantId(long tenantId)
      Overrides:
      setTenantId in class PersistentObject
    • setTenantName

      public void setTenantName(String tenantName)
    • getUnprotectedDocs

      public Map<Long,String> getUnprotectedDocs()
    • getNode

      public String getNode()
    • setNode

      public void setNode(String node)
    • setLastRenew

      public void setLastRenew(Date lastRenew)
    • getFinished

      public Date getFinished()
    • setFinished

      public void setFinished(Date finished)
    • getKeyLabel

      public String getKeyLabel()
    • setKeyLabel

      public void setKeyLabel(String keyLabel)
    • compareTo

      public int compareTo(Session other)
      Specified by:
      compareTo in interface Comparable<Session>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PersistentObject
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class PersistentObject