LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.behaviorinterface
Interface LyDataSessionBehaviorInterface

All Known Subinterfaces:
LySessionBehaviorInterface
All Known Implementing Classes:
LyDataSessionBehavior, LySessionBehavior

public interface LyDataSessionBehaviorInterface

This interface defines the methods to implement in order to change the default behavior of a session.

See Also:
LyDataSession

Field Summary
static java.lang.String __VERSION
          File version
 
Method Summary
 void close(LyDataSession session)
          Method called when a session is closed.
 void connectionLost(LyDataSession session, LyInfo server)
          Method called when a connection with a server (LyLocation or LyNotifier) is lost.
 short controlBeforeCommit(LyDataSession session, java.util.Collection<LyObject> objects)
          Method called when a context needs to control objects before commit.
 void free()
          Free this behavior.
 LyUnit getDefaultUnitForField(LyDataSession session, LyFieldInfo fieldInfo)
          Get the reference unit for the given field for the current session
 java.lang.Object getKeyValue(java.lang.String key)
          Retrieves a value from a registered key.
 LyObject getUser(LyDataSession session)
          Gets user of this session.
 void handleException(LyDataSession session, java.lang.Throwable t)
          Method called when an exception occured during the session proccessing.
 void start(LyDataSession session)
          Method called when a session is started.
 void updateUndoRedo(LyDataSession session)
          Method called when the undo/redo status has changed.
 

Field Detail

__VERSION

static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Method Detail

start

void start(LyDataSession session)
Method called when a session is started.

Parameters:
session - the started session.

getUser

LyObject getUser(LyDataSession session)
Gets user of this session.

Parameters:
session - Current session.
Returns:
The object representing current user of the session.

close

void close(LyDataSession session)
Method called when a session is closed.

Parameters:
session - the closed session.

handleException

void handleException(LyDataSession session,
                     java.lang.Throwable t)
Method called when an exception occured during the session proccessing.

Parameters:
session - the current session
t - The throwable instance that stopped the processing.

controlBeforeCommit

short controlBeforeCommit(LyDataSession session,
                          java.util.Collection<LyObject> objects)
Method called when a context needs to control objects before commit.
Result should be one of the following level:

Parameters:
session - the current session
objects - the objects to control.
Returns:
Result of calling controls.

free

void free()
Free this behavior.
This method is provided to allow behavior to unregister itself from object sources or workspaces if needed.
It should be called only by the controller that built this behavior.


updateUndoRedo

void updateUndoRedo(LyDataSession session)
Method called when the undo/redo status has changed.
The status is available on the context manager of the application.

Parameters:
session - the current session.
See Also:
LyContextManager.isUndoAvailable(), LyContextManager.isRedoAvailable()

connectionLost

void connectionLost(LyDataSession session,
                    LyInfo server)
Method called when a connection with a server (LyLocation or LyNotifier) is lost.

Parameters:
session - Current session.
server - Logical server definition

getKeyValue

java.lang.Object getKeyValue(java.lang.String key)
Retrieves a value from a registered key.

Parameters:
key - The key that must be used.
Returns:
The value stored with the key or null if the key is not registered.

getDefaultUnitForField

LyUnit getDefaultUnitForField(LyDataSession session,
                              LyFieldInfo fieldInfo)
Get the reference unit for the given field for the current session

Parameters:
session - Current session
fieldInfo - a field
Returns:
a reference unit. Can be null.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com