package gw.pcf.duplicatecontacts uses gw.plugin.contact.DuplicateContactResult uses gw.plugin.contact.DuplicateContactResultContainer uses java.util.List /** * Provides functionality to support the DuplicateContactsPopup PCF. */ class PotentialMatchChecker { private var _dups : DuplicateContactResultContainer private var _exactMatchIds : List construct(dups : DuplicateContactResultContainer) { _dups = dups _exactMatchIds = _dups.Results.where(\ d -> d.ExactMatch).map(\ d -> d.ContactAddressBookUID) } function hasExactMatch() : boolean { return (not _exactMatchIds.Empty) } function canAcceptSelection(dup : DuplicateContactResult) : boolean { return hasExactMatch() ? _exactMatchIds.contains(dup.ContactAddressBookUID) : true } }