|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.app.LyDataSession
public class LyDataSession
This class describes a user session. Each time a user connects itself on an application, a new instance of this class is created. By default, in heavy client versions a session is created when an application is started. In thin client versions (Servlet) a new session is created each time a new user connects himself on the servlet. A session is described by :
sessionBehavior
attribute on the root tag
<PROJECT>
. This interface implements some specific behavior of the session.
LyApplication
Nested Class Summary | |
---|---|
static class |
LyDataSession.State
States of the session. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
static int |
_nbSessions
Number of sessions. |
static int |
_sessionsCounter
Sessions counter. |
Constructor Summary | |
---|---|
LyDataSession(LyApplication application)
Constructor with a given application. |
|
LyDataSession(LyApplication application,
boolean registerSession)
Constructor with a given application. |
|
LyDataSession(LyApplication application,
LyDataSession parent,
boolean registerSession)
Constructor with a given application. |
|
LyDataSession(LyApplication application,
LyDataSession parent,
boolean registerSession,
java.lang.String perspectiveId)
Constructor with a given application. |
Method Summary | |
---|---|
void |
addInfoListener(LyInfoListener listener,
java.lang.String prefix)
Adds an info listener to the application. |
void |
addValue(java.lang.Object key,
java.lang.Object value)
Adds a pair key-value to the session. |
void |
close()
Closes the session. |
void |
dumpLocks(boolean before)
|
LyApplication |
getApplication()
Returns the application owner of the session. |
LyContextManager |
getContextManager()
Gets the context manager of this application. |
long |
getCreationTime()
Returns the time of creation of this session. |
LyDataSource |
getDataSource(LyClass lyClass)
Retrieves a data source on this session. |
LyDataSource |
getDataSource(java.lang.String classId)
Retrieves a data source on this session. |
LyEnvironment |
getEnvironment()
Returns the environment of the session. |
void |
getHardLock()
Get a soft lock on this session. |
java.lang.String |
getId()
Accessor for the identifier of the session. |
java.lang.Object |
getKeyValue(java.lang.String key)
Retrieves a value from a registered key. |
LyObjectList |
getObjectsByName(LyInfoList<LyClassInfo> classInfos,
java.lang.String[] objectNames)
Retrieves a list of objects by their names from a list of classes. |
LyObjectSource |
getObjectSource(LyClassInfo classInfo)
Retrieves an object source on this session. |
LyDataSession |
getParent()
Returns the parent session. |
java.lang.String |
getPluginId()
Get the plugin id for this session. |
LyDataSessionBehaviorInterface |
getSessionBehavior()
Returns the client interface of this session. |
void |
getSoftLock()
Get a soft lock on this session. |
LyDataSession.State |
getState()
Gets state of this session. |
java.util.Vector<LyDataSession> |
getSubSessions()
Get sub-sessions of this session. |
LyObject |
getUser()
Accessor to the user of current session. |
java.lang.Object |
getValue(java.lang.Object key)
Retrieves a value from a registered key. |
void |
handleException(java.lang.Throwable t)
Called when an exception occured during proccessing. |
boolean |
hasTransaction()
Test if the session has some pending transaction. |
boolean |
isClosed()
Indicates whether the session is closed or not. |
boolean |
isObjectVisible(LyObject object)
Checks whether an object is visible in this session or not. |
boolean |
isRegistered()
Indicates whether the session is registered or not. |
boolean |
isValid()
Indicates whether the session is valid or not. |
void |
notifyInfoListeners(java.lang.String prefix)
Notify info listeners on a class that an event has occured. |
void |
putObjectSource(LyObjectSource objectSource)
Registers an object source on this session. |
void |
register(boolean start)
Registers the session on its application owner. |
void |
releaseHardLock()
Release a soft lock on this session. |
void |
releaseSoftLock()
Release a soft lock on this session. |
void |
removeInfoListener(LyInfoListener listener)
Adds an info listener to the application. |
void |
removeObjectSource(LyObjectSource objectSource)
Unregisters an object source on this session. |
void |
resetUndoRedo()
Reset the undo redo stack |
void |
setPluginId(java.lang.String pluginId)
Set the plugin id for the session. |
void |
setTimeZone(java.lang.String timeZone)
Set the current time zone for the user |
void |
setUser(LyObject user)
Sets the user of this session. |
void |
setValid(boolean valid)
Validates the session. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static int _nbSessions
public static int _sessionsCounter
Constructor Detail |
---|
public LyDataSession(LyApplication application)
application
- The application owner of the session.public LyDataSession(LyApplication application, boolean registerSession)
application
- The application owner of the session.registerSession
- Indicates if the session must be registered on the application
(default is true), or if this is a temporary session which should be
ignored.public LyDataSession(LyApplication application, LyDataSession parent, boolean registerSession)
application
- The application owner of the session.parent
- Parent session: used for a module.registerSession
- Indicates if the session must be registered on the application
(default is true), or if this is a temporary session which should be
ignored.public LyDataSession(LyApplication application, LyDataSession parent, boolean registerSession, java.lang.String perspectiveId)
application
- The application owner of the session.parent
- Parent session: used for a module.registerSession
- Indicates if the session must be registered on the application
(default is true), or if this is a temporary session which should be
ignored.perspectiveId
- The perspective id for this session.Method Detail |
---|
public java.lang.String getId()
public final LyDataSession.State getState()
public final boolean isClosed()
close()
public boolean isValid()
public boolean isRegistered()
register(boolean)
public LyEnvironment getEnvironment()
LyEnvironment
public LyApplication getApplication()
LyApplication
public LyDataSession getParent()
public LyDataSessionBehaviorInterface getSessionBehavior()
LyDataSessionBehaviorInterface
public long getCreationTime()
public void setValid(boolean valid)
valid
- a boolean indicating if the session is validpublic void register(boolean start)
start
- Indicates whether the session must be started or not.
java.lang.IllegalStateException
- if the session has already been registered.public boolean hasTransaction()
public void close()
public void addValue(java.lang.Object key, java.lang.Object value)
key
- The key that must be stored.value
- The value that must be stored with the key.getValue(java.lang.Object)
public java.lang.Object getValue(java.lang.Object key)
key
- The key that must be used.
addValue(java.lang.Object, java.lang.Object)
public void putObjectSource(LyObjectSource objectSource)
objectSource
- The object source that must be registered.LyObjectSource
,
getObjectSource(leon.info.LyClassInfo)
public void removeObjectSource(LyObjectSource objectSource)
objectSource
- The object source that must be unregistered.LyObjectSource
,
getObjectSource(leon.info.LyClassInfo)
public LyObjectSource getObjectSource(LyClassInfo classInfo)
classInfo
- The class corresponding to the object source that must be returned.
LyObjectSource
,
putObjectSource(leon.data.LyObjectSource)
public LyObjectList getObjectsByName(LyInfoList<LyClassInfo> classInfos, java.lang.String[] objectNames)
classInfos
- the list of target classes used to retrieve the objects.objectNames
- the list of object names used to retrieve the objects.
public LyDataSource getDataSource(java.lang.String classId)
classId
- The identifier of the class corresponding to the object source that must be
returned.
LyDataSource
,
getDataSource(LyClass)
public LyDataSource getDataSource(LyClass lyClass)
lyClass
- The class corresponding to the object source that must be returned.
LyDataSource
,
getDataSource(String)
public void handleException(java.lang.Throwable t)
t
- The throwable instance that causes the stop of the processing.public void addInfoListener(LyInfoListener listener, java.lang.String prefix)
listener
- Info listener that must be added.prefix
- Prefix of the files from which objects info were loaded.public void removeInfoListener(LyInfoListener listener)
listener
- Info listener that must be removed.public void notifyInfoListeners(java.lang.String prefix)
prefix
- Prefix of the files from which objects info were loaded.public java.util.Vector<LyDataSession> getSubSessions()
public LyContextManager getContextManager()
public void resetUndoRedo()
public void setPluginId(java.lang.String pluginId)
pluginId
- The plugin id.public java.lang.String getPluginId()
public LyObject getUser()
public boolean isObjectVisible(LyObject object)
object
- the object that must be checked
public java.lang.Object getKeyValue(java.lang.String key)
getKeyValue
in interface LyEvaluator
key
- The key that must be used.
public void dumpLocks(boolean before)
public void getSoftLock()
public void releaseSoftLock()
public void getHardLock()
public void releaseHardLock()
public void setUser(LyObject user)
public void setTimeZone(java.lang.String timeZone)
timeZoneId
-
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |