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 | 0 | super(attributeNames); |
24 | 0 | this.elementName = elementName; |
25 | 0 | } |
26 | |
|
27 | |
public void preProcess(PropertyConfiguration config, Element element) |
28 | |
{ |
29 | |
|
30 | 0 | if (element.getElementsByTagName(elementName).getLength() > 0) |
31 | |
{ |
32 | 0 | return; |
33 | |
} |
34 | 0 | super.preProcess(config, element); |
35 | 0 | } |
36 | |
} |