protected HtmlData getOspAdminNameInquiryUrl(Award award) {
   KcPerson ospAdministrator = award.getOspAdministrator();
   if (ospAdministrator != null) {
     final KcPerson inqBo =
         this.kcPersonService.getKcPersonByPersonId(ospAdministrator.getPersonId());
     return super.getInquiryUrl(inqBo, PERSON_ID);
   } else {
     return null;
   }
 }
 @SuppressWarnings("unchecked")
 @Override
 public Collection performLookup(LookupForm lookupForm, Collection resultTable, boolean bounded) {
   String userName = (String) lookupForm.getFieldsForLookup().get("person.userName");
   if (StringUtils.isNotEmpty(userName)) {
     KcPerson person = getKcPersonService().getKcPersonByUserName(userName);
     if (person != null) {
       lookupForm.getFieldsForLookup().put("personId", person.getPersonId());
     }
   }
   return super.performLookup(lookupForm, resultTable, bounded);
 }
Esempio n. 3
0
 /**
  * . This is the Getter Method for requisitionerUserName
  *
  * @return Returns the requisitionerUserName.
  */
 public String getRequisitionerUserName() {
   if (requisitionerId != null) {
     KcPerson requisitioner = getRequisitioner();
     if (requisitioner != null) {
       requisitionerName = requisitioner.getFullName();
       requisitionerUserName = requisitioner.getUserName();
     }
   } else {
     this.requisitionerName = null;
   }
   return this.requisitionerUserName;
 }
  /**
   * Create a HumanNameDataType from Rolodex object
   *
   * @param rolodex Rolodex object
   * @return HumanNameDataType corresponding to the rolodex object.
   */
  public HumanNameDataType getHumanNameDataType(KcPerson person) {

    HumanNameDataType humanName = HumanNameDataType.Factory.newInstance();
    if (person != null) {
      humanName.setFirstName(person.getFirstName());
      humanName.setLastName(person.getLastName());
      String middleName = person.getMiddleName();
      if (middleName != null && !middleName.equals("")) {
        humanName.setMiddleName(middleName);
      }
    }
    return humanName;
  }
Esempio n. 5
0
 /**
  * . This is the Setter Method for requisitionerUserName
  *
  * @param requisitionerUserName The requisitionerUserName to set.
  */
 public void setRequisitionerUserName(String requisitionerUserName) {
   if (requisitionerUserName != null) {
     KcPerson requisitioner =
         KraServiceLocator.getService(KcPersonService.class)
             .getKcPersonByUserName(requisitionerUserName);
     if (requisitioner != null) {
       requisitionerId = requisitioner.getPersonId();
     }
   } else {
     this.requisitionerName = null;
   }
   this.requisitionerUserName = requisitionerUserName;
 }
  /**
   * Create AddressDataType from Person
   *
   * @param person Person
   * @return AddressDataType corresponding to the KcPerson object.
   */
  public AddressDataType getAddressDataType(KcPerson person) {
    AddressDataType addressType = AddressDataType.Factory.newInstance();
    if (person != null) {

      String street1 = person.getAddressLine1();
      addressType.setStreet1(street1);
      String street2 = person.getAddressLine2();
      if (street2 != null && !street2.equals("")) {
        addressType.setStreet2(street2);
      }
      String city = person.getCity();
      addressType.setCity(city);
      String county = person.getCounty();
      if (county != null && !county.equals("")) {
        addressType.setCounty(county);
      }
      String country = person.getCountryCode();
      String state = person.getState();
      if (state != null && !state.equals("")) {
        addressType.setState(getStateCodeDataType(country, state));
      }
      String postalCode = person.getPostalCode();
      if (postalCode != null && !postalCode.equals("")) {
        addressType.setZipPostalCode(postalCode);
      }
      addressType.setCountry(getCountryCodeDataType(country));
    }
    return addressType;
  }