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