public SmooksResourceConfiguration findBeanCreatorConfig(String beanId, ExtensionContext extensionContext) { List<SmooksResourceConfiguration> creatorConfigs = extensionContext.lookupResource(new ConfigSearch().resource(BeanInstanceCreator.class.getName()).param("beanId", beanId)); if(creatorConfigs.size() > 1) { throw new SmooksConfigurationException("Multiple <jb:bean> configurations exist for beanId '" + beanId + "'. " + "In this case you must set the selector in the '" + selectorAttrName + "' attribute because Smooks can't select a sensible default."); } if(creatorConfigs.size() == 1) { return creatorConfigs.get(0); } return null; }
public SmooksResourceConfiguration findBeanCreatorConfig(String beanId, ExtensionContext extensionContext) { List<SmooksResourceConfiguration> creatorConfigs = extensionContext.lookupResource(new ConfigSearch().resource(BeanInstancePopulator.class.getName()).param("wireBeanId", beanId)); if(creatorConfigs.size() > 1) { throw new SmooksConfigurationException("Multiple <jb:wiring> configurations exist for beanId '" + beanId + "'. " + "In this case you must set the selector in the '" + selectorAttrName + "' attribute because Smooks can't select a sensible default."); } if(creatorConfigs.size() == 1) { return creatorConfigs.get(0); } return null; }
public static SmooksResourceConfiguration findBeanCreatorConfig(String beanId, ExecutionContext executionContext) { ExtensionContext extensionContext = ExtensionContext.getExtensionContext(executionContext); List<SmooksResourceConfiguration> creatorConfigs = extensionContext.lookupResource(new ConfigSearch().resource(BeanInstanceCreator.class.getName()).param("beanId", beanId)); if(creatorConfigs.size() > 1) { throw new SmooksConfigurationException("Multiple <jb:bean> configurations exist for beanId '" + beanId + "'. 'beanId' values must be unique."); } return creatorConfigs.get(0); } }
public static SmooksResourceConfiguration findBeanCreatorConfig(String beanId, ExecutionContext executionContext) { ExtensionContext extensionContext = ExtensionContext.getExtensionContext(executionContext); List<SmooksResourceConfiguration> creatorConfigs = extensionContext.lookupResource(new ConfigSearch().resource(BeanInstanceCreator.class.getName()).param("beanId", beanId)); if(creatorConfigs.size() > 1) { throw new SmooksConfigurationException("Multiple <jb:bean> configurations exist for beanId '" + beanId + "'. 'beanId' values must be unique."); } return creatorConfigs.get(0); } }
public static SmooksResourceConfiguration findBeanCreatorConfig(String beanId, ExecutionContext executionContext) { ExtensionContext extensionContext = ExtensionContext.getExtensionContext(executionContext); List<SmooksResourceConfiguration> creatorConfigs = extensionContext.lookupResource(new ConfigSearch().resource(BeanInstanceCreator.class.getName()).param("beanId", beanId)); if(creatorConfigs.size() > 1) { throw new SmooksConfigurationException("Multiple <jb:bean> configurations exist for beanId '" + beanId + "'. 'beanId' values must be unique."); } return creatorConfigs.get(0); } }