Package org.gvsig.andami.plugins.status
Class UnsavedData
java.lang.Object
org.gvsig.andami.plugins.status.UnsavedData
- All Implemented Interfaces:
IUnsavedData
Abstract class implementing IUnsavedData. is a convenience
class used to allow easier modifications of IUnsaveData
interface.
- Author:
- Cesar Martinez Izquierdo invalid input: '<'cesar.martinez@iver.es>
-
Constructor Summary
ConstructorsConstructorDescriptionUnsavedData(IExtension extension) Creates a new UnsavedData object which will be associated to the provided extension. -
Method Summary
Modifier and TypeMethodDescriptionabstract StringGets a description of this unsaved data.Each IUnsavedData object is associated with one extension, which is in charge of this data.getIcon()Gets an icon suitable to represent this type of data.abstract StringGets the resource name of this unsaved data.abstract booleansaveData()Save the existing changes for this resource (for example, save the layer to disk or to the database, etc).
-
Constructor Details
-
UnsavedData
Creates a new UnsavedData object which will be associated to the provided extension.- Parameters:
extension-
-
-
Method Details
-
getDescription
Description copied from interface:IUnsavedDataGets 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:
- Modified SHP Layer
- Modified gvSIG project
- Specified by:
getDescriptionin interfaceIUnsavedData- Returns:
- A description for this unsaved data, probably containing the type of data and the kind of modification.
-
getExtension
Description copied from interface:IUnsavedDataEach IUnsavedData object is associated with one extension, which is in charge of this data. This method gets the extension associated with this object.- Specified by:
getExtensionin interfaceIUnsavedData- Returns:
- The extension associated with this IUnsavedData object.
-
getIcon
Description copied from interface:IUnsavedDataGets an icon suitable to represent this type of data.- Specified by:
getIconin interfaceIUnsavedData- Returns:
- An icon representing this type of data, or null if no icon is available
-
getResourceName
Description copied from interface:IUnsavedDataGets the resource name of this unsaved data. Normally, this will be a file path, but it may be different for certain type of unsaved data (for example, database connections).- Specified by:
getResourceNamein interfaceIUnsavedData- Returns:
- The resource name of this unsaved data
-
saveData
public abstract boolean saveData()Description copied from interface:IUnsavedDataSave 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().- Specified by:
saveDatain interfaceIUnsavedData- Returns:
- true if the data was correctly saved, false if it was not saved (there are many reasons for this: there was an error, the user cancelled the process, etc).
-