@Test public void testLoadDataObjects_NoJavaFilesAvailable() { final List<DataObject> dataObjects = service.loadDataObjects(workspaceProject); assertThat(dataObjects).isEmpty(); }
@Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected  DataObjectsServiceImpl(); @Inject  DataObjectsServiceImpl(final DataModelService dataModelService,
                                  final ModuleClassLoaderHelper moduleClassLoaderHelper,
                                  final KieModuleService moduleService); }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected  DataObjectsServiceImpl(); @Inject  DataObjectsServiceImpl(final DataModelService dataModelService,
                                  final ModuleClassLoaderHelper moduleClassLoaderHelper,
                                  final KieModuleService moduleService); @Override List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject); }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected  DataObjectsServiceImpl(); @Inject  DataObjectsServiceImpl(final DataModelService dataModelService,
                                  final ModuleClassLoaderHelper moduleClassLoaderHelper,
                                  final KieModuleService moduleService); @Override List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject);  }