}
result = (T) evaluatedPPSpec;
break;
case ACCOUNT:
case GLOBAL_ACCOUNT:
final AccountPolicySpec spec = policy.getSpecification();
final AccountPolicySpec accountPolicy = new AccountPolicySpec();
BeanUtils.copyProperties(spec, accountPolicy, new String[]{"schemasNotPermitted"});
for (String schema : spec.getSchemasNotPermitted()) {
attribute = attributable.getAttribute(schema);
if (attribute != null) {
values = attribute.getValuesAsStrings();
if (values != null && !values.isEmpty()) {
accountPolicy.getWordsNotPermitted().add(values.get(0));
}
}
}
result = (T) accountPolicy;