1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.caleigo.core;
20
21 /*** <Description of IDataValidator>
22 *
23 * @author Dennis Zikovic
24 * @version 1.00
25 *
26 *//*
27 *
28 * WHEN WHO WHY & WHAT
29 * ------------------------------------------------------------------------------
30 * 2002-09-11 Dennis Zikovic Creation
31 */
32 public interface IDataValidator
33 {
34
35
36 /*** This method returns true if the called IDataValidator can validate
37 * data in the context of the provided IDataProvider object.
38 */
39 public boolean canValidate(IDataProvider dataProvider);
40
41 /*** This method returns true if the provided data is valid in the context
42 * of the provided IDataProvider object.
43 */
44 public boolean isDataValid(Object data, IDataProvider dataProvider);
45
46 /*** Returs an end-user displayable text describing the failed validation.
47 */
48 public String getInvalidMessage(Object data, IDataProvider dataProvider);
49 }