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(); } DroolsFrameworkRulesExecutionService rulesExecutionService = null; KieServerRegistry context = null; for (Object object : services) { if (DroolsFrameworkRulesExecutionService.class.isAssignableFrom(object.getClass())) { DroolsFrameworkRulesExecutionService droolsFrameworkRulesExecutionService = (DroolsFrameworkRulesExecutionService) object; context = droolsFrameworkRulesExecutionService.getContext(); rulesExecutionService = droolsFrameworkRulesExecutionService; continue; } } List<Object> components = new ArrayList<Object>(1); if (SupportedTransports.REST.equals(type)) { components.add(new CarInsuranceResource(rulesExecutionService, context)); } return components; }
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(); } DroolsFrameworkRulesExecutionService rulesExecutionService = null; KieServerRegistry context = null; for (Object object : services) { if (DroolsFrameworkRulesExecutionService.class.isAssignableFrom(object.getClass())) { DroolsFrameworkRulesExecutionService droolsFrameworkRulesExecutionService = (DroolsFrameworkRulesExecutionService) object; context = droolsFrameworkRulesExecutionService.getContext(); rulesExecutionService = droolsFrameworkRulesExecutionService; continue; } } List<Object> components = new ArrayList<Object>(1); if (SupportedTransports.REST.equals(type)) { components.add(new LoyaltyResource(rulesExecutionService, context)); } return components; }
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(); } DroolsFrameworkRulesExecutionService rulesExecutionService = null; KieServerRegistry context = null; for (Object object : services) { if (DroolsFrameworkRulesExecutionService.class.isAssignableFrom(object.getClass())) { DroolsFrameworkRulesExecutionService droolsFrameworkRulesExecutionService = (DroolsFrameworkRulesExecutionService) object; context = droolsFrameworkRulesExecutionService.getContext(); rulesExecutionService = droolsFrameworkRulesExecutionService; continue; } } List<Object> components = new ArrayList<Object>(1); if (SupportedTransports.REST.equals(type)) { components.add(new GenericResource(rulesExecutionService, context)); } return components; }