private void bindExpressionValue(ExecutionContext executionContext) { Map<String, Object> beanMap = executionContext.getBeanContext().getBeanMap(); Object dataObject = expression.getValue(beanMap); if (dataObject instanceof String) { populateAndSetPropertyValue((String) dataObject, executionContext); } else { populateAndSetPropertyValue(dataObject, executionContext); } }
private void wireObject(ExecutionContext executionContext) { BeanContext beanContext = executionContext.getBeanContext(); Map<String, Object> beanMap = beanContext.getBeanMap(); Object key = keyExtractor.getValue(beanMap); @SuppressWarnings("unchecked") // TODO: Optimize to use the BeanId object Map<Object, Object> map = (Map<Object, Object>) beanContext.getBean(mapBindingKey); Object record = beanContext.getBean(RECORD_BEAN); map.put(key, record); }
private void bindBeanValue(final ExecutionContext executionContext) { final BeanContext beanContext = executionContext.getBeanContext(); Object bean = beanContext.getBean(wireBeanId); if (bean == null) { // Register the observer which looks for the creation of the selected bean via its beanIdName. // When this observer is triggered then // we look if we got something we can set immediately or that we got an array collection. For // an array collection we need the array representation // and not the list representation. So we register and observer who looks for the change from // the list to the array BeanRuntimeInfo wiredBeanRI = getWiredBeanRuntimeInfo(); beanContext.addObserver(new BeanCreateLifecycleObserver(wireBeanId, this, wiredBeanRI)); } else { populateAndSetPropertyValue(bean, executionContext); } }