use of org.kie.server.services.dmn.ModelEvaluatorServiceBase in project droolsjbpm-integration by kiegroup.
the class DMNRestApplicationComponentsService method getAppComponents.
@Override
public Collection<Object> getAppComponents(String extension, SupportedTransports type, Object... services) {
// skip calls from other than owning extension
if (!OWNER_EXTENSION.equals(extension)) {
return Collections.emptyList();
}
ModelEvaluatorServiceBase modelEvaluatorService = null;
KieServerRegistry context = null;
for (Object object : services) {
// in case given service is null (meaning was not configured) continue with next one
if (object == null) {
continue;
}
if (ModelEvaluatorServiceBase.class.isAssignableFrom(object.getClass())) {
modelEvaluatorService = (ModelEvaluatorServiceBase) object;
continue;
} else if (KieServerRegistry.class.isAssignableFrom(object.getClass())) {
context = (KieServerRegistry) object;
continue;
}
}
List<Object> components = new ArrayList<Object>(1);
components.add(new ModelEvaluatorResource(modelEvaluatorService));
return components;
}
Aggregations