public void setOriginalDisclosureIdsIfNecessary(CoiDisclosure disclosure) { for (CoiDisclosureAttachment attachment : disclosure.getCoiDisclosureAttachments()) { if (attachment.getOriginalCoiDisclosureId() == null) { attachment.setOriginalCoiDisclosureId(disclosure.getCoiDisclosureId()); } } for (CoiDisclosureNotepad note : disclosure.getCoiDisclosureNotepads()) { if (note.getOriginalCoiDisclosureId() == null) { note.setOriginalCoiDisclosureId(disclosure.getCoiDisclosureId()); } } }
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); } }
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); }