public abstract class UnsavedData extends java.lang.Object implements IUnsavedData
Constructor and Description |
---|
UnsavedData(IExtension extension)
Creates a new UnsavedData object which will be associated to
the provided extension.
|
Modifier and Type | Method and Description |
---|---|
abstract 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.
|
abstract java.lang.String |
getResourceName()
Gets the resource name of this unsaved data.
|
abstract boolean |
saveData()
Save the existing changes for this resource (for example, save the layer
to disk or to the database, etc).
|
public UnsavedData(IExtension extension)
extension
- public abstract java.lang.String getDescription()
IUnsavedData
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:
getDescription
in interface IUnsavedData
public IExtension getExtension()
IUnsavedData
getExtension
in interface IUnsavedData
public java.lang.String getIcon()
IUnsavedData
getIcon
in interface IUnsavedData
public abstract java.lang.String getResourceName()
IUnsavedData
getResourceName
in interface IUnsavedData
public abstract boolean saveData()
IUnsavedData
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()
.
saveData
in interface IUnsavedData