KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > input > validators > ErrorConstants


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.input.validators;
21
22 import com.sslexplorer.boot.PropertyValidator;
23
24
25 /**
26  * Constants for default {@link PropertyValidator} error codes.
27  *
28  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
29  */

30 public class ErrorConstants {
31
32     /*
33      * Prevent instantiation
34      */

35     private ErrorConstants() {
36     }
37     
38     /**
39      * Category name
40      */

41     public final static String JavaDoc CATEGORY_NAME = "validation";
42     
43     /**
44      * Bundle
45      */

46     public final static String JavaDoc BUNDLE_NAME = "validators";
47     
48     /**
49      * Internal error. A validator failed.
50      */

51     public final static int ERR_INTERNAL_ERROR = 1;
52     
53     /**
54      * A supplied integer did not fall between the specified minimu
55      * and maximum values. <code>arg0</code> will be the minimum allowed,
56      * <code>arg1</code> will be the maximum, <code>arg2</code> will be
57      * the actual value supplied.
58      */

59     public final static int ERR_INTEGER_OUT_OF_RANGE = 2;
60     
61     /**
62      * A supplied value was not an integer. <code>arg0</code> will be the
63      * actual value supplied.
64      */

65     public final static int ERR_NOT_AN_INTEGER = 3;
66
67     /**
68      * String length is less than the specified minimum. <code>arg0</code> will
69      * contain the minimum length, <code>arg1</code> will contain the maximum
70      * and <code>arg2</code> will contain the value.
71      */

72     public static final int ERR_STRING_TOO_SHORT = 4;
73
74
75     /**
76      * String length is greater than the specified maximum. <code>arg0</code> will
77      * contain the minimum length, <code>arg1</code> will contain the maximum
78      * and <code>arg2</code> will contain the value.
79      */

80     public static final int ERR_STRING_TOO_LONG = 5;
81
82     /**
83      * String doesn't match specifed regular expression. <code>arg0</code> will
84      * contain the regular expression, <code>arg1</code> will contain the value
85      */

86     public static final int ERR_STRING_DOESNT_MATCH_REGEXP = 6;
87
88     /**
89      * String doesn't match specifed simple pattern. <code>arg0</code> will
90      * contain the pattern, <code>arg1</code> will contain the value
91      */

92     public static final int ERR_STRING_DOESNT_MATCH_SIMPLE_PATTERN = 7;
93     
94     /**
95      * String isn't a valid IP Address. <code>arg0</code> will contain the value
96      */

97     public static final int ERR_STRING_ISNT_IP_ADDRESS = 8;
98
99     /**
100      * String contains non-ascii characters.
101      */

102     public static final int ERR_STRING_NON_ASCII = 9;
103     
104     /**
105      * String isn't a valid DN.
106      */

107     public static final int ERR_STRING_NON_DN = 10;
108     
109     /**
110      * String isn't a valid boolean (as defined by typeMeta).
111      */

112     public static final int ERR_INVALID_BOOLEAN = 11;
113     
114     /**
115      * Theme can't be empty. The default Theme is /theme/default.
116      * <code>arg0</code> will contain the value, <code>arg1</code> will
117      * contain the default
118      */

119     public static final int ERR_EMPTY_THEME = 12;
120     /**
121      * String isn't a valid Theme. <code>arg0</code> will contain the value
122      */

123     public static final int ERR_INVALID_THEME = 13;
124     
125     /**
126      * String doesn't match specifed IP address patter. <code>arg0</code> will
127      * contain the regular expression, <code>arg1</code> will contain the value
128      */

129     public static final int ERR_STRING_ISNT_IP_ADDRESS_PATTERN = 14;
130
131     /**
132      * String isn't a hostname / ip address with an optional port.
133      */

134     public static final int ERR_STRING_ISNT_HOSTNAME_OR_IPADDRESS_WITH_PORT = 15;
135
136     /**
137      * String isn't a hostname / ip address.
138      */

139     public static final int ERR_STRING_ISNT_HOSTNAME_OR_IPADDRESS = 16;
140 }
141
Popular Tags