@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(); } KieContainerCommandService batchCommandService = null; KieServerRegistry context = null; for( Object object : services ) { if( KieContainerCommandService.class.isAssignableFrom(object.getClass()) ) { batchCommandService = (KieContainerCommandService) object; continue; } else if( KieServerRegistry.class.isAssignableFrom(object.getClass()) ) { context = (KieServerRegistry) object; continue; } } List<Object> components = new ArrayList<Object>(1); if( SupportedTransports.REST.equals(type) ) { components.add(new CommandResource(batchCommandService, 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 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; }