Coverage Report - org.mule.module.jbpm.MuleSendBinding
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleSendBinding
0%
0/13
0%
0/8
0
 
 1  
 /*
 2  
  * $Id: MuleSendBinding.java 20003 2010-10-26 01:59:13Z tcarlson $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.module.jbpm;
 12  
 
 13  
 import org.jbpm.jpdl.internal.activity.JpdlBinding;
 14  
 import org.jbpm.jpdl.internal.xml.JpdlParser;
 15  
 import org.jbpm.pvm.internal.util.XmlUtil;
 16  
 import org.jbpm.pvm.internal.xml.Parse;
 17  
 import org.w3c.dom.Element;
 18  
 
 19  
 public class MuleSendBinding extends JpdlBinding
 20  
 {
 21  
     public MuleSendBinding()
 22  
     {
 23  0
         super("mule-send");
 24  0
     }
 25  
 
 26  
     @Override
 27  
     public Object parseJpdl(Element element, Parse parse, JpdlParser parser)
 28  
     {
 29  0
         MuleSendActivity activity = new MuleSendActivity();
 30  
 
 31  0
         activity.setEndpoint(XmlUtil.attribute(element, "endpoint", parse));
 32  
 
 33  0
         if (element.hasAttribute("exchange-pattern"))
 34  
         {
 35  0
             activity.setMessageExchangePattern((XmlUtil.attribute(element, "exchange-pattern", parse)));
 36  
         }
 37  
         
 38  0
         if (element.hasAttribute("expr"))
 39  
         {
 40  0
                 activity.setPayloadExpression(XmlUtil.attribute(element, "expr", parse));
 41  
         }
 42  
         
 43  0
         if (element.hasAttribute("var"))
 44  
         {
 45  0
                 activity.setResponseVariableName(XmlUtil.attribute(element, "var", parse));
 46  
         }
 47  
         
 48  0
         if (element.hasAttribute("type"))
 49  
         {
 50  0
                 activity.setResponsePayloadClass(XmlUtil.attribute(element, "type", parse));
 51  
         }
 52  
 
 53  0
         return activity;
 54  
     }
 55  
 }