Package com.logicaldoc.gui.common.client
Class Session
- java.lang.Object
-
- com.logicaldoc.gui.common.client.Session
-
- All Implemented Interfaces:
DocumentObserver
public class Session extends Object implements DocumentObserver
Represents a client work session- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description Session()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObserver(SessionObserver observer)
void
close()
static Session
get()
String
getConfig(String name)
boolean
getConfigAsBoolean(String name)
int
getConfigAsInt(String name)
long
getConfigAsLong(String name)
Long
getHiliteDocId()
String
getIncomingMessage()
GUIInfo
getInfo()
GUISession
getSession()
String
getSid()
String
getTenantConfig(String name)
boolean
getTenantConfigAsBoolean(String name)
long
getTenantId()
String
getTenantName()
GUIUser
getUser()
void
init(GUISession session)
boolean
isAdmin()
Checks if the current user belongs to the admin groupboolean
isDefaultTenant()
boolean
isDemo()
boolean
isDevel()
boolean
isFolderPagination()
boolean
isServerPushEnabled()
boolean
isShowThumbnail()
boolean
isUpdating()
void
logout()
void
onDocumentBeginEditing(GUIDocument document)
Invoked after the document's properties are being editedvoid
onDocumentCancelEditing(GUIDocument document)
Invoked after the document's properties are being editedvoid
onDocumentCheckedIn(GUIDocument document)
Invoked after the document's checkinvoid
onDocumentCheckedOut(GUIDocument document)
Invoked after the document's checkoutvoid
onDocumentLocked(GUIDocument document)
Invoked after the document is lockedvoid
onDocumentModified(GUIDocument document)
Invoked after the document's properties has been changedvoid
onDocumentMoved(GUIDocument document)
Invoked after the document has been storedvoid
onDocumentsDeleted(GUIDocument[] documents)
Invoked after the document has been deletedvoid
onDocumentSelected(GUIDocument document)
Invoked when a document is selectedvoid
onDocumentStored(GUIDocument document)
Invoked after the document has been storedvoid
onDocumentUnlocked(GUIDocument document)
Invoked after the document is unlockedvoid
onInvalidSession()
void
removeObserver(SessionObserver observer)
void
setConfig(String name, String value)
void
setHiliteDocId(Long hiliteDocId)
void
setInfo(GUIInfo info)
void
setSession(GUISession session)
void
setShowThumbnail(boolean showThumbnail)
void
setUpdating(boolean updating)
void
setUser(GUIUser user)
void
updateConfig(List<GUIParameter> params)
-
-
-
Method Detail
-
get
public static Session get()
-
isDemo
public boolean isDemo()
-
isDevel
public boolean isDevel()
-
getSid
public String getSid()
-
getIncomingMessage
public String getIncomingMessage()
-
isFolderPagination
public boolean isFolderPagination()
-
close
public void close()
-
getUser
public GUIUser getUser()
-
setUser
public void setUser(GUIUser user)
-
init
public void init(GUISession session)
-
onInvalidSession
public void onInvalidSession()
-
addObserver
public void addObserver(SessionObserver observer)
-
removeObserver
public void removeObserver(SessionObserver observer)
-
getInfo
public GUIInfo getInfo()
-
setInfo
public void setInfo(GUIInfo info)
-
getSession
public GUISession getSession()
-
setSession
public void setSession(GUISession session)
-
getTenantName
public String getTenantName()
-
getTenantId
public long getTenantId()
-
isDefaultTenant
public boolean isDefaultTenant()
-
isAdmin
public boolean isAdmin()
Checks if the current user belongs to the admin group- Returns:
- true if the current user belongs to the admin group
-
getConfigAsInt
public int getConfigAsInt(String name)
-
getConfigAsLong
public long getConfigAsLong(String name)
-
getConfigAsBoolean
public boolean getConfigAsBoolean(String name)
-
getTenantConfigAsBoolean
public boolean getTenantConfigAsBoolean(String name)
-
updateConfig
public void updateConfig(List<GUIParameter> params)
-
isServerPushEnabled
public boolean isServerPushEnabled()
-
isShowThumbnail
public boolean isShowThumbnail()
-
setShowThumbnail
public void setShowThumbnail(boolean showThumbnail)
-
logout
public void logout()
-
onDocumentSelected
public void onDocumentSelected(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked when a document is selected- Specified by:
onDocumentSelected
in interfaceDocumentObserver
- Parameters:
document
- the document that has been selected
-
onDocumentModified
public void onDocumentModified(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document's properties has been changed- Specified by:
onDocumentModified
in interfaceDocumentObserver
- Parameters:
document
- the document that has been modified
-
onDocumentStored
public void onDocumentStored(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document has been stored- Specified by:
onDocumentStored
in interfaceDocumentObserver
- Parameters:
document
- the document that has been stored
-
onDocumentCheckedIn
public void onDocumentCheckedIn(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document's checkin- Specified by:
onDocumentCheckedIn
in interfaceDocumentObserver
- Parameters:
document
- the document that has been checked in
-
onDocumentCheckedOut
public void onDocumentCheckedOut(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document's checkout- Specified by:
onDocumentCheckedOut
in interfaceDocumentObserver
- Parameters:
document
- the document that has been checked out
-
onDocumentsDeleted
public void onDocumentsDeleted(GUIDocument[] documents)
Description copied from interface:DocumentObserver
Invoked after the document has been deleted- Specified by:
onDocumentsDeleted
in interfaceDocumentObserver
- Parameters:
documents
- the documents that have been deleted
-
onDocumentMoved
public void onDocumentMoved(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document has been stored- Specified by:
onDocumentMoved
in interfaceDocumentObserver
- Parameters:
document
- the document that has been moved
-
onDocumentLocked
public void onDocumentLocked(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document is locked- Specified by:
onDocumentLocked
in interfaceDocumentObserver
- Parameters:
document
- the document that has been locked
-
onDocumentUnlocked
public void onDocumentUnlocked(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document is unlocked- Specified by:
onDocumentUnlocked
in interfaceDocumentObserver
- Parameters:
document
- the document that has been unlocked
-
onDocumentBeginEditing
public void onDocumentBeginEditing(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document's properties are being edited- Specified by:
onDocumentBeginEditing
in interfaceDocumentObserver
- Parameters:
document
- the document that is being edited
-
onDocumentCancelEditing
public void onDocumentCancelEditing(GUIDocument document)
Description copied from interface:DocumentObserver
Invoked after the document's properties are being edited- Specified by:
onDocumentCancelEditing
in interfaceDocumentObserver
- Parameters:
document
- the document that is being edited
-
getHiliteDocId
public Long getHiliteDocId()
-
setHiliteDocId
public void setHiliteDocId(Long hiliteDocId)
-
isUpdating
public boolean isUpdating()
-
setUpdating
public void setUpdating(boolean updating)
-
-