|
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
leon.app.LySession
public class LySession
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 |
---|
Nested classes/interfaces inherited from class leon.app.LyDataSession |
---|
LyDataSession.State |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version. |
static java.lang.String |
DEFAULT
Default string. |
static java.lang.String |
DEMAND_EXIT
The Exit demand. |
static java.lang.String |
DRAGGED_OBJECT
DraggedObject string. |
static java.lang.String |
METRIC_OBJECT_ID_KEY
Metric object id constant. |
static java.lang.String |
POPUP_VIEW
Popup view String. |
static short |
SESSION_TIMEOUT
Default session time out (no time out). |
Fields inherited from class leon.app.LyDataSession |
---|
_nbSessions, _sessionsCounter |
Constructor Summary | |
---|---|
LySession(LyApplication application)
Constructor with a given application. |
|
LySession(LyApplication application,
boolean registerSession)
Constructor with a given application. |
|
LySession(LyApplication application,
LySession parent,
boolean registerSession)
Constructor with a given application. |
|
LySession(LyApplication application,
LySession parent,
java.lang.String perspectiveId,
boolean registerSession)
Constructor with a given application. |
Method Summary | |
---|---|
void |
addController(LyController controller)
Registers a controller on the session. |
void |
addOutlineController(LyOutlineController controller)
Add an outline controller for this session. |
void |
addResetListener(LyResetInterface listener)
Add reset listener. |
java.lang.String |
checkControllerId(LyController controller,
java.lang.String id)
Method to check id of the given controller. |
void |
close()
Closes the session. |
void |
closeViews()
Closes all views of the session except root. |
void |
closeViews(java.lang.String stackName)
Closes all views of the session except root. |
void |
confirmClosing()
Confirm the closing. |
void |
confirmExit()
Confirm the exit. |
void |
confirmExit(boolean asynchronous)
Confirm the exit. |
void |
controllerHidden(LyViewController viewController)
Removes a view controller from the stack of shown controllers. |
void |
controllerShown(LyViewController viewController)
Adds a view controller to the stack of shown controllers. |
void |
createStickerWindow(LyController parent,
LyCreateStickerController stickerController,
LySticker sticker)
Deprecated. |
boolean |
enableAction(LyAction action,
LyController controller,
LyObjectList objects,
boolean showError)
Indicates if an action is enabled for a given controller and a given objects list. |
boolean |
enableTransverseAction(LyAction action,
LyClassInfo classInfo,
LyController controller,
LyObjectList objects,
boolean showError)
Indicates if a transverse action is enabled for a given controller and a given objects list. |
void |
endTimer(LyTimer timer)
Called by the timer when session is in time out. |
void |
exit()
Exit application. |
LyApplication |
getApplication()
Returns the application owner of the session. |
LyController |
getController(int index)
Retrieves a controller by its index. |
LyController |
getController(java.lang.String id)
Retrieves a controller by its identifier. |
int |
getControllerCount()
Gets number of controllers registered on this session. |
int |
getControllerStackSize(java.lang.String stackName)
Returns the stack size (number of controller) for the given stack (or null for default). |
LyViewController |
getLastViewController()
Returns the view controller that was last shown. |
LyViewController |
getLastViewController(int steps)
Returns the view controller that was last shown. |
LySession |
getMasterSession()
Return the master session for this session. |
java.lang.String |
getPluginId()
Get the plugin id for this session. |
int |
getPrintThreadCount()
Returns the number of printing threads registered on this session. |
LyController |
getRootContextController()
Get a root level context controller. |
int |
getSessionTimeout()
Returns the session timeout in seconds. |
java.util.Vector<LySession> |
getSlaveSessions()
Return the list of slave sessions. |
LyViewController |
getStackLastController(java.lang.String stackName)
Returns the last controller for the given stack (or null for default). |
java.lang.String[] |
getTempFile(java.lang.String id)
Get a temporary file from its id. |
LyViewManager |
getViewManager()
Accessor to the view manager. |
LyViewManager |
getViewManager(boolean mobile)
Accessor to the view manager. |
void |
guiStart()
Starts GUI. |
void |
guiStop()
Stops GUI. |
void |
interruptPrintThreads()
Interrupts printing threads registered on this session. |
LyController |
invokeAction(LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList objects,
boolean show)
Invokes an action. |
boolean |
invokeExtraAction(LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList objects,
boolean show)
Invokes an action that has no controller (an extra action). |
boolean |
isChatting()
Check chat status. |
boolean |
isIdle()
Check idle status of the table. |
LyInfoList<?> |
loadUserPreferences()
Method for loading user preferences. |
LyInfoList<?> |
loadUserStickers()
Method for loading user stickers. |
boolean |
login(java.lang.String login,
java.lang.String password,
java.util.HashMap<java.lang.String,java.lang.String> values)
Log user corresponding to given login and password. |
boolean |
login(java.lang.String login,
java.lang.String password,
java.lang.String loginParameters)
Log user corresponding to given login and password. |
void |
notifyOutline(LyAreaController controller)
Notifies the outline controller that the selection has changed in an other controller. |
void |
processAboutAction(LyController parent)
Show the result of the about action. |
LyController |
processAction(LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList objects)
Processes the given action : creates the controller that handles the action. |
boolean |
processExtraAction(LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList objects)
Processes an action that has no controller (an extra action) : processing of standard actions. |
void |
processHelpAction(LyController parent)
Show the result of the help action. |
void |
processLogAction(LyController parent)
Show the result of the log action. |
void |
processVersionAction(LyController parent)
Show the result of the version action. |
void |
register(boolean start)
Registers the session on its application owner. |
void |
removeController(LyController controller)
Unregisters a controller from the session. |
void |
removeOutlineController(LyOutlineController controller)
Remove an outline controller of this session for a given perspective. |
void |
removeResetListener(LyResetInterface listener)
Remove given reset listener. |
void |
reset()
Reset session. |
void |
resetTimeout()
Called to reset the timer (When a user action occured). |
void |
resetUndoRedo()
Reset undo redo stack. |
void |
sessionTimeout()
Called when the session is in time out. |
void |
sessionTimeout(boolean asynchronous)
Called when the session is in time out. |
void |
setChatting(boolean chat)
Set chat status. |
void |
setIdle(boolean idle)
Freeze/unfreeze session. |
void |
setLanguage(java.lang.String language)
Sets the language for this session. |
void |
setMasterSession(LySession masterSession)
Sets the master session for this session. |
void |
setPluginId(java.lang.String pluginId)
Set the plugin id for the session. |
void |
setSkin(java.lang.String skin)
Sets the skin for this session. |
void |
showView(LyController controller)
Show view corresponding to the given controller. |
LyController |
start()
Starts the session by invoking the root action. |
java.lang.String |
storeTempFile(java.lang.String path,
java.lang.String name)
Register a temporary file. |
java.lang.String |
toString()
Dumps this session as a string. |
boolean |
validateAction(LyAction action,
LyController controller)
Indicates if an action is valid for a given controller. |
void |
writeXml(LyAction action,
LyClassInfo classInfo,
java.lang.String file,
boolean fullView)
Write XML view file corresponding to a given action. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final short SESSION_TIMEOUT
public static final java.lang.String DEMAND_EXIT
public static final java.lang.String DEFAULT
public static final java.lang.String DRAGGED_OBJECT
public static final java.lang.String METRIC_OBJECT_ID_KEY
public static final java.lang.String POPUP_VIEW
Constructor Detail |
---|
public LySession(LyApplication application)
application
- The application owner of the session.public LySession(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 LySession(LyApplication application, LySession 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 LySession(LyApplication application, LySession parent, java.lang.String perspectiveId, boolean registerSession)
application
- The application owner of the session.parent
- Parent session: used for a module.perspectiveId
- The perspective id for this 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.Method Detail |
---|
public LyApplication getApplication()
getApplication
in class LyDataSession
LyApplication
public int getSessionTimeout()
public void register(boolean start)
register
in class LyDataSession
start
- Indicates whether the session must be started or not.
java.lang.IllegalStateException
- if the session has already been registered.start()
public LyController start()
public boolean validateAction(LyAction action, LyController controller)
action
- The action that must be tested.controller
- The controller used to control the action validity.
LySessionBehavior.validateAction(leon.app.LySession, leon.info.LyAction, leon.control.LyController)
public boolean enableAction(LyAction action, LyController controller, LyObjectList objects, boolean showError)
action
- The action that must be tested.controller
- The controller used to control the action validity.objects
- The list of objects on which the action should be applied.showError
- Indicates if an error message should be displayed in case of error.
LySessionBehavior.enableAction(leon.app.LySession, leon.info.LyAction, leon.control.LyController, leon.data.LyObjectList, boolean)
public boolean enableTransverseAction(LyAction action, LyClassInfo classInfo, LyController controller, LyObjectList objects, boolean showError)
action
- The action that must be tested.classInfo
- The classInfo for which the action is checked.controller
- The controller used to control the action validity.objects
- The list of objects on which the action should be applied.showError
- Indicates if an error message should be displayed in case of error.
LySessionBehavior.enableTransverseAction(leon.app.LySession, leon.info.LyAction, leon.info.LyClassInfo, leon.control.LyController, leon.data.LyObjectList, boolean)
public boolean invokeExtraAction(LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects, boolean show)
parent
- The source controller.action
- The action to execute.classInfo
- The class on which the action applies.objects
- The list of objects on which the action applies.show
- Indicates if the action must be shown or not.
LySessionBehavior.invokeExtraAction(leon.app.LySession, leon.control.LyController, leon.info.LyAction, leon.info.LyClassInfo, leon.data.LyObjectList, boolean)
public boolean processExtraAction(LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
parent
- The source controller.action
- The action to execute.classInfo
- The class on which the action applies.objects
- The list of objects on which the action applies.
LySessionBehavior.invokeExtraAction(leon.app.LySession, leon.control.LyController, leon.info.LyAction, leon.info.LyClassInfo, leon.data.LyObjectList, boolean)
public LyController invokeAction(LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects, boolean show)
parent
- The source controller.action
- The action to execute.classInfo
- The class on which the action applies.objects
- The list of objects on which the action applies.show
- Indicates if the action must be shown or not.
LySessionBehavior.invokeAction(leon.app.LySession, leon.control.LyController, leon.info.LyAction, leon.info.LyClassInfo, leon.data.LyObjectList, boolean)
public LyController processAction(LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
parent
- The source controller.action
- The action to execute.classInfo
- The class on which the action applies.objects
- The list of objects on which the action applies.
LySessionBehavior.invokeAction(leon.app.LySession, leon.control.LyController, leon.info.LyAction, leon.info.LyClassInfo, leon.data.LyObjectList, boolean)
public void processAboutAction(LyController parent)
parent
- the source controllerpublic void processLogAction(LyController parent)
parent
- the source controllerpublic void processVersionAction(LyController parent)
parent
- the source controllerpublic void processHelpAction(LyController parent)
parent
- the source controllerpublic void showView(LyController controller)
controller
- the controller to showpublic void writeXml(LyAction action, LyClassInfo classInfo, java.lang.String file, boolean fullView)
action
- The action to execute.classInfo
- The class on which the action applies.file
- Path of the output file.fullView
- Dump of the full view or only of its content.LySessionBehavior.invokeAction(leon.app.LySession, leon.control.LyController, leon.info.LyAction, leon.info.LyClassInfo, leon.data.LyObjectList, boolean)
public int getPrintThreadCount()
public void interruptPrintThreads()
public void endTimer(LyTimer timer)
endTimer
in interface LyTimerClientInterface
timer
- the time that call this methodpublic void resetTimeout()
public void sessionTimeout()
public void sessionTimeout(boolean asynchronous)
asynchronous
- indicates whether the exit is processed asynchronouslypublic void exit()
public void confirmExit()
public void confirmExit(boolean asynchronous)
asynchronous
- indicates whether the exit is processed asynchronouslypublic void confirmClosing()
public void close()
close
in class LyDataSession
public void closeViews()
public void closeViews(java.lang.String stackName)
stackName
- the name of the controller stack or null if default stack is considered
The name of a stack is the name of the window (Servlet mode)public java.lang.String checkControllerId(LyController controller, java.lang.String id)
controller
- The new controller.id
- Desired id.
public void addController(LyController controller)
controller
- The controller to register.
java.lang.IllegalArgumentException
- if the given controller is null.removeController(leon.control.LyController)
public void removeController(LyController controller)
controller
- The controller to unregister.
java.lang.IllegalArgumentException
- if the given controller is null.addController(leon.control.LyController)
public LyController getController(java.lang.String id)
id
- The id of the controller to get.
java.lang.IllegalArgumentException
- if the given string is null.public LyController getController(int index)
index
- The index of the controller to get.
public int getControllerCount()
public void controllerShown(LyViewController viewController)
viewController
- The view controller to add.public void controllerHidden(LyViewController viewController)
viewController
- The view controller to remove.public int getControllerStackSize(java.lang.String stackName)
stackName
- the name of the controller stack or null if default stack is considered
public LyViewController getStackLastController(java.lang.String stackName)
stackName
- the name of the controller stack or null if default stack is considered
public LyViewController getLastViewController()
public LyViewController getLastViewController(int steps)
steps
- the number of steps used to retrieve desired view controller. For example,
getLastViewController(0) will return the view controller that was last shown,
getLastViewController(1) will return the view controller that was shown
before this one, etc.
public void addOutlineController(LyOutlineController controller)
controller
- An outline controller for this session.public void createStickerWindow(LyController parent, LyCreateStickerController stickerController, LySticker sticker)
parent
- the parent controller whose view will get the sticker component.stickerController
- the create sticker controller.sticker
- the sticker definition.public void removeOutlineController(LyOutlineController controller)
controller
- the outline controller to remove.public void notifyOutline(LyAreaController controller)
controller
- The area controller where the selection has changed.public void guiStart()
guiStart
in interface LyGuiClientInterface
public void guiStop()
guiStop
in interface LyGuiClientInterface
public final boolean isIdle()
public void setIdle(boolean idle)
idle
- true to freeze the session, false to unfreezepublic final boolean isChatting()
public void setChatting(boolean chat)
chat
- the new chat status.public void reset()
public void addResetListener(LyResetInterface listener)
listener
- Listener to call on reset.public void removeResetListener(LyResetInterface listener)
listener
- Listener removed from reset listeners list.public void setPluginId(java.lang.String pluginId)
setPluginId
in class LyDataSession
pluginId
- The plugin id.public java.lang.String getPluginId()
getPluginId
in class LyDataSession
public void setLanguage(java.lang.String language)
language
- The new language.LyEnvironment.setLanguage(String)
public void setSkin(java.lang.String skin)
skin
- The new skin.LyEnvironment.setSkin(String)
public void setMasterSession(LySession masterSession)
masterSession
- the master session of this sessionpublic LySession getMasterSession()
public java.util.Vector<LySession> getSlaveSessions()
public LyController getRootContextController()
public java.lang.String toString()
toString
in class java.lang.Object
public void resetUndoRedo()
resetUndoRedo
in class LyDataSession
public LyViewManager getViewManager()
public LyViewManager getViewManager(boolean mobile)
mobile
- : if the request comes from a mobile
public LyInfoList<?> loadUserPreferences()
public LyInfoList<?> loadUserStickers()
public java.lang.String storeTempFile(java.lang.String path, java.lang.String name)
path
- the path of the filename
- the name of the file
getTempFile(String)
public java.lang.String[] getTempFile(java.lang.String id)
id
- the id of a file
storeTempFile(String, String)
public boolean login(java.lang.String login, java.lang.String password, java.lang.String loginParameters)
login
- User login.password
- User password.loginParameters
- Parameters string formated like param1=value1;param2=value2;....
public boolean login(java.lang.String login, java.lang.String password, java.util.HashMap<java.lang.String,java.lang.String> values)
login
- User login.password
- User password.values
- Extra values if needed.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |