View Javadoc

1   package com.loribel.commons.abstraction;
2   
3   /***
4    * Interface for Objects witch can accept validations.
5    *
6    * @author Grégory Borelli
7    */
8   public interface GB_Validable
9   {
10      /*** VALID. */
11      int VALID = 0;
12  
13      /*** WARNING_CHILD. */
14      int WARNING_CHILD = 1;
15  
16      /*** WARNING. */
17      int WARNING = 2;
18  
19      /*** ERROR_CHILD. */
20      int ERROR_CHILD = 3;
21  
22      /*** ERROR. */
23      int ERROR = 4;
24  
25      /***
26       * Returns the status of validation.
27       *
28       * @return int
29       */
30      int getValidStatus();
31  
32      /***
33       * Returns the messages list.
34       * Must return null, if the validation is VALID.
35       *
36       * @return String[]
37       */
38      String[] getErrorMessages();
39  
40  }