final String content ) {
try {
final KieProject project = projectService.resolveProject( path );
final KieModule module = builderCache.assertBuilder( project ).getKieModuleIgnoringErrors();
final ClassLoader classLoader = KieModuleMetaData.Factory.newKieModuleMetaData( module ).getClassLoader();
final DataEnumLoader loader = new DataEnumLoader( content,
classLoader );
if ( !loader.hasErrors() ) {
return Collections.emptyList();
} else {
final List<ValidationMessage> validationMessages = new ArrayList<ValidationMessage>();
final List<String> loaderErrors = loader.getErrors();
for ( final String message : loaderErrors ) {
validationMessages.add( makeValidationMessages( path,
message ) );
}