Project Wonder 2.0

er.extensions
Class ERXExtensions.Observer

java.lang.Object
  extended byer.extensions.ERXExtensions.Observer
Enclosing class:
ERXExtensions

public static class ERXExtensions.Observer
extends Object

This public observer is used to perform basic functions in response to notifications. Specifically it handles configuring the adapator context so that SQL debugging can be enabled and disabled on the fly throgh the log4j system. Handling cleanup issues when sessions timeout, i.e. releasing all references to editing contexts created for that session. Handling call all of the did* methods on ERXGenericRecord subclasses after an editing context has been saved. This delegate is also responsible for configuring the ERXCompilerProxy and ERXValidationFactory. This delegate is configured when this framework is loaded.


Constructor Summary
ERXExtensions.Observer()
           
 
Method Summary
 void configureAdaptorContext(NSNotification n)
          This method is called everytime the configuration file is changed.
 void didSave(NSNotification n)
          This method is called everytime an editingcontext is saved.
 void editingContextDidCreate(NSNotification n)
          This is needed for WO pre-5.2 when ec's were not retained by their eos.
 void finishedLaunchingApp(NSNotification n)
          This method is called when the application has finished launching.
 void sessionDidTimeOut(NSNotification n)
          This method is called every time a session times out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXExtensions.Observer

public ERXExtensions.Observer()
Method Detail

configureAdaptorContext

public void configureAdaptorContext(NSNotification n)
This method is called everytime the configuration file is changed. This allows for turning SQL debuging on and off at runtime.

Parameters:
n - notification posted when the configuration file changes.

didSave

public void didSave(NSNotification n)
This method is called everytime an editingcontext is saved. This allows us to call all of the didInsert, didUpdate and didSave methods on the enterprise objects after the transaction is complete.

Parameters:
n - notification that contains the array of inserted, updated and deleted objects.

finishedLaunchingApp

public void finishedLaunchingApp(NSNotification n)
This method is called when the application has finished launching. Here is where log4j is configured for rapid turn around, the compiler proxy is initialized and the validation template system is configured.

Parameters:
n - notification posted when the app is done launching

sessionDidTimeOut

public void sessionDidTimeOut(NSNotification n)
This method is called every time a session times out. It allows us to release references to all the editing contexts that were created when that particular session was active. Not used in WO 5.2+

Parameters:
n - notification that contains the session ID.

editingContextDidCreate

public void editingContextDidCreate(NSNotification n)
This is needed for WO pre-5.2 when ec's were not retained by their eos. Not called in 5.2+ systems.

Parameters:
n - notification posted when an ec is created

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.