예제 #1
0
 private CoiDisclosure getCoiDisclosure() {
   CoiDisclosureDocument document = form.getCoiDisclosureDocument();
   if (document == null || document.getCoiDisclosure() == null) {
     throw new IllegalArgumentException("invalid (null) CoiDisclosureDocument in ProtocolForm");
   }
   return document.getCoiDisclosure();
 }
  private void initCoiDisclosureAttachment() {

    this.setNewCoiDisclosureAttachment(new CoiDisclosureAttachment(this.getCoiDisclosure()));
    CoiDisclosure coiDisclosure = coiDisclosureForm.getCoiDisclosureDocument().getCoiDisclosure();
    String event = coiDisclosure.getEventTypeCode();
    if (StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.AWARD)
        || StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.DEVELOPMENT_PROPOSAL)
        || StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.INSTITUTIONAL_PROPOSAL)
        || StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.IRB_PROTOCOL)) {
      String projectId = coiDisclosure.getCoiDisclProjects().get(0).getProjectId();
      newCoiDisclosureAttachment.setProjectId(projectId);
    }
  }
예제 #3
0
 public DisclosureHelper(CoiDisclosureForm form) {
   this.form = form;
   setNewDisclosurePersonUnit(new DisclosurePersonUnit());
   deletedUnits = new ArrayList<DisclosurePersonUnit>();
   newRelationDetails = getFinancialEntityService().getFinancialEntityDataMatrix();
   editRelationDetails = new ArrayList<FinEntityDataMatrixBean>();
   //        canViewDisclosureFeHistory = hasCanViewDisclosureFeHistoryPermission();
   //        canEditDisclosureFinancialEntity = hasCanEditDisclosureFinancialEntityPermission();
   CoiDisclosure coiDisclosure = form.getCoiDisclosureDocument().getCoiDisclosure();
   //  coiDisclosure.initCoiDisclosureNumber();
   newCoiDisclProject =
       new CoiDisclProject(
           coiDisclosure.getCoiDisclosureNumber(), coiDisclosure.getSequenceNumber());
   newProtocols = new ArrayList<Protocol>();
   initConflictHeaderLabel();
 }
 private void initCoiDisclosureNotepad() {
   final CoiDisclosureNotepad notepad = new CoiDisclosureNotepad(getCoiDisclosure());
   notepad.setEntryNumber(getNextEntryNumber());
   CoiDisclosure coiDisclosure = coiDisclosureForm.getCoiDisclosureDocument().getCoiDisclosure();
   String event = coiDisclosure.getEventTypeCode();
   // If disclosure is an automatic event disclosure, prepopulate the projectId so that
   // this can be displayed in the notes and attachments projectId field. We do not want
   // a drop down in this case since there is only one value.
   if (StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.AWARD)
       || StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.DEVELOPMENT_PROPOSAL)
       || StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.INSTITUTIONAL_PROPOSAL)
       || StringUtils.equalsIgnoreCase(event, CoiDisclosureEventType.IRB_PROTOCOL)) {
     String projectId = coiDisclosure.getCoiDisclProjects().get(0).getProjectId();
     notepad.setProjectId(projectId);
   }
   notepad.setEventTypeCode(event);
   notepad.setEditable(true);
   // If Assigned Reviewers create a comment in the Review Actions ==> Add Review Comment, pre-set
   // the Note Type drop down to Reviewer Comment
   if (canAddCoiDisclosureNotes() && coiDisclosure.isSubmitted() && addCoiReviewerComments) {
     notepad.setNoteTypeCode(CoiNoteType.REVIEWER_COMMENT_NOTE_TYPE_CODE);
   }
   setNewCoiDisclosureNotepad(notepad);
 }