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