public interface IUnsavedData
This interface represents some unsaved data, associated to one extension. There are methods to get the associated extension, to get info about these data, to get the type of the data and a suitable icon for this type, and a method to save the data.
It is used during the Andami termination process, to construct the dialog of unsaved data, although it can be used at any time.
Normally, it should not be directly implemented, use the convenience UnsavedData class.
IExtensionStatus
,
UnsavedData
,
IExtension
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Gets a description of this unsaved data.
|
IExtension |
getExtension()
Each IUnsavedData object is associated with one extension, which is
in charge of this data.
|
java.lang.String |
getIcon()
Gets an icon suitable to represent this type of data.
|
java.lang.String |
getResourceName()
Gets the resource name of this unsaved data.
|
boolean |
saveData()
Save the existing changes for this resource (for example, save the layer
to disk or to the database, etc).
|
java.lang.String getResourceName()
java.lang.String getDescription()
Gets a description of this unsaved data. This would be combined with the resource name to show a coherent information to the user.
Examples of descriptions:
boolean saveData()
Save the existing changes for this resource (for example, save the layer
to disk or to the database, etc). The resource should not be closed at this
point (files, database connections, etc should no be closed), as they may
be still needed by other extensions. Resources should be closed at
IExtension.terminate()
.
IExtension getExtension()
java.lang.String getIcon()