| 
 | WebObjects 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--com.webobjects.eoapplication.EOController
        |
        +--com.webobjects.eoapplication.EOApplication
Java Client applications typically execute from the command line (often referred to as a "Java application") or as an applet running in a browser. EOApplication insulates the developer from this distinction by serving as an execution-mode-independent repository for application-level client-side logic. The provided JApplet subclass EOApplet simply invokes EOApplication with the HTML arguments as parameters.
Each application has a window observer which keeps track of all of the windows in the application, which window is active,
 and whether all windows have been closed. The window observer has two notifications:
 ActiveWindowChangedNotification and LastWindowClosedNotification, which the
 finishInitialization method binds to the activeWindowDidChange and
 lastWindowDidClose methods, respectively.
Each application also has a defaults manager, an EODefaults object, which maintains two dictionaries for application
 defaults: a transient dictionary whose values are forgotten when the application exits, and a persistent dictionary
 whose values are stored on the server. The defaults manager implements valueForKey to read the defaults and
 setPersistentValueForKey and setTransientValueForKey to store the defaults.
| Inner classes inherited from class com.webobjects.eoapplication.EOController | 
| EOController.Enumeration | 
| Inner classes inherited from class com.webobjects.foundation.NSKeyValueCoding | 
| NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor | 
| Inner classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions | 
| NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility | 
| Field Summary | |
| static String | ApplicationDidStartThe name of the notification sent when the application did finish the launch sequence. | 
| static String | ApplicationWillQuitThe name of the notification sent when the application is about to quit. | 
| Fields inherited from class com.webobjects.eoapplication.EOController | 
| ControllerAndSubcontrollersEnumeration, SubcontrollersEnumeration, SupercontrollersEnumeration | 
| Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding | 
| NullValue | 
| Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions | 
| KeyPathSeparator | 
| Constructor Summary | |
| EOApplication()Creates a new EOApplication object. | |
| Method Summary | |
|  void | activatePreviousWindow()Activates the previously active window. | 
|  void | activeWindowDidChange(NSNotification notification)This method is invoked when the user changes the active window in the receiver (usually by clicking in an inactive window). | 
|  NSDictionary | arguments()Returns all of the application's arguments in a dictionary. | 
|  boolean | canPerformActionNamed(String actionName)Overridden to handle application specific action enabling and disabling. | 
|  boolean | canQuit()Returns whether or not the application can quit (shows a Quit menu item). | 
|  void | collectChangesFromServer()Updates the client application's enterprise objects to reflect the changes sent to the server from other client applications. | 
| protected  NSArray | defaultActions()Returns an NSArray containing the actions (EOAction objects) for the application. | 
|  EODefaults | defaults()Returns the receiver's defaults manager (an EODefaults object). | 
|  void | dispose()Prepares the receiver so it is disposed when Java performs garbage collection. | 
|  NSArray | documents()Returns an array containing the application's visible documents (EODocument objects). | 
|  NSArray | documentsForGlobalID(EOGlobalID globalID,
                     String entityName)Returns an array containing the application's documents (EODocument objects) that edit enterprise objects with an entity name matching entityNameand a global ID matchingglobalID. | 
|  NSArray | editedDocuments()Returns an NSArray containing the application's documents (EODocument objects) that are edited (and not saved). | 
| protected  void | finishInitialization()This method is invoked after the final event thread is guaranteed to be running. | 
|  boolean | hasEditedDocuments()Returns whether any of the application's documents are edited (and not saved). | 
|  NSArray | languages()Returns an array containing the language names (Strings) for which the application is localized. | 
|  void | lastWindowDidClose(NSNotification notification)This method is invoked when the user closes the last window in the application. | 
| static void | main(String[] argv) | 
|  void | quit()Causes the receiver to quit (provided canQuit is true). | 
|  boolean | quitsOnLastWindowClose()Returns whether or not the receiver quits when the user closes all of its windows. | 
|  boolean | saveAll()Attempts to save all of the receiver's edited documents. | 
|  void | sessionDidTimeOut()Invoked if the application receives a session time out error while trying to communicate with the server. | 
|  void | setCanQuit(boolean flag)Sets whether or not the application can quit (shows a Quit menu item). | 
|  void | setQuitsOnLastWindowClose(boolean flag)Sets whether or not the receiver quits when the user closes all of its windows. | 
|  void | setWindowObserver(EOWindowObserver windowObserver)Sets the application's window observer to EOWindowObserver. | 
| static EOApplication | sharedApplication()Returns the shared EOApplication instance initialized in the startApplication method. | 
| static EOApplication | startApplication(NSDictionary parameters,
                 EOComponentController initialTopComponentController,
                 boolean remoteRequestArguments)This method is the primary entry point for starting a Java Client application. | 
|  String | toString()Returns the receiver as a string describing the state of the application. | 
|  EOWindowObserver | windowObserver()Returns the application's window observer. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public static final String ApplicationDidStart
public static final String ApplicationWillQuit
| Constructor Detail | 
public EOApplication()
| Method Detail | 
public void activatePreviousWindow()
public void activeWindowDidChange(NSNotification notification)
notification - the window observer notificationpublic NSDictionary arguments()
public boolean canPerformActionNamed(String actionName)
canPerformActionNamed in class EOControlleractionName - the action method nametrue if the action should be enabled; false otherwiseEOAction.Enablingpublic boolean canQuit()
true if the application is run as a desktop application
 and false if it runs as an applet.true if the application can quit; false otherwisepublic void collectChangesFromServer()
protected NSArray defaultActions()
defaultActions in class EOControllerpublic EODefaults defaults()
null until the user has authenticated.public void dispose()
dispose in class EOControllerpublic NSArray documents()
public NSArray documentsForGlobalID(EOGlobalID globalID,
                                    String entityName)
entityName and a global ID matching globalID.globalID - the global ID for the documentsentityName - the entity name for the documentspublic NSArray editedDocuments()
protected void finishInitialization()
public boolean hasEditedDocuments()
false.true if the application has edited documents; false otherwisepublic NSArray languages()
public void lastWindowDidClose(NSNotification notification)
notification - the window observer notificationquitsOnLastWindowClose()public static void main(String[] argv)
public void quit()
canQuit()public boolean quitsOnLastWindowClose()
true.true if the application quits if the user closes all windows; false otherwisepublic boolean saveAll()
true if the save was successful; false otherwisepublic void sessionDidTimeOut()
public void setCanQuit(boolean flag)
flag - true if the application can quit; false otherwisepublic void setQuitsOnLastWindowClose(boolean flag)
flag - true if the application quits if the user closes all windows; false otherwisepublic void setWindowObserver(EOWindowObserver windowObserver)
windowObserver - the window observerpublic static EOApplication sharedApplication()
public static EOApplication startApplication(NSDictionary parameters,
                                             EOComponentController initialTopComponentController,
                                             boolean remoteRequestArguments)
This method is the primary entry point for starting a Java Client application.
 Together with the finishInitialization method it performs the
 complete startup sequence (connect to the server, warm up the user interface,
 determine languages, etc.)
The parameters dictionary contains all client parameters known at the time this method is invoked. For applets, these are all values of the WOJavaClientApplet bindings on the server side, passed in the HTML. For applications, these are all command line arguments.
The initialTopComponentController parameter can specify an EOComponentController in the
 controller hierarchy which becomes the parent controller for the intial
 EOInterfaceController if one is specified. For applets, this controller is an EOAppletController.
 For desktop applications, this is null, which causes a new EOFrameController to be
 instantiated and used as the top-most EOComponentController.
parameters - the parameters for the applicationinitialTopComponentController - the parent component controller for initial interface controllersremoteRequestArguments - flag whether WOJavaClientApplet bindings should be requested explicitlypublic String toString()
toString in class EOControllerpublic EOWindowObserver windowObserver()
| 
 | Last updated Thu Jan 10 18:10:21 PST 2002. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||