コード例 #1
0
 /* (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;
 }
コード例 #2
0
  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);
    }
  }
コード例 #3
0
    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);
    }
コード例 #4
0
 public boolean consumes(Object object) {
   return keyExtractor.getExpression().indexOf(object.toString()) != -1;
 }
コード例 #5
0
 private MapBindingWiringVisitor(String bindKeyField, String mapBindingKey) {
   keyExtractor.setExpression(RECORD_BEAN + "." + bindKeyField);
   this.mapBindingKey = mapBindingKey;
 }