public void defaultDocumentDescription() {
   DevelopmentProposal proposal = getDevelopmentProposal();
   String desc =
       String.format(
           "%s; Proposal No: %s; PI: %s; Sponsor: %s; Due Date: %s",
           proposal.getTitle() != null
               ? proposal.getTitle().substring(0, Math.min(proposal.getTitle().length(), 19))
               : "null",
           proposal.getProposalNumber(),
           proposal.getPrincipalInvestigatorName(),
           proposal.getSponsorName(),
           proposal.getDeadlineDate() != null
               ? getDateTimeService().toDateString(proposal.getDeadlineDate())
               : "null");
   getDocumentHeader().setDocumentDescription(desc);
 }
 @Override
 public void doRouteStatusChange(DocumentRouteStatusChange dto) {
   super.doRouteStatusChange(dto);
   String newStatus = dto.getNewRouteStatus();
   String oldStatus = dto.getOldRouteStatus();
   if (LOG.isDebugEnabled()) {
     LOG.debug(
         String.format(
             "Route Status change for document %s from %s to %s",
             this.getDocumentNumber(), oldStatus, newStatus));
   }
   if (!isProposalDeleted()) {
     DevelopmentProposal bp = this.getDevelopmentProposal();
     LOG.info(
         String.format(
             "Route status change for document %s - proposal number %s is moving from %s to %s",
             bp.getProposalDocument().getDocumentHeader().getDocumentNumber(),
             bp.getProposalNumber(),
             oldStatus,
             newStatus));
     if (bp.isParent()) {
       try {
         getProposalHierarchyService().routeHierarchyChildren(this, dto);
       } catch (ProposalHierarchyException e) {
         throw new RuntimeException(
             "ProposalHierarchyException thrown while routing children.", e);
       }
     } else if (!bp.isInHierarchy()) {
       try {
         getProposalHierarchyService().calculateAndSetProposalAppDocStatus(this, dto);
       } catch (ProposalHierarchyException pe) {
         throw new RuntimeException(
             String.format(
                 "ProposalHierarchyException thrown while updating app doc status for document %s",
                 getDocumentNumber()));
       }
     }
     bp.setProposalStateTypeCode(
         getProposalStateService().getProposalStateTypeCode(this, true, false));
   }
 }