KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lateralnz > common > util > Constants


1 /* ====================================================================
2  * The LateralNZ Software License, Version 1.0
3  *
4  * Copyright (c) 2003 LateralNZ. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * 3. The end-user documentation included with the redistribution,
19  * if any, must include the following acknowledgment:
20  * "This product includes software developed by
21  * LateralNZ (http://www.lateralnz.org/) and other third parties."
22  * Alternately, this acknowledgment may appear in the software itself,
23  * if and wherever such third-party acknowledgments normally appear.
24  *
25  * 4. The names "LateralNZ" must not be used to endorse or promote
26  * products derived from this software without prior written
27  * permission. For written permission, please
28  * contact oss@lateralnz.org.
29  *
30  * 5. Products derived from this software may not be called "Panther",
31  * or "Lateral" or "LateralNZ", nor may "PANTHER" or "LATERAL" or
32  * "LATERALNZ" appear in their name, without prior written
33  * permission of LateralNZ.
34  *
35  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46  * SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of LateralNZ. For more
51  * information on Lateral, please see http://www.lateralnz.com/ or
52  * http://www.lateralnz.org
53  *
54  */

55 package org.lateralnz.common.util;
56
57 /**
58  * common strings used by a number of classes
59  *
60  * @author J R Briggs
61  */

62 public interface Constants {
63   public static final String JavaDoc AMPERSAND = "&";
64   public static final String JavaDoc AND = "and";
65   public static final String JavaDoc AT = "@";
66   public static final String JavaDoc ASTERISK = "*";
67   public static final String JavaDoc BACK_SLASH = "\\";
68   public static final String JavaDoc COLON = ":";
69   public static final String JavaDoc COMMA = ",";
70   public static final String JavaDoc DASH = "-";
71   public static final String JavaDoc DOLLAR = "$";
72   public static final String JavaDoc DOT = ".";
73   public static final String JavaDoc DOT_CLASS = ".class";
74   public static final String JavaDoc DOT_JAVA = ".java";
75   public static final String JavaDoc EMPTY = "";
76   public static final String JavaDoc EQUALS = "=";
77   public static final String JavaDoc FALSE = "false";
78   public static final String JavaDoc FILE_SEPARATOR = System.getProperty("file.separator");
79   public static final String JavaDoc FORWARD_SLASH = "/";
80   public static final String JavaDoc FULLSTOP = DOT;
81   public static final String JavaDoc HASH = "#";
82   public static final String JavaDoc HAT = "^";
83   public static final String JavaDoc LEFT_BRACE = "{";
84   public static final String JavaDoc LEFT_BRACKET = "(";
85   public static final String JavaDoc LEFT_CHEV = "<";
86   public static final String JavaDoc N = "n";
87   public static final String JavaDoc NEWLINE = "\n";
88   public static final String JavaDoc NO = "no";
89   public static final String JavaDoc NULL_STRING = null;
90   public static final String JavaDoc OFF = "off";
91   public static final String JavaDoc ON = "on";
92   public static final String JavaDoc PATH_SEPARATOR = System.getProperty("path.separator");
93   public static final String JavaDoc PERCENT = "%";
94   public static final String JavaDoc PIPE = "|";
95   public static final String JavaDoc PLUS = "+";
96   public static final String JavaDoc QUESTION_MARK = "?";
97   public static final String JavaDoc QUOTE = "\"";
98   public static final String JavaDoc RETURN = "\r";
99   public static final String JavaDoc RIGHT_BRACE = "}";
100   public static final String JavaDoc RIGHT_BRACKET = ")";
101   public static final String JavaDoc RIGHT_CHEV = ">";
102   public static final String JavaDoc SEMICOLON = ";";
103   public static final String JavaDoc SINGLE_QUOTE = "'";
104   public static final String JavaDoc SPACE = " ";
105   public static final String JavaDoc SQ_LEFT_BRACKET = "[";
106   public static final String JavaDoc SQ_RIGHT_BRACKET = "]";
107   public static final String JavaDoc TRUE = "true";
108   public static final String JavaDoc UNDERSCORE = "_";
109   public static final String JavaDoc UTF_8 = "UTF-8";
110   public static final String JavaDoc Y = "y";
111   public static final String JavaDoc YES = "yes";
112
113   public static final int MAX_LEN_APPCODE = 10;
114   public static final int MAX_LEN_APPGROUP = 20;
115   public static final int MAX_LEN_MSGCODE = 40;
116   public static final int MAX_LEN_MSGTEXT = 1024;
117   
118   public static final String JavaDoc ZERO = "0";
119   public static final String JavaDoc MINUS_ONE = "-1";
120   public static final String JavaDoc ONE = "1";
121   public static final String JavaDoc TWO = "2";
122   public static final String JavaDoc THREE = "3";
123   public static final String JavaDoc FOUR = "4";
124   public static final String JavaDoc FIVE = "5";
125   public static final String JavaDoc SIX = "6";
126   public static final String JavaDoc SEVEN = "7";
127   public static final String JavaDoc EIGHT = "8";
128   public static final String JavaDoc NINE = "9";
129
130   public static final String JavaDoc CRLF = RETURN + NEWLINE;
131   
132   public static final int CHAR_LEFT_CHEV = (int)'<';
133   public static final int CHAR_RIGHT_CHEV = (int)'>';
134   
135   public static final long ONE_MINUTE = 1000 * 60;
136   public static final long ONE_HOUR = ONE_MINUTE * 60;
137   public static final long ONE_DAY = ONE_HOUR * 24;
138   public static final long ONE_WEEK = ONE_DAY * 7;
139   
140   // simple operation types
141
public static final byte SELECT = 1;
142   public static final byte INSERT = 2;
143   public static final byte UPDATE = 3;
144   public static final byte DELETE = 4;
145   
146   // j2ee specific constants
147
public static final String JavaDoc REQUIRED = "Required";
148   public static final String JavaDoc REQUIRES_NEW = "RequiresNew";
149   public static final String JavaDoc SUPPORTS = "Supports";
150   
151   
152   // http content types
153
public static final String JavaDoc APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded";
154   public static final String JavaDoc TEXT_HTML = "text/html";
155   public static final String JavaDoc TEXT_PLAIN = "text/plain";
156   public static final String JavaDoc TEXT_XML = "text/xml";
157   
158 }
Popular Tags