PATH |
Inherits from: EOController : Object
Package: com.webobjects.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.
EOApplication is used in Java Client application only; there is no equivalent class on the server side.
XML Tag | Default Rule System Controller Type |
None | None |
Constant | Description |
ApplicationDidStart | Description forthcoming. |
ApplicationWillQuit | Description forthcoming. |
NSDisposable dispose EOKeyValueCodingAdditions (com.webobjects.eocontrol) EOAction.Enabling canPerformActionNamed EOKeyValueCoding (com.webobjects.eocontrol inherited from EOKeyValueCodingAdditions) NSKeyValueCoding (inherited from EOKeyValueCoding)
Accessing the shared instance sharedApplication Entering the application main startApplication Initializing and terminating the application canQuit finishInitialization quitsOnLastWindowClose setCanQuit setQuitsOnLastWindowClose Managing the application arguments defaults languages Managing documents documents documentsForGlobalID editedDocuments hasEditedDocuments Managing the window observer activeWindowDidChange lastWindowDidClose setWindowObserver windowObserver Methods inherited from Object toString Performing main menu operations activatePreviousWindow collectChangesFromServer defaultActions saveAll quit
public EOApplication()
public static void main(String[] args[])
-key1 value1 -key2 value2 ...
), which are stored in a parameter dictionary (NSDictionary). The user must specify an application URL (using the -applicationURL <application URL>
argument), the name of a distribution channel class (using the -channelClassName <channel class name>
argument), or both depending on the specific distribution channel. If the user specifies the application URL, he can optionally specify any initial entry page other than Main. After instantiating an EODistributionChannel on the basis of these two parameters, main simply invokes startApplication
.
public static EOApplication sharedApplication()
public static EOApplication startApplication( NSDictionary parameterDictionary, EOComponentController initialTopComponentController, boolean remoteRequestArguments)
true
, which triggers startApplication to read additional parameters from the applet at the URL specified on the command line. If the application is started in an applet, all parameters are contained in the HTML. The initialTopComponentController parameter specifies the top-most EOComponentController in the controller hierarchy. For applets, this controller is an EOAppletController. For command line applications, the main method sets initialTopComponentController to null
, which causes a new EOFrameController to be instantiated and used as the top-most EOComponentController.
public void activatePreviousWindow()
public void activeWindowDidChange(NSNotification aNSNotification)
public NSDictionary arguments()
public boolean canPerformActionNamed(String actionName)
activatePreviousWindow
action and the first window is active.
public boolean canQuit()
true
if the application is run from the command line and false
if it is started in an applet.
public void collectChangesFromServer()
protected NSArray defaultActions()
public EODefaults defaults()
null
until the user logs in.
public void dispose()
public NSArray documents()
public NSArray documentsForGlobalID( com.webobjects.eocontrol.EOGlobalID globalID, String entityName)
public NSArray editedDocuments()
protected void finishInitialization()
public boolean hasEditedDocuments()
true
if any of the receiver's documents has been edited. Otherwise returns false
.
public NSArray languages()
English
.
public void lastWindowDidClose(NSNotification aNSNotification)
See Also: quitsOnLastWindowClose
public void quit()
canQuit
is true
).
See Also: canQuit
public boolean quitsOnLastWindowClose()
true
.
public boolean saveAll()
true
if it succeeds.
public void sessionDidTimeOut()
public void setCanQuit(boolean flag)
public void setQuitsOnLastWindowClose(boolean flag)
public void setWindowObserver(EOWindowObserver anEOWindowObserver)
public String toString()
canQuit
and quitsOnLastWindowClose
flags.
public EOWindowObserver windowObserver()
© 2001 Apple Computer, Inc. (Last Published April 14, 2001)