@SuppressWarnings("unchecked")
  public List<ComparablesCompanyBean> getMatchingCompaniesBean(String compName) {

    WebClient client = restClient.getRestClient();
    List<ComparablesCompanyBean> matchingCompanies =
        (List<ComparablesCompanyBean>)
            client
                .replacePath("/compProperties/compGetMatchingCompany")
                .postAndGetCollection(compName, ComparablesCompanyBean.class);

    return matchingCompanies;
  }
 @SuppressWarnings("unchecked")
 public List<String> getCounties(String county) {
   List<String> counties = new ArrayList<String>();
   WebClient client = restClient.getRestClient();
   List<ComparablesAddressSearchBean> matchingCounties =
       (List<ComparablesAddressSearchBean>)
           client
               .replacePath("/compProperties/compGetMatchingCounties")
               .postAndGetCollection(county, ComparablesAddressSearchBean.class);
   for (ComparablesAddressSearchBean name : matchingCounties) {
     counties.add(name.getCounty());
   }
   return counties;
 }
 @SuppressWarnings("unchecked")
 public List<String> getTownNames(String townNameRoot) {
   List<String> townNames = new ArrayList<String>();
   WebClient client = restClient.getRestClient();
   List<ComparablesAddressSearchBean> matchingTowns =
       (List<ComparablesAddressSearchBean>)
           client
               .replacePath("/compProperties/compGetMatchingTowns")
               .postAndGetCollection(townNameRoot, ComparablesAddressSearchBean.class);
   for (ComparablesAddressSearchBean name : matchingTowns) {
     townNames.add(name.getTown());
   }
   return townNames;
 }
 @SuppressWarnings("unchecked")
 public List<String> getStreetNamesOptions(String streetName) {
   List<String> streetNames = new ArrayList<String>();
   WebClient client = restClient.getRestClient();
   List<ComparablesAddressSearchBean> matchingStreets =
       (List<ComparablesAddressSearchBean>)
           client
               .replacePath("/compProperties/compGetMatchingStreetName")
               .postAndGetCollection(streetName, ComparablesAddressSearchBean.class);
   for (ComparablesAddressSearchBean name : matchingStreets) {
     streetNames.add(name.getStreetName());
   }
   return streetNames;
 }
Пример #5
0
  public void retrieveConfidentialGroupsByUser() {
    // confidential group
    WebClient client = restClient.getRestClient();
    HttpServletRequest request =
        (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
    String empId = request.getRemoteUser();

    confidentialGroups = new ArrayList<ComparablesConfidentialityGroupBean>();
    confidentialGroups =
        (List<ComparablesConfidentialityGroupBean>)
            client
                .replacePath("/comparables/compConfidentialGroups")
                .postAndGetCollection(empId, ComparablesConfidentialityGroupBean.class);
    if (confidentialGroups != null) {
      confidGroupNames = new LinkedHashMap<String, String>();
      confidGroupNames.put("", "");
      for (ComparablesConfidentialityGroupBean confidGroup : confidentialGroups) {
        confidGroupNames.put(String.valueOf(confidGroup.getCode()), confidGroup.getName());
      }
    }
  }