Interface ImportExportHandler<T>


  • public interface ImportExportHandler<T>
    • Method Detail

      • onExport

        boolean onExport​(XMLSerializer serializer,
                         java.util.List<T> objects)
        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

        void onBeforeImport​(XMLDeserializer deserializer)
        Called before deserialization starts.
      • onImportDone

        void onImportDone​(DeserializationContext context)
        Called after an imported file has been deserialized
      • getExtension

        java.lang.String getExtension()
        The file extension, like "txt" or "pkg"
      • getFileDescription

        java.lang.String getFileDescription()
        A resource key for the description for the filetype, like "Exported Windows"
      • getObjectSelectionInstructions

        java.lang.String getObjectSelectionInstructions()
        A resource key for the instructions for the object selection stage. Optional.
      • getFileSelectionInstructions

        java.lang.String getFileSelectionInstructions()
        A resource key for the instructions for the file selection stage. Optional.
      • getObjectSelectionWarning

        java.lang.String getObjectSelectionWarning()
        A resource key for a warning to be displayed during the object selection stage. Optional.
      • getItemName

        java.lang.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.