private RRBudget10Document getRRBudget10 ( ) { deleteAutoGenNarratives ( ) ; RRBudget10Document rrBudgetDocument = RRBudget10Document . Factory . newInstance ( ) ; RRBudget10 rrBudget = RRBudget10 . Factory . newInstance ( ) ; rrBudget . setFormVersion ( FormVersion . v1_1 . getVersion ( ) ) ; if ( pdDoc . getDevelopmentProposal ( ) . getApplicantOrganization ( ) != null ) { rrBudget . setDUNSID ( pdDoc . getDevelopmentProposal ( ) . getApplicantOrganization ( ) . getOrganization ( ) . getDunsNumber ( ) ) ; rrBudget . setOrganizationName ( pdDoc . getDevelopmentProposal ( ) . getApplicantOrganization ( ) . getOrganization ( ) . getOrganizationName ( ) ) ; } rrBudget . setBudgetType ( BudgetTypeDataType . PROJECT ) ; List < BudgetPeriodDto > budgetperiodList ; BudgetSummaryDto budgetSummary = null ; try { validateBudgetForForm ( pdDoc ) ; budgetperiodList = s2sBudgetCalculatorService . getBudgetPeriods ( pdDoc ) ; budgetSummary = s2sBudgetCalculatorService . getBudgetInfo ( pdDoc , budgetperiodList ) ; } catch ( S2SException e ) { LOG . error ( e . getMessage ( ) , e ) ; return rrBudgetDocument ; } rrBudget . setBudgetSummary ( getBudgetSummary ( budgetSummary ) ) ; for ( BudgetPeriodDto budgetPeriodData : budgetperiodList ) { setBudgetYearDataType ( rrBudget , budgetPeriodData ) ; } AttachedFileDataType attachedFileDataType = AttachedFileDataType . Factory . newInstance ( ) ; for ( NarrativeContract narrative : pdDoc . getDevelopmentProposal ( ) . getNarratives ( ) ) { if ( narrative . getNarrativeType ( ) . getCode ( ) != null && Integer . parseInt ( narrative . getNarrativeType ( ) . getCode ( ) ) == 132 ) { attachedFileDataType = getAttachedFileType ( narrative ) ; if ( attachedFileDataType != null ) { break ; } } } rrBudget . setBudgetJustificationAttachment ( attachedFileDataType ) ; rrBudgetDocument . setRRBudget10 ( rrBudget ) ; return rrBudgetDocument ; }
This method returns RRBudget10Document object based on proposal development document which contains the informations such as DUNSID OrganizationName BudgetType BudgetYear and BudgetSummary .