Interface ImportExportHandler<T>


public interface ImportExportHandler<T>
  • Method Details

    • onExport

      boolean onExport(XMLSerializer serializer, 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

      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.