Module: ADIWG::Mdtranslator::Readers::MdJson::ContactPost

Defined in:
lib/adiwg/mdtranslator/readers/mdJson/modules/module_contactPostprocess.rb

Class Method Summary collapse

Class Method Details

.examine(aContact, responseObj) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/adiwg/mdtranslator/readers/mdJson/modules/module_contactPostprocess.rb', line 17

def self.examine(aContact, responseObj)

   @MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson

   # test that all organizationMember IDs are in the contacts array
   aContact.each do |hContact|
      contactId = hContact[:contactId]
      hContact[:memberOfOrgs].each do |orgId|
         hOrg = MdJson.findContact(orgId)
         if hOrg[0].nil?
            outContext = "contact #{contactId}, membership organization ID #{orgId}"
            @MessagePath.issueWarning(110, responseObj, outContext)
         end
      end
   end

end