01: /*
02: * $Header: /cvsroot/jvalidate/jvalidate-framework/jvalidate/src/main/java/nl/knowlogy/validation/PropertyValidation.java,v 1.4 2007/11/11 14:34:36 roberthofstra Exp $
03: * $Revision: 1.4 $
04: * $Date: 2007/11/11 14:34:36 $
05: *
06: *
07: * Created on Oct 6, 2004
08: *
09: * All right reserved(c) 2004, Knowlogy
10: *
11: * Copyright 2004 - 2005 Knowlogy, the Netherlands. All rights reserved.
12: * All Knowlogy brand and product names are trademarks or registered trademarks
13: * of Knowlogy in the Netherlands and other countries.
14: *
15: * No part of this publication may be reproduced, transmitted, stored in a retrieval system,
16: * or translated into any human or computer language, in any form, or by any means, electronic,
17: * mechanical, magnetic, optical, chemical, manual, or otherwise,
18: * without the prior written permission of the copyright owner, Knowlogy.
19: *
20: */
21: package nl.knowlogy.validation;
22:
23: /**
24: * Interface for validation of a specific property of a class
25: * identified with propertyName.
26: *
27: * @author <a href="mailto:robert.hofstra@knowlogy.nl">Robert Hofstra, Knowlogy</a>
28: */
29: public interface PropertyValidation {
30:
31: /**
32: * Returns the propertyName from the property which this propertyValidation
33: * is validating.
34: *
35: * @return the propertyName from the property which this propertyValidation
36: * is validating.
37: */
38: String getPropertyName();
39:
40: /**
41: * Validates the property value of object obj. In case of any validation
42: * errors, an they are added to the errors object.
43: *
44: * @param value
45: * propertyvalue to be validated.
46: * @param errors
47: * errors object to which any validation errors are added.
48: */
49: void doValidatePropertyValue(Object object, Object propertyValue,
50: Messages errors);
51:
52: }
|