java.lang.Object
org.eclipse.persistence.jaxb.ValidationXMLReader
Detects external Bean Validation configuration.
Strategy:
1. Parse validation.xml, looking for a constraints-file reference.
2. For each reference, if file is found, parses the constraints file and puts all classes declared under
<bean class="clazz"> into constraintsOnClasses
field
of BeanValidationHelper
class
with Boolean.TRUE
value.
This class contains resources-burdening instance fields (e.g. SAXParser) and as such was designed to be instantiated
once (make the instance BOUNDED) and have call()
method called on that instance once.
Not suitable for singleton (memory burden). The method #parse() will be invoked only once per class load of this class. After that the instance and all its fields should be made collectible by GC.
- Since:
- 2.6
-
Field Details
-
DEFAULT_PACKAGE_QNAME
- See Also:
-
BEAN_QNAME
- See Also:
-
CONSTRAINT_MAPPING_QNAME
- See Also:
-
CLASS_QNAME
- See Also:
-
PACKAGE_SEPARATOR
- See Also:
-
-
Constructor Details
-
ValidationXMLReader
public ValidationXMLReader()
-
-
Method Details
-
call
Parses validation.xml. -
isValidationXmlPresent
public static boolean isValidationXmlPresent()Checks if validation.xml exists.
-