Search in sources :

Example 1 with ValidationEventLocatorExImpl

use of com.sun.xml.bind.util.ValidationEventLocatorExImpl in project OpenAM by OpenRock.

the class Util method handleTypeMismatchError.

/**
     * Reports that the type of an object in a property is unexpected.  
     */
public static void handleTypeMismatchError(XMLSerializer serializer, Object parentObject, String fieldName, Object childObject) throws AbortSerializationException {
    ValidationEvent ve = new ValidationEventImpl(// maybe it should be a fatal error.
    ValidationEvent.ERROR, Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject)), new ValidationEventLocatorExImpl(parentObject, fieldName));
    serializer.reportError(ve);
}
Also used : ValidationEventImpl(javax.xml.bind.helpers.ValidationEventImpl) ValidationEvent(javax.xml.bind.ValidationEvent) ValidationEventLocatorExImpl(com.sun.xml.bind.util.ValidationEventLocatorExImpl)

Example 2 with ValidationEventLocatorExImpl

use of com.sun.xml.bind.util.ValidationEventLocatorExImpl in project OpenAM by OpenRock.

the class Util method handleTypeMismatchError.

/**
     * Reports that the type of an object in a property is unexpected.  
     */
public static void handleTypeMismatchError(XMLSerializer serializer, Object parentObject, String fieldName, Object childObject) throws AbortSerializationException {
    ValidationEvent ve = new ValidationEventImpl(// maybe it should be a fatal error.
    ValidationEvent.ERROR, Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject)), new ValidationEventLocatorExImpl(parentObject, fieldName));
    serializer.reportError(ve);
}
Also used : ValidationEventImpl(javax.xml.bind.helpers.ValidationEventImpl) ValidationEvent(javax.xml.bind.ValidationEvent) ValidationEventLocatorExImpl(com.sun.xml.bind.util.ValidationEventLocatorExImpl)

Example 3 with ValidationEventLocatorExImpl

use of com.sun.xml.bind.util.ValidationEventLocatorExImpl in project OpenAM by OpenRock.

the class Util method handleTypeMismatchError.

/**
     * Reports that the type of an object in a property is unexpected.  
     */
public static void handleTypeMismatchError(XMLSerializer serializer, Object parentObject, String fieldName, Object childObject) throws AbortSerializationException {
    ValidationEvent ve = new ValidationEventImpl(// maybe it should be a fatal error.
    ValidationEvent.ERROR, Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject)), new ValidationEventLocatorExImpl(parentObject, fieldName));
    serializer.reportError(ve);
}
Also used : ValidationEventImpl(javax.xml.bind.helpers.ValidationEventImpl) ValidationEvent(javax.xml.bind.ValidationEvent) ValidationEventLocatorExImpl(com.sun.xml.bind.util.ValidationEventLocatorExImpl)

Example 4 with ValidationEventLocatorExImpl

use of com.sun.xml.bind.util.ValidationEventLocatorExImpl in project OpenAM by OpenRock.

the class Util method handleTypeMismatchError.

/**
     * Reports that the type of an object in a property is unexpected.  
     */
public static void handleTypeMismatchError(XMLSerializer serializer, Object parentObject, String fieldName, Object childObject) throws AbortSerializationException {
    ValidationEvent ve = new ValidationEventImpl(// maybe it should be a fatal error.
    ValidationEvent.ERROR, Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject)), new ValidationEventLocatorExImpl(parentObject, fieldName));
    serializer.reportError(ve);
}
Also used : ValidationEventImpl(javax.xml.bind.helpers.ValidationEventImpl) ValidationEvent(javax.xml.bind.ValidationEvent) ValidationEventLocatorExImpl(com.sun.xml.bind.util.ValidationEventLocatorExImpl)

Aggregations

ValidationEventLocatorExImpl (com.sun.xml.bind.util.ValidationEventLocatorExImpl)4 ValidationEvent (javax.xml.bind.ValidationEvent)4 ValidationEventImpl (javax.xml.bind.helpers.ValidationEventImpl)4