ValidationMessageBuilder builder = new ValidationMessageBuilder(BUNDLE,
MESSAGE_KEY_MAPPINGS, new Object[]{resource.getName()});
// Perform the validation and store the result of the validation.
ValidationStatus status =
policyNameValidator.validate(resource.getName(), builder);
if (status.getSeverity() == ValidationStatus.ERROR) {
valid = false;
} else if (status.getSeverity() == ValidationStatus.WARNING) {
valid = false;