Package se.conciliate.extensions.merge
Interface MTMerger
public interface MTMerger
Provides merge functionality for MT entities.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptioncompareHistories(MTHistory existingHistory, MTHistory newHistory) Compares two histories to determine what to do with them when importing.<T> MergeDifferences<T>getDifferences(Class<T> type, T existingEntity, T newEntity, Collection<MTLanguage> languages) Returns the differences between two entities.showMergeUI(Window parent, Class<T> type, MergeDifferences<T> differences) Shows an UI to the user for merging two entities.
-
Method Details
-
compareHistories
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
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.
-