Interface MTMerger


public interface MTMerger
Provides merge functionality for MT entities.
  • Method Details

    • compareHistories

      MTMerger.CompareResult compareHistories(MTHistory existingHistory, MTHistory newHistory)
      Compares two histories to determine what to do with them when importing.
      Parameters:
      existingHistory - The history of the existing entity (in the repository)
      newHistory - The history of the other entity (to merge with)
      Returns:
      The result of the comparison.
    • getDifferences

      <T> MergeDifferences<T> getDifferences(Class<T> type, T existingEntity, T newEntity, Collection<MTLanguage> languages)
      Returns the differences between two entities.
      Type Parameters:
      T - The type of the entity.
      Parameters:
      type - The entity class.
      existingEntity - The existing entity (in the repository).
      newEntity - The other entity (to merge with).
      languages - The languages to generate differences for.
      Returns:
      The differences between the entities.
    • showMergeUI

      <T> MTMerger.MergeResult showMergeUI(Window parent, Class<T> type, MergeDifferences<T> differences)
      Shows an UI to the user for merging two entities.
      Type Parameters:
      T - The type of the class.
      Parameters:
      parent - A parent window for the UI.
      type - The entity type.
      differences - The differences between the entities.
      Returns:
      The result of the graphical merge.