WebObjects 5.4.2

com.webobjects.eoapplication
Interface EODocument

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

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

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

setEdited

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

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

isEdited

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

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

save

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:
EODocument.saveIfUserConfirms(String, String)

saveIfUserConfirms

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:
EODocument.save()

Last updated June 2008

Copyright © 2000-2008 Apple Inc.