Example #1
0
 /**
  * This method is used to get Contact person information
  *
  * @param rolodex(Rolodex)
  * @return ContactPersonInfo corresponding to the Rolodex object.
  */
 private ContactPersonInfo getContactInfo(Rolodex rolodex) {
   ContactPersonInfo contactInfo = ContactPersonInfo.Factory.newInstance();
   contactInfo.setName(globLibV20Generator.getHumanNameDataType(rolodex));
   contactInfo.setPhone("");
   if (rolodex != null) {
     contactInfo.setPhone(rolodex.getPhoneNumber());
     if (rolodex.getFaxNumber() != null) {
       contactInfo.setFax(rolodex.getFaxNumber());
     }
     if (rolodex.getEmailAddress() != null) {
       contactInfo.setEmail(rolodex.getEmailAddress());
     }
   }
   return contactInfo;
 }
Example #2
0
 /**
  * . This is the Getter Method for rolodex
  *
  * @return Returns the rolodex.
  */
 public Rolodex getRolodex() {
   if (rolodex == null
       || !ObjectUtils.equals(rolodex.getRolodexId(), rolodexId) && rolodexId != null) {
     refreshRolodex();
   }
   return rolodex;
 }
Example #3
0
  private void setPerson(
      ProtocolReviewer protocolReviewer,
      edu.mit.irb.irbnamespace.ProtocolReviewerDocument.ProtocolReviewer protocolReviewerType) {
    Person personType = protocolReviewerType.addNewPerson();
    boolean nonEmployeeFlag = protocolReviewer.getNonEmployeeFlag();
    if (!nonEmployeeFlag) {
      String personId = protocolReviewer.getPersonId();
      KcPerson person = getKcPersonService().getKcPersonByPersonId(personId);
      getIrbPrintXmlUtilService().setPersonXml(person, personType);

    } else {
      Rolodex rolodex = protocolReviewer.getRolodex();
      ProtocolPersonRolodex protocolRolodex =
          getBusinessObjectService()
              .findBySinglePrimaryKey(ProtocolPersonRolodex.class, rolodex.getRolodexId());
      getIrbPrintXmlUtilService().setPersonXml(protocolRolodex, personType);
    }
  }
  /**
   * This method is for several fields that does not have inquiry created by lookup frame work.
   * Also, disable inquiry link for protocol title & schedule date.
   *
   * @see
   *     org.kuali.core.lookup.AbstractLookupableHelperServiceImpl#getInquiryUrl(org.kuali.core.bo.BusinessObject,
   *     java.lang.String)
   */
  @Override
  public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {

    BusinessObject inqBo = bo;
    String inqPropertyName = propertyName;
    HtmlData inqUrl = new AnchorHtmlData();
    if (!COMMITTEE_SCHEDULE_SCHEDULE_DATE.equals(propertyName)
        && !PROTOCOL_TITLE.equals(propertyName)) {
      if (PROTOCOL_NUMBER.equals(propertyName)) {
        inqBo = ((ProtocolSubmissionBase) bo).getProtocol();
      } else if (propertyName.equals(COMMITTEE_ID)) {
        inqBo = ((ProtocolSubmissionBase) bo).getCommittee();

      } else if ("piName".equals(propertyName)) {
        // -- commented as part of GENERATED CODE need to verify
        ProtocolBase protocol = ((ProtocolSubmissionBase) bo).getProtocol();
        ProtocolPersonBase principalInvestigator = protocol.getPrincipalInvestigator();
        if (principalInvestigator != null) {
          if (StringUtils.isNotBlank(principalInvestigator.getPersonId())) {
            inqBo = this.kcPersonService.getKcPersonByPersonId(principalInvestigator.getPersonId());
            inqPropertyName = ProtocolLookupConstants.Property.PERSON_ID;
          } else {
            if (principalInvestigator.getRolodexId() != null) {
              inqBo = new Rolodex();
              ((Rolodex) inqBo).setRolodexId(principalInvestigator.getRolodexId());
              inqPropertyName = ProtocolLookupConstants.Property.ROLODEX_ID;
            }
          }
        }
      }
      if (inqBo != null) {
        // withdraw committeeidfk = null will cause inqbo=null
        inqUrl = super.getInquiryUrl(inqBo, inqPropertyName);
      }
    }
    return inqUrl;
  }