} else if (attribute.getName().equals("user-roles")) {
userRoles = attribute.getValue().split("\\s");
} else if (attribute.getName().equals("profiles")) {
profiles = attribute.getValue().split("\\s");
} else {
throw new ConfigurationParsingException("Configuration error: " + attribute.getName() + " attribute "
+ "is not approved in condition element!");
}
}
if (expression == null) {
throw new ConfigurationParsingException(
"Configuration error: expression attribute must be defined in element condition!");
}
if (tagPath == null) {
throw new ConfigurationParsingException(
"Configuration error: tag attribute must be defined in element condition!");
}
return new ConditionGuard(expression, tagPath, profiles, userRoles);
}