- StdPAPPolicy newPAPPolicy = new StdPAPPolicy(policyName, policyParameters.getPolicyDescription(), onapName,
- ruleProvider.toString(), matchingAttributes, settingsAttributes,
- policyParameters.getTreatments(), policyParameters.getDynamicRuleAlgorithmLabels(),
- policyParameters.getDynamicRuleAlgorithmFunctions(),
- policyParameters.getDynamicRuleAlgorithmField1(), policyParameters.getDynamicRuleAlgorithmField2(),
- null, null, null, updateFlag, policyScope, 0);
+ StdPAPPolicy newPAPPolicy = new StdPAPPolicy(StdPAPPolicyParams.builder()
+ .policyName(policyName)
+ .description(policyParameters.getPolicyDescription())
+ .onapName(onapName)
+ .providerComboBox(ruleProvider.toString())
+ .dyanamicFieldConfigAttributes(matchingAttributes)
+ .dynamicSettingsMap(settingsAttributes)
+ .treatments(policyParameters.getTreatments())
+ .dynamicRuleAlgorithmLabels(policyParameters.getDynamicRuleAlgorithmLabels())
+ .dynamicRuleAlgorithmCombo(policyParameters.getDynamicRuleAlgorithmFunctions())
+ .dynamicRuleAlgorithmField1(policyParameters.getDynamicRuleAlgorithmField1())
+ .dynamicRuleAlgorithmField2(policyParameters.getDynamicRuleAlgorithmField2())
+ .editPolicy(updateFlag)
+ .domain(policyScope)
+ .highestVersion(0)
+ .build());