|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.uicli.binding.JUApplication
The application class that manages connection to a BC4J Application Module. The JUApplication class provides:
ApplicationModule
,
Transaction
,
JUTransactionStateListener
,
JUErrorHandler
Field Summary |
Type | Field |
---|---|
protected java.util.ArrayList |
mStatusBarList
JUStatusBarInterface objects that are notified with status bar messages. |
protected java.util.ArrayList |
mTxnListeners
JUTransactionStateListener objects that are notified of commit or rollback events when generated from BC4J Application Module |
Constructor Summary |
JUApplication()
|
JUApplication(ApplicationModule am)
Constructor used internally by the framework to associate an application module with a JClient application object. |
JUApplication(java.util.Hashtable context,
java.lang.String rootAMDefName,
java.lang.Object userData)
Constructs a root JUApplication object that connects to a BC4J Application Module of the given name. |
JUApplication(JUApplication parent,
ApplicationModule am,
java.lang.Object userData)
Constructor to be used to create a nested JUApplication inside another JUApplication object. |
Method Summary |
Type | Method |
---|---|
void |
addFormBinding(JUFormBinding formBnd)
Register the given form binding object with this application. |
void |
addFormBinding(java.lang.String name,
JUFormBinding formBnd)
Register the given form binding object with this application with the given name. |
void |
addStatusBarInterface(JUStatusBarInterface statusBar)
Add the given status bar object to this application's list. |
void |
addTransactionStateListener(JUTransactionStateListener statusBar)
Adds listeners like StatusBar and NavigationBars that have to listen and react to transaction's modified state. |
void |
commitTransaction()
Helper method that invokes beforeSaveTransaction event on all JUPanelBinding objects and then invokes the BC4J transaction's commit() method to save all changes to the database. |
JUFormBinding |
createFormBinding(java.lang.String name,
java.lang.String formDefName,
boolean initialize)
*** For internal framework use only *** |
void |
createRootApplicationModule()
*** Advanced method *** |
void |
displayStatus(JUIteratorBinding iterBinding,
java.lang.String msgId,
java.lang.Object[] params)
Send the given message Id and parameter list along with the current iterator binding object to all status bar instances registered with this Application. |
void |
displayStatus(java.lang.String msg)
Send the given message to all status bar interface objects registered with this application. |
void |
doneCommit(TransactionStateEvent event)
Implementation of oracle.jbo.TransactionStateListener interface. |
void |
doneRollback(TransactionStateEvent event)
Implementation of oracle.jbo.TransactionStateListener interface. |
JUFormBinding |
findFormBinding(java.lang.String name)
Return the JUFormBinding instance registered with this JUAppication with the given name. |
void |
focusGained(JUIteratorBinding iterBinding,
JUControlBinding binding,
int attrIndex)
*** For internal framework use only *** This method is used by the framework to display currency information in the status bars. |
ApplicationModule |
getApplicationModule()
Returns the associated oracle.jbo.ApplicationModule object |
java.util.Hashtable |
getContext()
Returns the context object with which the root JUApplication was created. |
java.util.Properties |
getDBConnectionProps()
*** For internal framework use only *** |
java.lang.String |
getDBConnectionURL()
*** For internal framework use only *** |
JUApplicationDefImpl |
getDef()
*** For internal framework use only *** |
JUErrorHandler |
getErrorHandler()
Returns the JUErrorHandler registered with the root JUApplication. |
boolean |
getErrorHandlerActive()
Returns the error-handler active state of the root JUApplication object. |
java.lang.String |
getName()
*** For internal framework use only *** Returns the instance name of this JUApplication object. |
java.lang.String |
getPackageName()
*** For internal framework use only *** |
JUApplication |
getParent()
Returns the container JUApplication object if any. |
java.lang.String |
getRootAMDefName()
Returns root JUApplication's ApplicationModule definition name. |
JUApplication |
getRootApplication()
Returns the root JUApplication object. |
java.lang.Object |
getUserData()
*** For internal framework use only *** |
void |
initialize()
*** Advanced method *** |
void |
initializeFormFromDef(java.lang.String name)
*** For internal framework use only *** |
boolean |
isRoot()
Returns true if this JUApplication is the root JUApplication. |
boolean |
isTransactionModified()
Returns true if this JUApplication has modified attribute values. |
void |
removeFormBinding(JUFormBinding formBnd)
Remove the JUFormBinding object of the given name (if any). |
void |
removeStatusBarInterface(JUStatusBarInterface statusBar)
Remove the given instance of status bar interface if found. |
void |
removeTransactionStateListener(JUTransactionStateListener statusBar)
Remove the given object from JUTransactionStateListener list. |
void |
reportException(JUFormBinding formBnd,
java.lang.Exception ex)
This method is used by all framework binding objects to report exceptions. |
void |
rollbackTransaction()
Helper method that invokes rollback on the current Transaction. |
void |
setConnectionInfo(java.lang.String dbConnectionURL,
java.util.Properties dbConnectionProps)
*** For internal framework use only *** |
void |
setDef(JUApplicationDefImpl appDef)
*** For internal framework use only *** |
void |
setErrorHandler(JUErrorHandler errHandler)
Registers a JUErrorHandler with the root JUApplication. |
void |
setErrorHandlerActive(boolean b)
*** Advanced method *** |
void |
setName(java.lang.String name)
*** For internal framework use only *** |
void |
setPackageName(java.lang.String packageName)
*** For internal framework use only *** |
void |
setTransactionModified()
If this transaction is not in modified state, this method sets it to a modified state. |
void |
transactionStateChanged(boolean state)
Use this method to notify all transaction state change listeners of the change |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.ArrayList mStatusBarList
protected java.util.ArrayList mTxnListeners
Constructor Detail |
public JUApplication()
public JUApplication(java.util.Hashtable context, java.lang.String rootAMDefName, java.lang.Object userData)
context
- Context to pass on to the BC4J Application Module on creation.rootAMDefName
- Name that identifies the root BC4J Application Module.userData
- Data to store with the JUApplication
object.public JUApplication(ApplicationModule am)
public JUApplication(JUApplication parent, ApplicationModule am, java.lang.Object userData)
Method Detail |
public final java.lang.String getName()
public final void setName(java.lang.String name)
Sets the instance name of this JUApplication Object
public final JUApplicationDefImpl getDef()
Returns the definition object for this JUApplication
public final void setDef(JUApplicationDefImpl appDef)
Sets the definition object of this JUApplication Object
public void initialize()
Creates a connection to the BC4J application module.
public final void reportException(JUFormBinding formBnd, java.lang.Exception ex)
If the error handler is set to active state, then this method calls the registered error handler's reportException method. Othewise, it simply throws the given exception as a JboException.
JUErrorHandler
,
JboException
public final JUErrorHandler getErrorHandler()
JUErrorHandlerDialog
public final void setErrorHandler(JUErrorHandler errHandler)
Note that errors are sent to the registered error handler only when the error handler state is marked active (which is true by default) using the setErrorHandlerActive method.
JUErrorHandler
,
JUErrorHandlerDialog
public final boolean getErrorHandlerActive()
public final void setErrorHandlerActive(boolean b)
Sets the error-handler active state of the root JUApplication object. This is used to control whether to throw an exception raised by the framework (which is used by automated regression tests to trap exceptions and log them). By default the state is set to true - meaning raise all exceptions via the registered error handler.
public final void createRootApplicationModule()
If this JUAppication is root, and the root's application module is not created, this method creates a root BC4J Application Module using the root application module def name and the context information (both passed to the constructor of the root JUApplication).
ApplicationModuleCreateException
- if the application module is not
created, perhaps due to an improper root application module name.ApplicationModule
,
ApplicationModuleHome.create()
public final java.util.Hashtable getContext()
public final java.lang.String getRootAMDefName()
public final java.lang.String getDBConnectionURL()
public final java.util.Properties getDBConnectionProps()
public final void setConnectionInfo(java.lang.String dbConnectionURL, java.util.Properties dbConnectionProps)
public final java.lang.String getPackageName()
public final void setPackageName(java.lang.String packageName)
public final ApplicationModule getApplicationModule()
public final boolean isRoot()
public final JUApplication getParent()
public final JUApplication getRootApplication()
public final java.lang.Object getUserData()
public final void removeFormBinding(JUFormBinding formBnd)
public final void addFormBinding(JUFormBinding formBnd)
public final void addFormBinding(java.lang.String name, JUFormBinding formBnd)
public final JUFormBinding findFormBinding(java.lang.String name)
public final JUFormBinding createFormBinding(java.lang.String name, java.lang.String formDefName, boolean initialize)
Create a JUFormBinding instance using the given name and form definition.
public final void initializeFormFromDef(java.lang.String name)
public final void addStatusBarInterface(JUStatusBarInterface statusBar)
public final void removeStatusBarInterface(JUStatusBarInterface statusBar)
public final void displayStatus(JUIteratorBinding iterBinding, java.lang.String msgId, java.lang.Object[] params)
public final void displayStatus(java.lang.String msg)
public final void focusGained(JUIteratorBinding iterBinding, JUControlBinding binding, int attrIndex)
public final void commitTransaction()
public final void rollbackTransaction()
public final boolean isTransactionModified()
public final void setTransactionModified()
public final void transactionStateChanged(boolean state)
public final void addTransactionStateListener(JUTransactionStateListener statusBar)
public final void removeTransactionStateListener(JUTransactionStateListener statusBar)
public final void doneCommit(TransactionStateEvent event)
doneCommit
in interface TransactionStateListener
event
- A description of the event.public final void doneRollback(TransactionStateEvent event)
doneRollback
in interface TransactionStateListener
event
- A description of the event.
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |