WebObjects 5.2.3

com.webobjects.eoapplication
Interface EODocument

All Known Subinterfaces:
EOControllerFactory.Insert, EOControllerFactory.Open, EOControllerFactory.SelectByInserting, EOObjectDisplayDocument
All Known Implementing Classes:
EODocumentController, EOFormController

public interface EODocument

EODocument is an interface that defines the behavior of a controller that displays and edits enterprise objects.


Method Summary
 boolean isDocumentForGlobalID(EOGlobalID globalID, String entityName)
          Returns whether the receiver is a document for the enterprise object associated with globalID and entityName.
 boolean isEdited()
          Returns the receiver's edited state.
 boolean save()
          Saves the receiver's edits, returning whether the operation was successful.
 boolean saveIfUserConfirms(String operationTitle, String message)
          If the receiver's enterprise object graph has been edited, opens an alert panel that allows the user to save the edits, discard the edits, or cancel the save operation.
 void setEdited(boolean flag)
          Sets the receiver's edited state.
 

Method Detail

isDocumentForGlobalID

public boolean isDocumentForGlobalID(EOGlobalID globalID,
                                     String entityName)
Returns whether the receiver is a document for the enterprise object associated with globalID and entityName. Typically implementations return true if the receiver's display group is displaying the specified enterprise object.

Parameters:
globalID - the EOGlobalID of the enterprise object
entityName - the name of the entity of the enterprise object
Returns:
true if the receiver's display group is displaying the specified enterprise object; false otherwise

isEdited

public boolean isEdited()
Returns the receiver's edited state.

Returns:
true if the controller is edited (and unsaved); false otherwise

save

public boolean save()
Saves the receiver's edits, returning whether the operation was successful. The user is not given a choice to cancel the save, the save is always executed.

Returns:
true if the save succeeded; false otherwise
See Also:
saveIfUserConfirms(String, String)

saveIfUserConfirms

public boolean saveIfUserConfirms(String operationTitle,
                                  String message)
If the receiver's enterprise object graph has been edited, opens an alert panel that allows the user to save the edits, discard the edits, or cancel the save operation. The operationTitle argument is used as the title of the alert panel, and message is used as the message in the panel. Returns whether the operation was successful or whether it failed or was cancelled.

Returns:
true if the save succeeded; false if the save failed or was cancelled by the user
See Also:
save()

setEdited

public void setEdited(boolean flag)
Sets the receiver's edited state.

Parameters:
flag - true if the controller is edited (and unsaved); false otherwise

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.