Interface ImportExportHandler<T>
public interface ImportExportHandler<T>
-
Method Summary
Modifier and TypeMethodDescriptionThe file extension, like "txt" or "pkg"A resource key for the description for the filetype, like "Exported Windows"A resource key for the instructions for the file selection stage.A resource key for a plural noun like "Windows" that describes the object to be exported.A resource key for the instructions for the object selection stage.A resource key for a warning to be displayed during the object selection stage.void
onBeforeImport
(XMLDeserializer deserializer) Called before deserialization starts.boolean
onExport
(XMLSerializer serializer, List<T> objects) Called after the selection of what to export has been made.void
onImportDone
(DeserializationContext context) Called after an imported file has been deserialized
-
Method Details
-
onExport
Called after the selection of what to export has been made. This function is responsible for actually adding the selected objects to the serializer.- Parameters:
serializer
- The XMLSerializer that will be used to serialize the objects.objects
- The objects that have been selected for export.- Returns:
- true if the export should continue, false if it should be aborted.
-
onBeforeImport
Called before deserialization starts. -
onImportDone
Called after an imported file has been deserialized -
getExtension
String getExtension()The file extension, like "txt" or "pkg" -
getFileDescription
String getFileDescription()A resource key for the description for the filetype, like "Exported Windows" -
getObjectSelectionInstructions
String getObjectSelectionInstructions()A resource key for the instructions for the object selection stage. Optional. -
getFileSelectionInstructions
String getFileSelectionInstructions()A resource key for the instructions for the file selection stage. Optional. -
getObjectSelectionWarning
String getObjectSelectionWarning()A resource key for a warning to be displayed during the object selection stage. Optional. -
getItemName
String getItemName()A resource key for a plural noun like "Windows" that describes the object to be exported. Will be used to generate instructions if they are omitted.
-