public void addPlugInView(String namespace, String name, String viewFactoryClass) { ConfigurationPlugInView configurationPlugInView = new ConfigurationPlugInView(); configurationPlugInView.setNamespace(namespace); configurationPlugInView.setName(name); configurationPlugInView.setFactoryClassName(viewFactoryClass); plugInViews.addViews( Collections.singletonList(configurationPlugInView), Collections.<ConfigurationPlugInVirtualDataWindow>emptyList()); }
protected static ExceptionHandlingService initExceptionHandling( String engineURI, ConfigurationEngineDefaults.ExceptionHandling exceptionHandling, ConfigurationEngineDefaults.ConditionHandling conditionHandling) throws ConfigurationException { List<ExceptionHandler> exceptionHandlers; if (exceptionHandling.getHandlerFactories() == null || exceptionHandling.getHandlerFactories().isEmpty()) { exceptionHandlers = Collections.emptyList(); } else { exceptionHandlers = new ArrayList<ExceptionHandler>(); ExceptionHandlerFactoryContext context = new ExceptionHandlerFactoryContext(engineURI); for (String className : exceptionHandling.getHandlerFactories()) { try { ExceptionHandlerFactory factory = (ExceptionHandlerFactory) JavaClassHelper.instantiate(ExceptionHandlerFactory.class, className); ExceptionHandler handler = factory.getHandler(context); if (handler == null) { log.warn( "Exception handler factory '" + className + "' returned a null handler, skipping factory"); continue; } exceptionHandlers.add(handler); } catch (RuntimeException ex) { throw new ConfigurationException( "Exception initializing exception handler from exception handler factory '" + className + "': " + ex.getMessage(), ex); } } } List<ConditionHandler> conditionHandlers; if (conditionHandling.getHandlerFactories() == null || conditionHandling.getHandlerFactories().isEmpty()) { conditionHandlers = Collections.emptyList(); } else { conditionHandlers = new ArrayList<ConditionHandler>(); ConditionHandlerFactoryContext context = new ConditionHandlerFactoryContext(engineURI); for (String className : conditionHandling.getHandlerFactories()) { try { ConditionHandlerFactory factory = (ConditionHandlerFactory) JavaClassHelper.instantiate(ConditionHandlerFactory.class, className); ConditionHandler handler = factory.getHandler(context); if (handler == null) { log.warn( "Condition handler factory '" + className + "' returned a null handler, skipping factory"); continue; } conditionHandlers.add(handler); } catch (RuntimeException ex) { throw new ConfigurationException( "Exception initializing exception handler from exception handler factory '" + className + "': " + ex.getMessage(), ex); } } } return new ExceptionHandlingService(engineURI, exceptionHandlers, conditionHandlers); }