Interface MTImportCallback


public interface MTImportCallback
Callback when performing a "silent" MT import.
  • Method Details

    • entityCreated

      default <T> void entityCreated(Class<T> type, T entity)
      An entity was created.
      Type Parameters:
      T - The type of the entity.
      Parameters:
      type - The class of the entity.
      entity - The entity.
    • update

      void update(String message, boolean indeterminate, int percent)
      Callback used during the import. This can be used to update a progress bar.
      Parameters:
      message - The message to show for the current state.
      indeterminate - true if the current step is indeterminate, in which case percent should be ignored.
      percent - The percentage complete of the current step.
    • conflict

      <T> MTMerger.MergeResult conflict(MTMerger merger, Class<T> type, MergeDifferences<T> differences)
      A conflict was encountered. The caller may choose one of the following
      1. return MergeResult.ABORTED to abort the import at this stage.
      2. return MergeResult.SKIPPED to skip this entity.
      3. merge the differences manually and return MergeResult.MERGED to merge the entity.
      4. return the result of merger.showMergeUI to show the merge UI and let the user decide what to do.
      Type Parameters:
      T - The type.
      Parameters:
      merger - The merger.
      type - The class.
      differences - The differences.
      Returns:
      A merge result.