|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EbaseSystem
The EbaseSystem
interface provides access to a number of system services.
Method Summary | |
---|---|
java.lang.Object |
executeCustomFunction(java.lang.String functionName,
java.lang.Object[] parameters)
Executes a custom function. |
java.sql.Connection |
getDatabaseConnection(java.lang.String databaseConnectionName)
Returns a database connection. |
LockManager |
getLockManager()
Returns the lock manager object that supports locking/unlocking of in memory objects |
SystemPreferences |
getPreferences()
Returns the system preferences object. |
SecurityManager |
getSecurityManager()
Returns the security manager object that provides access to all security functions: logon(), logoff(), hasRole() etc. |
SequenceManager |
getSequenceManager()
Returns the sequence manager object that provides a new sequence number for a defined sequence. |
SnapshotManager |
getSnapshotManager()
Returns snapshot manager that allows the user to take a snapshot of the form state data |
java.lang.String |
getSystemName()
Returns the system name as configured in the Ufs.fileDirectoryName parameter of UFSSetup.properties . |
TransactionManager |
getTransactionManager()
Returns the transaction manager object that supports commit and rollback |
SystemVariables |
getVariables()
Returns the system variables object giving access to all system variables. |
Workflow |
getWorkflow()
Returns the workflow object, this provides access to all workflow functionality. |
Method Detail |
---|
java.lang.String getSystemName()
Ufs.fileDirectoryName
parameter of UFSSetup.properties
.
SystemPreferences getPreferences()
SystemVariables getVariables()
These system variables were originally intended to be used with the FPL programming language, but they can also be used by any programming language via this method. Please note that most of the functionality provided by system variables is available more easily via other methods on the API.
SecurityManager getSecurityManager()
Workflow getWorkflow()
TransactionManager getTransactionManager()
LockManager getLockManager()
SequenceManager getSequenceManager()
java.sql.Connection getDatabaseConnection(java.lang.String databaseConnectionName) throws com.ebasetech.xi.exceptions.FormRuntimeException
Note that code should be enclosed in a try
block, and that all database connections,
result sets, and statements must be closed in a finally
block, as shown in the example below.
Failure to do this correctly can lead to connection pool leaks and eventually a hung system.
Javascript example:
var con = system.getDatabaseConnection("CONN1"); var stmt; var rs; try { stmt = con.prepareStatement("select * from tab1"); rs = stmt.executeQuery(); while (rs.next()) { var xx = rs.getString("col_name"); } } finally { if (rs) rs.close(); if (stmt) stmt.close(); if (con) con.close(); }
databaseConnectionName
- the name of the Database Connection as configured in the Ebase Xi Designer
com.ebasetech.xi.exceptions.FormRuntimeException
- if the connection cannot be obtained for any reasonjava.lang.Object executeCustomFunction(java.lang.String functionName, java.lang.Object[] parameters) throws com.ebasetech.xi.exceptions.FormRuntimeException
Custom functions are Java classes that extend UFSCustomFunction
and have been added to the server
classpath. These were originally intended to be used with the FPL programming language, but they
can also be used by any programming language via this method. Please note that most of the
functionality provided by the custom functions installed with Ebase Xi is available more easily
via other methods on the API.
Javascript example:
var result = system.executeCustomFunction("getmessagetext", ["PR1", 1001, fields.CITY.value]);
functionName
- the name of the function (function names are always in lower case)parameters
- an array of input parameters for the function
String
or Double
com.ebasetech.xi.exceptions.FormRuntimeException
- when an exception is thrown by the custom functionSnapshotManager getSnapshotManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |