.getDocId()
.equals(matchingTarget.getTextFlow()
.getDocument().getDocId());
}
};
final ContentState copyState =
determineContentState(contextMatches, projectMatches,
docIdMatches, options,
requireTranslationReview, matchingTarget.getState());
boolean hasValidationError =
validationTranslations(copyState,
matchingTargetProjectIteration,
originalTf.getContents(), matchingTarget.getContents());
if (hasValidationError) {
return;
}
HTextFlowTarget hTarget =
textFlowTargetDAO.getOrCreateTarget(originalTf,
matchingTarget.getLocale());
ContentState prevState =
hTarget.getId() == null ? ContentState.New : hTarget.getState();
if (shouldOverwrite(hTarget, copyState)) {
// NB we don't touch creationDate
hTarget.setTextFlowRevision(originalTf.getRevision());
hTarget.setLastChanged(matchingTarget.getLastChanged());