1
2
3
4
5
6
7 package org.mule.config.spring.parsers.processors;
8
9 import org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration;
10
11 import org.w3c.dom.Element;
12
13
14
15
16
17 public class CheckRequiredAttributesWhenNoChildren extends CheckRequiredAttributes
18 {
19 private String elementName;
20
21 public CheckRequiredAttributesWhenNoChildren(String[][] attributeNames, String elementName)
22 {
23 super(attributeNames);
24 this.elementName = elementName;
25 }
26
27 public void preProcess(PropertyConfiguration config, Element element)
28 {
29
30 if (element.getElementsByTagName(elementName).getLength() > 0)
31 {
32 return;
33 }
34 super.preProcess(config, element);
35 }
36 }