|
Oracle® Fusion Middleware Java API Reference for EclipseLink 11g Release 1 (11.1.1) E26376-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
org.eclipse.persistence.jaxb.JAXBValidator
public class JAXBValidator
Facilitates JAXBValidation.
| Constructor Summary | |
|---|---|
JAXBValidator(XMLValidator newValidator)This constructor creates a DefaultValidationEventHandlervalidation instance, and sets the XMLMarshaller instance to the one provided. |
|
| Method Summary | |
|---|---|
ValidationEventHandler |
getEventHandler()Return the current event handler or the default event handler if one hasn't been set. |
java.lang.Object |
getProperty(java.lang.String key)Get the particular property in the underlying implementation of Validator. |
void |
setEventHandler(ValidationEventHandler newValidationEventHandler)Allow an application to register a validation event handler. |
void |
setProperty(java.lang.String key, java.lang.Object value)Set the particular property in the underlying implementation of Validator. |
boolean |
validate(java.lang.Object object)Validate a non-root object against a schema. |
boolean |
validateRoot(java.lang.Object rootObject)Validate a root object against a schema. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JAXBValidator(XMLValidator newValidator)
newXMLMarshaller -| Method Detail |
|---|
public boolean validateRoot(java.lang.Object rootObject)
throws JAXBException
validateRoot in interface ValidatorrootObject - - the root object to be validatedJAXBExceptionValidationException - If the ValidationEventHandler returns false from its handleEvent method or the Validator is unable to validate the content tree rooted at rootObj
public boolean validate(java.lang.Object object)
throws JAXBException
validate in interface Validatorobject - - the object to be validatedJAXBExceptionValidationException - If the ValidationEventHandler returns false from its handleEvent method or the Validator is unable to validate the content tree rooted at subrootObj
public void setEventHandler(ValidationEventHandler newValidationEventHandler)
throws JAXBException
ValidatorThe validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to validate. If the client application does not register a validation event handler before invoking the validate method, then validation events will be handled by the default event handler which will terminate the validate operation after the first error or fatal error is encountered.
Calling this method with a null parameter will cause the Validator to revert back to the default default event handler.
setEventHandler in interface ValidatornewValidationEventHandler - the validation event handlerJAXBException - if an error was encountered while setting the event handler
public ValidationEventHandler getEventHandler()
throws JAXBException
ValidatorgetEventHandler in interface ValidatorJAXBException - if an error was encountered while getting the current event handler
public void setProperty(java.lang.String key,
java.lang.Object value)
throws PropertyException
ValidatorsetProperty in interface Validatorkey - the name of the property to be set. This value can either be specified using one of the constant fields or a user supplied string.value - the value of the property to be setPropertyException - when there is an error processing the given property or value
public java.lang.Object getProperty(java.lang.String key)
throws PropertyException
ValidatorgetProperty in interface Validatorkey - the name of the property to retrievePropertyException - when there is an error retrieving the given property or value property name
|
Oracle® Fusion Middleware Java API Reference for EclipseLink 11g Release 1 (11.1.1) E26376-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||