public final class MergeUtils
extends java.lang.Object
Constructor and Description |
---|
MergeUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addMetadata(org.w3c.dom.Element element,
java.util.Map<java.lang.String,java.lang.String> metadata,
org.w3c.dom.Document document)
Adds the note element to the DOM document
|
static boolean |
checkIfTextOrNoteDiffers(ResourceBundleWrapper.KeyInfo initialMOTextNote,
ResourceBundleWrapper.KeyInfo moToCompareTextNote)
Checks if there is a conflict in text/note elements among two MO's
|
static ResourceBundleMergeResolver |
getResourceBundleMergeResolver()
Returns the ResourceBundle merge resolver
otherwise a new instance is returned with default mode set to Mainline wins.
|
static ResourceBundleWrapper.KeyInfo |
getTextAndNoteFromKey(java.lang.String conflictKey,
org.w3c.dom.Document document)
Gets the text and note object from the DOM using the trans-unit key
|
static java.lang.String |
getTextFromKey(java.lang.String conflictKey,
org.w3c.dom.Document document)
Gets the text object from the DOM using the trans-unit key
|
static java.lang.String |
getTypeOfDiff(ResourceBundleWrapper.KeyInfo SBMOToCompare,
ResourceBundleWrapper.KeyInfo MLMOToCompare)
Determines whether the conflict is due to updates of the same trans-unit key , or due to delete operation or addition.
|
static boolean |
isNoteConflict(java.util.Map<java.lang.String,java.lang.String> SBMOToCompareNote,
java.util.Map<java.lang.String,java.lang.String> MLMOToCompareNote)
Checks if there is a conflict in note element among two MO's
|
static boolean |
isResourceBundleMergeResolverSet()
Checks if the ResourceBundle merge resolver is set in ADfSessionOptions
|
static ResourceBundleMergeDiffDetails |
parse(org.w3c.dom.Document document,
java.lang.String moName,
java.lang.String moOrigin)
Parses the DOM and store the parsed result in ResourceBundleMergeDiffDetails object.
|
public static boolean checkIfTextOrNoteDiffers(ResourceBundleWrapper.KeyInfo initialMOTextNote, ResourceBundleWrapper.KeyInfo moToCompareTextNote)
initialMOTextNote
- - text/note object to be compared againstmoToCompareTextNote
- - text/note object to be comparedpublic static java.lang.String getTypeOfDiff(ResourceBundleWrapper.KeyInfo SBMOToCompare, ResourceBundleWrapper.KeyInfo MLMOToCompare)
SBMOToCompare
- - Sandbox MO text/noteMLMOToCompare
- - Mainline MO text/notepublic static boolean isNoteConflict(java.util.Map<java.lang.String,java.lang.String> SBMOToCompareNote, java.util.Map<java.lang.String,java.lang.String> MLMOToCompareNote)
SBMOToCompareNote
- - Sandbox MO noteMLMOToCompareNote
- - Mainline MO notepublic static ResourceBundleMergeDiffDetails parse(org.w3c.dom.Document document, java.lang.String moName, java.lang.String moOrigin)
document
- - DOM Document to be parsed.moName
- - Name of the MOmoOrigin
- - Origin of the MO.public static ResourceBundleWrapper.KeyInfo getTextAndNoteFromKey(java.lang.String conflictKey, org.w3c.dom.Document document)
conflictKey
- - Trans-unit keydocument
- - DOM to be parsedpublic static java.lang.String getTextFromKey(java.lang.String conflictKey, org.w3c.dom.Document document)
conflictKey
- - Trans-unit keydocument
- - DOM to be parsedpublic static void addMetadata(org.w3c.dom.Element element, java.util.Map<java.lang.String,java.lang.String> metadata, org.w3c.dom.Document document)
element
- - DOM elementmetadata
- - note elementdocument
- - DOM documentpublic static ResourceBundleMergeResolver getResourceBundleMergeResolver()
public static boolean isResourceBundleMergeResolverSet()