View Javadoc
1   package org.kuali.coeus.s2sgen.impl.budget;
2   
3   import org.kuali.coeus.propdev.api.budget.ProposalDevelopmentBudgetExtContract;
4   import org.kuali.coeus.propdev.api.core.DevelopmentProposalContract;
5   import org.springframework.stereotype.Component;
6   
7   @Component("s2SCommonBudgetService")
8   public class S2SCommonBudgetServiceImpl implements S2SCommonBudgetService {
9       @Override
10      public ProposalDevelopmentBudgetExtContract getBudget(DevelopmentProposalContract developmentProposal) {
11          if (developmentProposal == null) {
12              throw new IllegalArgumentException("developmentProposal is null");
13          }
14  
15          final ProposalDevelopmentBudgetExtContract finalBudget = developmentProposal.getFinalBudget();
16          return finalBudget != null ? finalBudget : developmentProposal.getLatestBudget();
17      }
18  }