public ContactPersonDataType getContactPersonDataType( ProposalDevelopmentDocument proposalDocument) { ContactPersonDataType contactPerson = ContactPersonDataType.Factory.newInstance(); DepartmentalPerson person = s2sUtilService.getContactPerson(proposalDocument); if (person != null) { contactPerson.setName(getHumanNameDataType(person)); String phone = person.getOfficePhone(); if (phone != null && !phone.equals("")) { contactPerson.setPhone(phone); } String fax = person.getFaxNumber(); if (fax != null && !fax.equals("")) { contactPerson.setFax(fax); } String email = person.getEmailAddress(); if (email != null && !email.equals("")) { contactPerson.setEmail(person.getEmailAddress()); } String title = person.getPrimaryTitle(); if (title != null && !title.equals("")) { contactPerson.setTitle(title); } contactPerson.setAddress(getAddressDataType(person)); } return contactPerson; }
/** * Create ContactPersonDataType from Rolodex object * * @param person Rolodex * @return ContactPersonDataType created from Rolodex object */ public ContactPersonDataType getContactPersonDataType(Rolodex rolodex) { ContactPersonDataType contactPerson = ContactPersonDataType.Factory.newInstance(); if (rolodex != null) { contactPerson.setName(getHumanNameDataType(rolodex)); String phone = rolodex.getPhoneNumber(); if (phone != null && !phone.equals("")) { contactPerson.setPhone(phone); } String fax = rolodex.getFaxNumber(); if (fax != null && !fax.equals("")) { contactPerson.setFax(fax); } String email = rolodex.getEmailAddress(); if (email != null && !email.equals("")) { contactPerson.setEmail(rolodex.getEmailAddress()); } String title = rolodex.getTitle(); if (title != null && !title.equals("")) { contactPerson.setTitle(title); } contactPerson.setAddress(getAddressDataType(rolodex)); } return contactPerson; }