Пример #1
0
 /*
  * private boolean isMailingAddressInfoPresent(Applicant appBean ,
  * HttpServletRequest request){ boolean retVal = false;
  *
  * String isMailingAddressPresent = (String)
  * request.getParameter("mailAddrTrig");
  *
  * if(isMailingAddressPresent== null) { retVal |=
  * StringUtils.isNotEmpty(xn.getMailingCity()); retVal |=
  * StringUtils.isNotEmpty(xn.getMailingCountry()); retVal |=
  * StringUtils.isNotEmpty(xn.getMailingState()); retVal |=
  * StringUtils.isNotEmpty(xn.getMailingStreetAddress1()); retVal |=
  * StringUtils.isNotEmpty(xn.getMailingStreetAddress2()); retVal |=
  * StringUtils.isNotEmpty(xn.getMailingZipCode()); retVal |=
  * StringUtils.isNotEmpty(xn.getMailingZipCodeExtension()); } else {
  * xn.setMailingCity(xn.getPhysicalCity());
  * xn.setMailingCountry(xn.getPhysicalCountry());
  * xn.setMailingState(xn.getPhysicalState());
  * xn.setMailingStreetAddress1(xn.getPhysicalStreetAddress1());
  * xn.setMailingStreetAddress2(xn.getPhysicalStreetAddress2());
  * xn.setMailingZipCode(xn.getPhysicalZipCode());
  * xn.setMailingZipCodeExtension(xn.getPhysicalZipCodeExtension());
  * appBean.getTransactionInProgress().setTransactionDetail(xn); retVal =
  * false; } return retVal; }
  */
 private void validateTemporaryVisitor(ApplicantBean appBean, Errors errors) {
   if (appBean != null && appBean.getOtherInfo() != null) {
     if (isUSCitizen(appBean.getOtherInfo()) && appBean.getOtherInfo().isTemporaryVisitor()) {
       errors.reject(
           "Invalid US Citizen1", "Applicant cannot be a US Citizen and a Temporary Visitor");
       return;
     }
     if (appBean.getOtherInfo().isTemporaryVisitor()
         && (appBean.getOtherInfo().getVisaExpirationDate() == null)) {
       errors.reject(
           "Invalid Temporary Visitor1",
           "Applicant requires a Temporary Visitor Expiration Date "
               + "when Temporary Visitor is true");
       return;
     }
     if (appBean.getOtherInfo().isTemporaryVisitor()
         && (appBean.getOtherInfo().getVisaExpirationDate() != null)) {
       if (!DataDictionaryValidator.validateDate(
           appBean.getOtherInfo().getVisaExpirationDate(), true)) {
         errors.reject(
             "Invalid Temporary Visitor Expiration Date1",
             "Invalid Temporary Visitor Expiration Date ");
         return;
       }
     }
   } else {
     return;
   }
 }
Пример #2
0
 private void validateCitizenForUnknownValue(ApplicantBean appBean, Errors errors) {
   if (appBean != null
       && appBean.getOtherInfo() != null
       && appBean.getOtherInfo().getUsCitizen() == null) {
     errors.reject(
         "Invalid US Citizen Value",
         "US Citizen must be Yes or No. It cannot be Unknown for Issuance Transaction.");
   }
 }