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 voidaddObserver(SessionObserver observer)voidclose()static Sessionget()StringgetConfig(String name)booleangetConfigAsBoolean(String name)intgetConfigAsInt(String name)longgetConfigAsLong(String name)LonggetHiliteDocId()StringgetIncomingMessage()GUIInfogetInfo()GUISessiongetSession()StringgetSid()StringgetTenantConfig(String name)booleangetTenantConfigAsBoolean(String name)longgetTenantId()StringgetTenantName()GUIUsergetUser()voidinit(GUISession session)booleanisAdmin()Checks if the current user belongs to the admin groupbooleanisDefaultTenant()booleanisDemo()booleanisDevel()booleanisFolderPagination()booleanisServerPushEnabled()booleanisShowThumbnail()voidlogout()voidonDocumentBeginEditing(GUIDocument document)Invoked after the document's properties are being editedvoidonDocumentCancelEditing(GUIDocument document)Invoked after the document's properties are being editedvoidonDocumentCheckedIn(GUIDocument document)Invoked after the document's checkinvoidonDocumentCheckedOut(GUIDocument document)Invoked after the document's checkoutvoidonDocumentLocked(GUIDocument document)Invoked after the document is lockedvoidonDocumentModified(GUIDocument document)Invoked after the document's properties has been changedvoidonDocumentMoved(GUIDocument document)Invoked after the document has been storedvoidonDocumentsDeleted(GUIDocument[] documents)Invoked after the document has been deletedvoidonDocumentSelected(GUIDocument document)Invoked when a document is selectedvoidonDocumentStored(GUIDocument document)Invoked after the document has been storedvoidonDocumentUnlocked(GUIDocument document)Invoked after the document is unlockedvoidonInvalidSession()voidremoveObserver(SessionObserver observer)voidsetConfig(String name, String value)voidsetHiliteDocId(Long hiliteDocId)voidsetInfo(GUIInfo info)voidsetSession(GUISession session)voidsetShowThumbnail(boolean showThumbnail)voidsetUser(GUIUser user)voidupdateConfig(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:DocumentObserverInvoked when a document is selected- Specified by:
onDocumentSelectedin interfaceDocumentObserver- Parameters:
document- the document that has been selected
-
onDocumentModified
public void onDocumentModified(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document's properties has been changed- Specified by:
onDocumentModifiedin interfaceDocumentObserver- Parameters:
document- the document that has been modified
-
onDocumentStored
public void onDocumentStored(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document has been stored- Specified by:
onDocumentStoredin interfaceDocumentObserver- Parameters:
document- the document that has been stored
-
onDocumentCheckedIn
public void onDocumentCheckedIn(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document's checkin- Specified by:
onDocumentCheckedInin interfaceDocumentObserver- Parameters:
document- the document that has been checked in
-
onDocumentCheckedOut
public void onDocumentCheckedOut(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document's checkout- Specified by:
onDocumentCheckedOutin interfaceDocumentObserver- Parameters:
document- the document that has been checked out
-
onDocumentsDeleted
public void onDocumentsDeleted(GUIDocument[] documents)
Description copied from interface:DocumentObserverInvoked after the document has been deleted- Specified by:
onDocumentsDeletedin interfaceDocumentObserver- Parameters:
documents- the documents that have been deleted
-
onDocumentMoved
public void onDocumentMoved(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document has been stored- Specified by:
onDocumentMovedin interfaceDocumentObserver- Parameters:
document- the document that has been moved
-
onDocumentLocked
public void onDocumentLocked(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document is locked- Specified by:
onDocumentLockedin interfaceDocumentObserver- Parameters:
document- the document that has been locked
-
onDocumentUnlocked
public void onDocumentUnlocked(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document is unlocked- Specified by:
onDocumentUnlockedin interfaceDocumentObserver- Parameters:
document- the document that has been unlocked
-
onDocumentBeginEditing
public void onDocumentBeginEditing(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document's properties are being edited- Specified by:
onDocumentBeginEditingin interfaceDocumentObserver- Parameters:
document- the document that is being edited
-
onDocumentCancelEditing
public void onDocumentCancelEditing(GUIDocument document)
Description copied from interface:DocumentObserverInvoked after the document's properties are being edited- Specified by:
onDocumentCancelEditingin interfaceDocumentObserver- Parameters:
document- the document that is being edited
-
getHiliteDocId
public Long getHiliteDocId()
-
setHiliteDocId
public void setHiliteDocId(Long hiliteDocId)
-
-