public String getIpMessageSrvNumberName(String number) { NmsLog.trace(TAG, "getIpMessageSrvNumberName. number is " + number); if (TextUtils.isEmpty(number)) { NmsLog.error(TAG, "getIpMessageSrvNumberName. number is empty!"); return null; } if (number.contains("@")) { NmsLog.error(TAG, "getIpMessageSrvNumberName. number is include contain @"); return null; } short[] ids = engineadapter.get().nmsUIGetServiceContactList(); if (ids != null) { for (int i = 0; i < ids.length; ++i) { NmsLog.trace(TAG, "hesine customer service id is " + ids[i]); NmsUIContact contact = getContactInfoViaEngineContactId(ids[i]); if (contact != null && contact.getNumberOrEmail().equals(number)) { NmsLog.trace(TAG, "hesine customer service id name " + contact.getName()); return contact.getName(); } } } else { NmsLog.trace(TAG, "hesine customer service num is null"); } return null; }
public NmsUIContact getContactInfoViaEngineContactId(short engineContactId) { NmsUIContact contact = new NmsUIContact(); NmsContact tmp = engineadapter.get().nmsUIGetContact(engineContactId); contact.setEngineContactId(engineContactId); contact.setSystemContactId(engineContactId); contact.setType(NmsContactType.HISSAGE_USER); contact.setName(tmp.getName()); contact.setNumberOrEmail(tmp.getNumber()); return contact; }