1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
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 | |
|
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 | |
} |