Coverage Report - org.mule.tools.visualizer.processor.ConnectionStrategyProcessor
 
Classes in this File Line Coverage Branch Coverage Complexity
ConnectionStrategyProcessor
0%
0/13
0%
0/2
1.5
 
 1  
 /*
 2  
  * $Id: ConnectionStrategyProcessor.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.tools.visualizer.processor;
 12  
 
 13  
 import org.mule.tools.visualizer.config.ColorRegistry;
 14  
 import org.mule.tools.visualizer.config.GraphEnvironment;
 15  
 import org.mule.tools.visualizer.util.MuleTag;
 16  
 
 17  
 import com.oy.shared.lm.graph.Graph;
 18  
 import com.oy.shared.lm.graph.GraphNode;
 19  
 
 20  
 import org.jdom.Element;
 21  
 
 22  
 public class ConnectionStrategyProcessor extends TagProcessor
 23  
 {
 24  
 
 25  
     public ConnectionStrategyProcessor(GraphEnvironment environment)
 26  
     {
 27  0
         super(environment);
 28  0
     }
 29  
 
 30  
     public void process(Graph graph, Element currentElement, GraphNode parent)
 31  
     {
 32  
         // Process connection strategy
 33  0
         Element cs = currentElement.getChild(MuleTag.ELEMENT_CONNECTION_STRATEGY);
 34  0
         if (cs != null)
 35  
         {
 36  0
             GraphNode csNode = graph.addNode();
 37  0
             csNode.getInfo().setFillColor(ColorRegistry.COLOR_CONNECTION_STRATEGY);
 38  0
             csNode.getInfo().setHeader(cs.getAttributeValue(MuleTag.ATTRIBUTE_CLASS_NAME));
 39  
 
 40  0
             StringBuffer caption = new StringBuffer();
 41  0
             appendProperties(cs, caption);
 42  0
             appendDescription(cs, caption);
 43  0
             csNode.getInfo().setCaption(caption.toString());
 44  0
             addRelation(graph, parent, csNode, null);
 45  
         }
 46  0
     }
 47  
 }