|
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.behavior.LyDataApplicationBehavior
public class LyDataApplicationBehavior
Default implementation of the LyApplicationBehavior. This implementation does nothing.
LyApplicationBehaviorInterface
,
LyApplication
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
static java.lang.String |
PREF_BLOB_COL
constant for blob column for saving preferences in a blob. |
static java.lang.String |
PREF_DATE_COL
constant for date column for saving preferences in a blob. |
static java.lang.String |
PREF_ID_COL
constant for id column for saving preferences in a blob. |
static java.lang.String |
PREF_TABLE
constant for table name for saving preferences in a blob. |
static java.lang.String |
PREF_TYPE_COL
constant for pref type column for saving preferences in a blob. |
static java.lang.String |
PREF_USER_COL
constant for userId column for saving preferences in a blob. |
Constructor Summary | |
---|---|
LyDataApplicationBehavior()
Constructor. |
Method Summary | |
---|---|
void |
addSpecificEncoders(LyApplication application,
LyDataProvider provider)
Adds specific encoders for new providers if needed. |
void |
afterCommit(LyApplication application,
java.lang.String idTransaction,
java.lang.String locationId)
Method called after a transaction has been comitted on a location. |
void |
afterRollback(LyApplication application,
java.lang.String idTransaction,
java.lang.String locationId)
Method called after a transaction has been rollbacked on a location. |
void |
beforeCommit(LyApplication application,
java.lang.String idTransaction,
java.lang.String locationId)
Method called before a transaction should be committed on a location. |
void |
beforeRollback(LyApplication application,
java.lang.String idTransaction,
java.lang.String locationId)
Method called before a transaction should be rollbacked on a location. |
void |
begin(LyApplication application,
java.lang.String idTransaction,
java.lang.String locationId)
Method called when a transaction begins on a location. |
void |
close(LyApplication application)
Method called when an application is closed. |
void |
connectionLost(LyApplication application,
LyInfo server)
Method called when a connection with a server ( LyLocation or
LyNotifier ) is lost. |
void |
createDaemons(LyApplication application)
Creates daemons to manage relations within an application. |
boolean |
deleteExtraInfo(LyApplication application,
LyExtraInfoInterface info)
Delete given extra info like preferences, charts or treemap configurations. |
boolean |
deleteExtraInfoFromDB(LyApplication application,
java.lang.String extraInfoId)
Delete given extra info like preferences, charts or treemap configurations from database. |
boolean |
enableLoadUnloadData(LyClassInfo classInfo)
Indicates whether data may be loaded / unloaded for given class info. |
void |
free()
Free this behavior. |
LyEventManager |
getEventManager(LyApplication application)
Get the event manager for the given application. |
LyInfoList<LyClassInfo> |
getLogicalClasses(LyApplication application,
LyObjectId objectId,
LyValueSet values)
Method used to find logical classes of a peer object identifier. |
double |
getNextDouble(LyApplication application,
LyClass objectClass)
Used to get an unique double value for the specified application. |
float |
getNextFloat(LyApplication application,
LyClass objectClass)
Used to get an unique float value for the specified application. |
int |
getNextInt(LyApplication application,
LyClass objectClass)
Used to get an unique int value for the specified application. |
long |
getNextLong(LyApplication application,
LyClass objectClass)
Used to get an unique long value for the specified application. |
short |
getNextShort(LyApplication application,
LyClass objectClass)
Used to get an unique short value for the specified application. |
int |
getPriorityLevel(LyApplication application,
LyObject object)
Gets the control priority level of the application. |
LyInfoList<LyClassInfo> |
getSubClasses(LyApplication application,
LyObjectId objectId,
LyValueSet values)
Method used by abstract classes to define which subclass has to be loaded. |
java.lang.String[][] |
getSupportedLanguages(LyApplication application)
Gets all languages that the given application supports. |
java.lang.String[] |
getSupportedTimeZones(LyApplication application)
Get all timezone supported by this application. |
void |
loadData(LyApplication application)
Method called when datas are loaded for an application. |
void |
loadData(LyApplication application,
LyInfoList<LyClassInfo> classes)
Load data for given classes. |
LyInfoList<LyInfo> |
loadExtraInfos(LyApplication application)
Load extra infos. |
java.util.Vector<LyExtraInfoInterface> |
loadExtraInfosFromDB(LyApplication application,
java.lang.String prefType,
java.lang.String userId)
Load extra info like preferences, charts, treemap configurations or form saves. |
LyInfoList<LyInfo> |
loadPreferences(LyApplication application)
Load application preferences. |
LyInfoList<LyInfo> |
parseExtraFromDB(LyApplication application,
java.lang.String prefType,
java.lang.String userId)
Method for parsing extra information such as charts or preferences. |
void |
saveData(LyApplication application)
Method called when datas are saved for an application. |
boolean |
saveExtraInfo(LyApplication application,
LyExtraInfoInterface info)
Save given extra info like preferences, charts or treemap configurations. |
boolean |
saveExtraInfo(LyApplication application,
LyExtraInfoInterface info,
LyXmlWriterInterface writer)
Save given extra info like preferences, charts or treemap configurations. |
void |
sessionAdded(LyApplication application,
LyDataSession session)
Method called when a session is added to the application. |
void |
sessionLoggedIn(LyApplication application,
LyDataSession session,
LyObject user)
Method called when a user logged in a session. |
void |
sessionRemoved(LyApplication application,
LyDataSession session)
Method called when a session is removed from the application. |
void |
sleep(LyApplication application)
Method called when an application falls in sleeping mode. |
boolean |
start(LyApplication application)
Method called when an application is starting. |
boolean |
started(LyApplication application)
Method called when an application is started. |
void |
transactionCompleted(LyApplication application,
java.util.Vector<java.lang.String> idTransactions,
java.util.Vector<java.lang.String> locationIds)
Method called after a transaction was successfully completed (commit and notification done). |
void |
unloadData(LyApplication application)
Method called when datas are unloaded for an application. |
void |
update(LyApplication application,
java.lang.String idTransaction,
java.lang.String locationId,
java.lang.String request)
Method called when a request is sent in a transaction for a location. |
void |
wakeUp(LyApplication application)
Method called when an application is awake from sleeping mode. |
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 java.lang.String PREF_TABLE
public static java.lang.String PREF_ID_COL
public static java.lang.String PREF_TYPE_COL
public static java.lang.String PREF_USER_COL
public static java.lang.String PREF_DATE_COL
public static java.lang.String PREF_BLOB_COL
Constructor Detail |
---|
public LyDataApplicationBehavior()
Method Detail |
---|
public boolean start(LyApplication application)
started(LyApplication)
to be notified
after generic staring process.
start
in interface LyApplicationBehaviorInterface
application
- Application that is starting.
started(LyApplication)
public boolean started(LyApplication application)
start(LyApplication)
to be notified before
generic staring process.
started
in interface LyApplicationBehaviorInterface
application
- Application that is started.
start(LyApplication)
public void createDaemons(LyApplication application)
createDaemons
in interface LyApplicationBehaviorInterface
application
- Current application.public LyInfoList<LyInfo> loadPreferences(LyApplication application)
loadPreferences
in interface LyApplicationBehaviorInterface
application
- Application on which preferences are loaded.
public LyInfoList<LyInfo> loadExtraInfos(LyApplication application)
loadExtraInfos
in interface LyApplicationBehaviorInterface
application
- Application on which extra infos (like charts or treemap
configurations) are loaded.
public void sessionAdded(LyApplication application, LyDataSession session)
sessionAdded
in interface LyApplicationBehaviorInterface
sessionAdded
in interface LySessionListenerInterface
application
- Application in which a session is added.session
- Session added to the application.public void sessionLoggedIn(LyApplication application, LyDataSession session, LyObject user)
sessionLoggedIn
in interface LySessionListenerInterface
application
- Application in which a session is added.session
- Session added to the application.user
- User that logged in.public void sessionRemoved(LyApplication application, LyDataSession session)
sessionRemoved
in interface LyApplicationBehaviorInterface
sessionRemoved
in interface LySessionListenerInterface
application
- Application in which a session is removed.session
- Session removed from the application.public void loadData(LyApplication application)
loadData
in interface LyApplicationBehaviorInterface
application
- Application for which datas are loaded.public void unloadData(LyApplication application)
unloadData
in interface LyApplicationBehaviorInterface
application
- Application for which datas are unloaded.public void saveData(LyApplication application)
saveData
in interface LyApplicationBehaviorInterface
application
- Application for which datas are saved.public void close(LyApplication application)
close
in interface LyApplicationBehaviorInterface
application
- Application that is closed.public void sleep(LyApplication application)
sleep
in interface LyApplicationBehaviorInterface
application
- Application for which datas are saved.public void wakeUp(LyApplication application)
wakeUp
in interface LyApplicationBehaviorInterface
application
- Application that is awake.public java.lang.String[][] getSupportedLanguages(LyApplication application)
getSupportedLanguages
in interface LyApplicationBehaviorInterface
application
- Application that is awake.
public java.lang.String[] getSupportedTimeZones(LyApplication application)
getSupportedTimeZones
in interface LyApplicationBehaviorInterface
application
- the current application
public void addSpecificEncoders(LyApplication application, LyDataProvider provider)
addSpecificEncoders
in interface LyApplicationBehaviorInterface
application
- Current application.provider
- provider which may need an encoderpublic void connectionLost(LyApplication application, LyInfo server)
LyLocation
or
LyNotifier
) is lost.
connectionLost
in interface LyApplicationBehaviorInterface
application
- Current application.server
- Logical server definitionpublic int getPriorityLevel(LyApplication application, LyObject object)
getPriorityLevel
in interface LyApplicationBehaviorInterface
application
- Current application.object
- the object on which the control is applied.
public void begin(LyApplication application, java.lang.String idTransaction, java.lang.String locationId)
debug level
is
LyEnvironment.DEBUG_TRANSACTION
.
begin
in interface LyApplicationBehaviorInterface
application
- Current applicationidTransaction
- Id of the begin transactionlocationId
- Id of the locationpublic void update(LyApplication application, java.lang.String idTransaction, java.lang.String locationId, java.lang.String request)
debug level
is
LyEnvironment.DEBUG_TRANSACTION
.
update
in interface LyApplicationBehaviorInterface
application
- Current applicationidTransaction
- Id of the transactionlocationId
- Id of the locationrequest
- Sent request if the request has a string representationpublic void beforeCommit(LyApplication application, java.lang.String idTransaction, java.lang.String locationId)
debug level
is
LyEnvironment.DEBUG_TRANSACTION
.
beforeCommit
in interface LyApplicationBehaviorInterface
application
- Current applicationidTransaction
- Id of the transactionlocationId
- Id of the locationpublic void afterCommit(LyApplication application, java.lang.String idTransaction, java.lang.String locationId)
debug level
is
LyEnvironment.DEBUG_TRANSACTION
.
afterCommit
in interface LyApplicationBehaviorInterface
application
- Current applicationidTransaction
- Id of the transactionlocationId
- Id of the locationpublic void beforeRollback(LyApplication application, java.lang.String idTransaction, java.lang.String locationId)
debug level
is
LyEnvironment.DEBUG_TRANSACTION
.
beforeRollback
in interface LyApplicationBehaviorInterface
application
- Current applicationidTransaction
- Id of the transactionlocationId
- Id of the locationpublic void afterRollback(LyApplication application, java.lang.String idTransaction, java.lang.String locationId)
debug level
is
LyEnvironment.DEBUG_TRANSACTION
.
afterRollback
in interface LyApplicationBehaviorInterface
application
- Current applicationidTransaction
- Id of the transactionlocationId
- Id of the locationpublic void transactionCompleted(LyApplication application, java.util.Vector<java.lang.String> idTransactions, java.util.Vector<java.lang.String> locationIds)
debug level
is
LyEnvironment.DEBUG_TRANSACTION
.
transactionCompleted
in interface LyApplicationBehaviorInterface
application
- the current applicationidTransactions
- List of involved transaction idslocationIds
- list of involved locations idspublic LyInfoList<LyClassInfo> getSubClasses(LyApplication application, LyObjectId objectId, LyValueSet values)
getSubClasses
in interface LyApplicationBehaviorInterface
application
- current application.objectId
- the object identifier to be loadedvalues
- optional additional values we might know about the object : this
parameter is usually null.
public LyInfoList<LyClassInfo> getLogicalClasses(LyApplication application, LyObjectId objectId, LyValueSet values)
getLogicalClasses
in interface LyApplicationBehaviorInterface
application
- current application.objectId
- an object identifier of a peer object (use
LyClassInfo.getObjectClass()
to get the peer class :
instance of LyClass
)values
- optional additional values we might know about the object : this
parameter is usually null.
public short getNextShort(LyApplication application, LyClass objectClass)
getNextShort
in interface LyApplicationBehaviorInterface
application
- current applicationobjectClass
- the class for which a new object is created.
public int getNextInt(LyApplication application, LyClass objectClass)
getNextInt
in interface LyApplicationBehaviorInterface
application
- current applicationobjectClass
- the class for which a new object is created.
public long getNextLong(LyApplication application, LyClass objectClass)
getNextLong
in interface LyApplicationBehaviorInterface
application
- current applicationobjectClass
- the class for which a new object is created.
public float getNextFloat(LyApplication application, LyClass objectClass)
getNextFloat
in interface LyApplicationBehaviorInterface
application
- current applicationobjectClass
- the class for which a new object is created.
public double getNextDouble(LyApplication application, LyClass objectClass)
getNextDouble
in interface LyApplicationBehaviorInterface
application
- current applicationobjectClass
- the class for which a new object is created.
public void free()
free
in interface LyApplicationBehaviorInterface
public void loadData(LyApplication application, LyInfoList<LyClassInfo> classes)
loadData
in interface LyApplicationBehaviorInterface
application
- Application for which classes are loaded.classes
- List of classes to load.LyApplication.loadData()
,
LyClassInfo
public boolean enableLoadUnloadData(LyClassInfo classInfo)
enableLoadUnloadData
in interface LyApplicationBehaviorInterface
classInfo
- class info for which data may be loaded / unloaded
public LyInfoList<LyInfo> parseExtraFromDB(LyApplication application, java.lang.String prefType, java.lang.String userId)
parseExtraFromDB
in interface LyApplicationBehaviorInterface
application
- Application for which classes are loaded.prefType
- identifies the preference type : "preference", "chart", "sticker" or
"treemap_configuration"userId
- User id (may be null when info is shared).
public boolean saveExtraInfo(LyApplication application, LyExtraInfoInterface info)
saveExtraInfo
in interface LyApplicationBehaviorInterface
application
- Application on which extra info is saved.info
- Info to be saved.
public boolean saveExtraInfo(LyApplication application, LyExtraInfoInterface info, LyXmlWriterInterface writer)
saveExtraInfo
in interface LyApplicationBehaviorInterface
application
- Application on which extra info is saved.info
- Info to be saved.writer
- Writer interface.
public java.util.Vector<LyExtraInfoInterface> loadExtraInfosFromDB(LyApplication application, java.lang.String prefType, java.lang.String userId)
loadExtraInfosFromDB
in interface LyApplicationBehaviorInterface
application
- Application on which extra info is saved.type
- Extra info type.id
- Id of saved info.
public boolean deleteExtraInfo(LyApplication application, LyExtraInfoInterface info)
deleteExtraInfo
in interface LyApplicationBehaviorInterface
application
- Application on which extra info is deleted.info
- Info to be deleted.
public boolean deleteExtraInfoFromDB(LyApplication application, java.lang.String extraInfoId)
application
- Application on which extra info is deleted.extraInfoId
- Id of the extra info to be deleted.
public LyEventManager getEventManager(LyApplication application)
getEventManager
in interface LyApplicationBehaviorInterface
application
- the current application
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |