コード例 #1
0
 /**
  * @return to official search property result screen
  * @description searches property based on assessment no
  */
 @ValidationErrorPage(value = "new")
 @Action(value = "/search/searchProperty-srchByAssessment")
 public String srchByAssessment() {
   if (LOGGER.isDebugEnabled())
     LOGGER.debug("Entered into srchByAssessment  method. Assessment Number : " + assessmentNum);
   try {
     final BasicProperty basicProperty =
         basicPropertyDAO.getBasicPropertyByIndexNumAndParcelID(assessmentNum, null);
     if (LOGGER.isDebugEnabled())
       LOGGER.debug("srchByAssessment : BasicProperty : " + basicProperty);
     if (basicProperty != null) {
       setSearchResultList(getSearchResults(basicProperty.getUpicNo()));
       checkIsMarkForDeactive(basicProperty);
     }
     if (assessmentNum != null && !assessmentNum.equals(""))
       setSearchValue("Assessment Number : " + assessmentNum);
     setSearchUri("../search/searchProperty-srchByAssessment.action");
     setSearchCriteria("Search By Assessment number");
     setSearchValue("Assessment number :" + assessmentNum);
   } catch (final IndexOutOfBoundsException iob) {
     final String msg = "Rollover is not done for " + assessmentNum;
     throw new ValidationException(Arrays.asList(new ValidationError(msg, msg)));
   } catch (final Exception e) {
     LOGGER.error("Exception in Search Property By Assessment ", e);
     throw new ApplicationRuntimeException("Exception : ", e);
   }
   if (LOGGER.isDebugEnabled()) LOGGER.debug("Exit from srchByAssessment method ");
   return TARGET;
 }
コード例 #2
0
  /**
   * Generalised method to redirect the form page to different transactional form pages
   *
   * @return
   */
  @ValidationErrorPage(value = COMMON_FORM)
  @Action(value = "/search/searchProperty-commonSearch")
  public String commonSearch() {
    final BasicProperty basicProperty =
        basicPropertyDAO.getBasicPropertyByIndexNumAndParcelID(assessmentNum, null);
    if (basicProperty == null) {
      addActionError(getText("validation.property.doesnot.exists"));
      return COMMON_FORM;
    }
    checkIsDemandActive(basicProperty.getProperty());
    if (APPLICATION_TYPE_REVISION_PETITION.equals(applicationType)) {
      if (isDemandActive) {
        addActionError(getText("revPetition.demandActive"));
        return COMMON_FORM;
      }
    } else if (APPLICATION_TYPE_ALTER_ASSESSENT.equals(applicationType)
        || APPLICATION_TYPE_BIFURCATE_ASSESSENT.equals(applicationType)
        || APPLICATION_TYPE_TRANSFER_OF_OWNERSHIP.equals(applicationType)) {
      if (!isDemandActive) {
        addActionError(getText("error.msg.demandInactive"));
        return COMMON_FORM;
      }
    } else if (APPLICATION_TYPE_DEMAND_BILL.equals(applicationType))
      if (basicProperty.getProperty().getIsExemptedFromTax()) {
        addActionError(getText("error.msg.taxExempted"));
        return COMMON_FORM;
      }

    return applicationType;
  }