public String checkEmployer() {

    User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();

    //	employerSearchList = searchService.findAllEmployer(search);
    employerSearchList1 = searchService.findAllEmployerList(search);
    profiles = searchService.findListOfEmployeeProfiles(profile, user.getId());
    if (profiles.size() != 0) {
      currentProfile = employeeProfileService.getDefaultProfileForUser(user.getId());
      contactTypesList = privacygroupService.loadAllPrivacyGroupsOfUser(currentProfile.getId());
    }
    Iterator<Employer> it = employerSearchList1.iterator();
    try {
      while (it.hasNext()) {
        // Get element
        emplrProfileImages = it.next();

        if (emplrProfileImages.getPicture() != null) {
          image = (String) emplrProfileImages.getAmazonFileURL().get(0);
        }
        if (emplrProfileImages.getResizedMidPicture() != null) {
          resizedMidPicture = (String) emplrProfileImages.getAmazonFileURL().get(1);
          emplrProfileImages.setResizedMidPicture(resizedMidPicture);
        }
        if (emplrProfileImages.getResizedMinPicture() != null) {
          resizedMinPicture = (String) emplrProfileImages.getAmazonFileURL().get(2);
          emplrProfileImages.setResizedMinPicture(resizedMinPicture);
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return "success";
  }
  public String searchAllEmployers() {
    LOGGER.info("Entered searchAllEmployers");

    User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();

    employerSearchList = searchService.findListOfEmployers(employerName, employerLocation);

    profiles = searchService.findListOfEmployeeProfiles(profile, user.getId());

    if (profiles.size() != 0) {
      currentProfile = employeeProfileService.getDefaultProfileForUser(user.getId());
      contactTypesList = privacygroupService.loadAllPrivacyGroupsOfUser(currentProfile.getId());
    }
    return "success";
  }