Beispiel #1
0
 /**
  * This method gives the information for an application which consists of personal details
  *
  * @return appInfo(ApplicantInfo) applicant details.
  */
 private ApplicantInfo getApplicationInfo() {
   ApplicantInfo appInfo = ApplicantInfo.Factory.newInstance();
   String contactType = getContactType();
   if (contactType.equals(CONTACT_TYPE_I)) {
     // use organization rolodex contact
     if (pdDoc.getDevelopmentProposal().getApplicantOrganization() != null) {
       appInfo.setContactPersonInfo(
           getContactInfo(pdDoc.getDevelopmentProposal().getApplicantOrganization().getRolodex()));
     }
   } else {
     // contact will come from unit or unit_administrators
     DepartmentalPerson depPerson = getContactPerson(pdDoc);
     ContactPersonInfo contactInfo = ContactPersonInfo.Factory.newInstance();
     if (depPerson != null) {
       contactInfo.setName(globLibV20Generator.getHumanNameDataType(depPerson));
       contactInfo.setPhone(depPerson.getOfficePhone());
       if (depPerson.getFaxNumber() != null) {
         contactInfo.setFax(depPerson.getFaxNumber());
       }
       if (depPerson.getEmailAddress() != null) {
         contactInfo.setEmail(depPerson.getEmailAddress());
       }
     }
     appInfo.setContactPersonInfo(contactInfo);
   }
   OrganizationDataType orgType = OrganizationDataType.Factory.newInstance();
   Rolodex rolodex =
       pdDoc.getDevelopmentProposal().getApplicantOrganization().getOrganization().getRolodex();
   orgType.setAddress(globLibV20Generator.getAddressDataType(rolodex));
   Organization organization =
       pdDoc.getDevelopmentProposal().getApplicantOrganization().getOrganization();
   if (organization != null) {
     orgType.setOrganizationName(organization.getOrganizationName());
     orgType.setDUNSID(organization.getDunsNumber());
   }
   if (pdDoc.getDevelopmentProposal().getOwnedByUnit() != null) {
     String departmentName = pdDoc.getDevelopmentProposal().getOwnedByUnit().getUnitName();
     if (departmentName != null && departmentName.length() > DEPARTMENT_NAME_MAX_LENGTH) {
       departmentName = departmentName.substring(0, DEPARTMENT_NAME_MAX_LENGTH - 1);
     }
     orgType.setDepartmentName(departmentName);
     // divisionName
     String divisionName = s2sUtilService.getDivisionName(pdDoc);
     if (divisionName != null) {
       orgType.setDivisionName(divisionName);
     }
   }
   appInfo.setOrganizationInfo(orgType);
   return appInfo;
 }
Beispiel #2
0
 /**
  * This method is used to get Contact person information
  *
  * @param rolodex(Rolodex)
  * @return ContactPersonInfo corresponding to the Rolodex object.
  */
 private ContactPersonInfo getContactInfo(Rolodex rolodex) {
   ContactPersonInfo contactInfo = ContactPersonInfo.Factory.newInstance();
   contactInfo.setName(globLibV20Generator.getHumanNameDataType(rolodex));
   contactInfo.setPhone("");
   if (rolodex != null) {
     contactInfo.setPhone(rolodex.getPhoneNumber());
     if (rolodex.getFaxNumber() != null) {
       contactInfo.setFax(rolodex.getFaxNumber());
     }
     if (rolodex.getEmailAddress() != null) {
       contactInfo.setEmail(rolodex.getEmailAddress());
     }
   }
   return contactInfo;
 }