// add referenced policies
List<String> idReferenceList = PolicySetHelper.getPolicyIdReferencesValues(policySet);
if ((idReferenceList.size() > 0) && (policyWizardList == null)) {
throw new PolicySetWizardException("policyList is null");
}
for (String policyIdReference : idReferenceList) {
boolean found = false;
for (PolicyWizard policyWizard : policyWizardList) {
if (policyIdReference.equals(policyWizard.getPolicyId())) {
this.policyWizardList.add(policyWizard);
found = true;
}
}
if (!found) {
PolicySetHelper.deletePolicyReference(policySet, policyIdReference);
log.warn("Not found policy reference: " + policyIdReference);
}
}
// add referenced policy sets
idReferenceList = PolicySetHelper.getPolicySetIdReferencesValues(policySet);
if ((idReferenceList.size() > 0) && (childPolicySetList == null)) {
throw new PolicySetWizardException("childPolicySetList is null");
}
for (String policySetIdReference : idReferenceList) {
boolean found = false;
for (PolicySetType childPolicySet : childPolicySetList) {