@@ -36,6 +36,8 @@ public class Product {
3636 private Product parent ;
3737 private List <String > consumers ;
3838 private Map <String , ContractTemplate > institutionContractMappings ;
39+ private Map <String , ContractTemplate > institutionAggregatorContractMappings ;
40+
3941 private Map <String , ContractTemplate > userContractMappings ;
4042 private Map <String , ContractTemplate > userAggregatorContractMappings ;
4143
@@ -294,6 +296,15 @@ public void setInstitutionContractMappings(
294296 this .institutionContractMappings = institutionContractMappings ;
295297 }
296298
299+ public Map <String , ContractTemplate > getInstitutionAggregatorContractMappings () {
300+ return institutionAggregatorContractMappings ;
301+ }
302+
303+ public void setInstitutionAggregatorContractMappings (
304+ Map <String , ContractTemplate > institutionAggregatorContractMappings ) {
305+ this .institutionAggregatorContractMappings = institutionAggregatorContractMappings ;
306+ }
307+
297308 public Map <String , ContractTemplate > getUserContractMappings () {
298309 return userContractMappings ;
299310 }
@@ -377,4 +388,17 @@ && getUserAggregatorContractMappings().containsKey(institutionType)) {
377388 }
378389 return userAggregatorContractTemplate ;
379390 }
391+
392+ public ContractTemplate getInstitutionAggregatorContractTemplate (String institutionType ) {
393+ ContractTemplate contractTemplate = new ContractTemplate ();
394+ if (Objects .nonNull (getInstitutionAggregatorContractMappings ())) {
395+ if (Objects .nonNull (institutionType )
396+ && getInstitutionAggregatorContractMappings ().containsKey (institutionType )) {
397+ contractTemplate = getInstitutionAggregatorContractMappings ().get (institutionType );
398+ } else if (getInstitutionAggregatorContractMappings ().containsKey (CONTRACT_TYPE_DEFAULT )) {
399+ contractTemplate = getInstitutionAggregatorContractMappings ().get (CONTRACT_TYPE_DEFAULT );
400+ }
401+ }
402+ return contractTemplate ;
403+ }
380404}
0 commit comments