public boolean handleError(Exception e,Object source,String fieldName) { return handleEvent( new ValidationEventImpl( ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorExImpl(source,fieldName), e)); }
/** * Returns a nice string representation for better debug experience. */ public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[url="); buf.append(getURL()); buf.append(",line="); buf.append(getLineNumber()); buf.append(",column="); buf.append(getColumnNumber()); buf.append(",node="); buf.append(getNode()); buf.append(",object="); buf.append(getObject()); buf.append(",field="); buf.append(getFieldName()); buf.append("]"); return buf.toString(); } }
/** * Returns a nice string representation for better debug experience. */ public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[url="); buf.append(getURL()); buf.append(",line="); buf.append(getLineNumber()); buf.append(",column="); buf.append(getColumnNumber()); buf.append(",node="); buf.append(getNode()); buf.append(",object="); buf.append(getObject()); buf.append(",field="); buf.append(getFieldName()); buf.append("]"); return buf.toString(); } }
public ValidationEventLocator getCurrentLocation(String fieldName) { return new ValidationEventLocatorExImpl(cycleDetectionStack.peek(),fieldName); }
/** * Returns a nice string representation for better debug experience. */ public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[url="); buf.append(getURL()); buf.append(",line="); buf.append(getLineNumber()); buf.append(",column="); buf.append(getColumnNumber()); buf.append(",node="); buf.append(getNode()); buf.append(",object="); buf.append(getObject()); buf.append(",field="); buf.append(getFieldName()); buf.append("]"); return buf.toString(); } }
public boolean handleError(Exception e,Object source,String fieldName) { return handleEvent( new ValidationEventImpl( ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorExImpl(source,fieldName), e)); }
/** * Returns a nice string representation for better debug experience. */ public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[url="); buf.append(getURL()); buf.append(",line="); buf.append(getLineNumber()); buf.append(",column="); buf.append(getColumnNumber()); buf.append(",node="); buf.append(getNode()); buf.append(",object="); buf.append(getObject()); buf.append(",field="); buf.append(getFieldName()); buf.append("]"); return buf.toString(); } }
public ValidationEventLocator getCurrentLocation(String fieldName) { return new ValidationEventLocatorExImpl(cycleDetectionStack.peek(),fieldName); }
public boolean handleError(Exception e,Object source,String fieldName) { return handleEvent( new ValidationEventImpl( ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorExImpl(source,fieldName), e)); }
public boolean handleError(Exception e,Object source,String fieldName) { return handleEvent( new ValidationEventImpl( ValidationEvent.ERROR, e.getMessage(), new ValidationEventLocatorExImpl(source,fieldName), e)); }
/** * Creates a {@link ValidationEvent} object for an error where * a JAXB object is missing a required field. * * @return always returns non-null valid object. */ public static ValidationEvent createMissingObjectError( Object target, String fieldName ) { return new ValidationEventImpl( ValidationEvent.ERROR, Messages.format(Messages.MISSING_OBJECT,fieldName), new ValidationEventLocatorExImpl(target,fieldName), new NullPointerException() ); } }
public ValidationEventLocator getCurrentLocation(String fieldName) { return new ValidationEventLocatorExImpl(cycleDetectionStack.peek(),fieldName); }
public ValidationEventLocator getCurrentLocation(String fieldName) { return new ValidationEventLocatorExImpl(cycleDetectionStack.peek(),fieldName); }
/** * 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( ValidationEvent.ERROR, // maybe it should be a fatal error. Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject) ), new ValidationEventLocatorExImpl(parentObject,fieldName) ); serializer.reportError(ve); }
/** * 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( ValidationEvent.ERROR, // maybe it should be a fatal error. Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject) ), new ValidationEventLocatorExImpl(parentObject,fieldName) ); serializer.reportError(ve); }
/** * 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( ValidationEvent.ERROR, // maybe it should be a fatal error. Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject) ), new ValidationEventLocatorExImpl(parentObject,fieldName) ); serializer.reportError(ve); }
/** * 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( ValidationEvent.ERROR, // maybe it should be a fatal error. Messages.format(Messages.ERR_TYPE_MISMATCH, getUserFriendlyTypeName(parentObject), fieldName, getUserFriendlyTypeName(childObject) ), new ValidationEventLocatorExImpl(parentObject,fieldName) ); serializer.reportError(ve); }