/* (non-Javadoc) * @see org.milyn.delivery.ordering.Consumer#consumes(java.lang.String) */ public boolean consumes(Object object) { if (wireBeanIdName != null && object.equals(wireBeanIdName)) { return true; } else if (expression != null && expression.getExpression().indexOf(object.toString()) != -1) { return true; } return false; }
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); }
public boolean consumes(Object object) { return keyExtractor.getExpression().indexOf(object.toString()) != -1; }
private MapBindingWiringVisitor(String bindKeyField, String mapBindingKey) { keyExtractor.setExpression(RECORD_BEAN + "." + bindKeyField); this.mapBindingKey = mapBindingKey; }