View Javadoc

1   /*
2    * Copyright 2000-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  
18  package org.apache.commons.scaffold.lang;
19  
20  
21  /**
22   * Language and programming tokens.
23   *
24   * @author Ted Husted
25   * @author Steve Raeburn
26   * @version $Revision: 155464 $ $Date: 2005-02-26 13:26:54 +0000 (Sat, 26 Feb 2005) $
27   */
28  public final class Tokens {
29  
30  
31      /**
32       * The wild card character to represent a blank select.
33       */
34      public static String PARAM_ANY = "*";
35  
36  
37      /**
38       * The equality indicator to represent name = value.
39       */
40      public static String PARAM_EQUALS = " = ";
41  
42  
43  // ---------------------------------------------------- Attribute Keys
44  
45      /**
46       * Default key for a result or list object.
47       */
48      public static final String LIST_KEY   = "LIST";
49  
50  
51      /**
52       * Default key for application properties.
53       */
54      public static final String PROPERTIES_KEY = "PROPERTIES";
55  
56  
57  
58  // ---------------------------------------- Error and exception phrases
59  
60      public static final String ABSTRACT_EXCEPTION =
61          "Required method not implemented.";
62  
63      public static final String INVALID_SCOPE =
64          " invalid scope.";
65  
66  // --------------------------------------- Common Action Mapping tokens
67  
68      public static final String CANCEL    = "cancel";
69      public static final String CONTINUE  = "continue";
70      public static final String DISPATCH  = "dispatch";
71      public static final String DONE      = "done";
72      public static final String EMPTY     = "empty";
73      public static final String ERROR     = "error";
74      public static final String EXIT      = "exit";
75      public static final String FAILURE   = "failure";
76      public static final String FORWARD   = "forward";
77      public static final String GET_TOKEN = "getToken";
78      public static final String LOGON     = "logon";
79      public static final String LOGOFF    = "logoff";
80      public static final String MENU      = "menu";
81      public static final String NEXT      = "next";
82      public static final String PREVIOUS  = "previous";
83      public static final String SET_TOKEN = "setToken";
84      public static final String SUCCESS   = "success";
85      public static final String WELCOME   = "welcome";
86  
87      public static final String APPLICATION  = "application";
88      public static final String RESULT   = "result";
89      public static final String REQUEST  = "request";
90      public static final String SESSION  = "session";
91  
92      public static final String PATH     = "path";
93      public static final String OK       = "ok";
94  
95  
96  // --------------------------------- Common Application Resource tokens
97  
98      public static final String ERROR_GENERAL =
99          "error.general";
100 
101     public static final String ERROR_DETAIL =
102         "error.detail";
103 
104     public static final String ERROR_CANCEL =
105         "error.cancel";
106 
107     public static final String ERROR_TOKEN =
108         "error.token";
109 
110     public static final String ERROR_DISPATCH =
111         "error.dispatch";
112 
113     public static final String ERROR_DISPATCH_RETURN =
114         "error.dispatch.return";
115 
116     public static final String ERRORS_REQUIRED =
117         "errors.required";
118 
119     public static final String HELPER_ACCESS_ERROR =
120         "data.access.error";
121 
122     public static final String DATA_ACCESS_DENIED =
123         "data.access.denied";
124 
125     public static final String DATA_ACCESS_ERROR =
126         "data.access.error";
127 
128     public static final String DATA_ACCESS_EMPTY =
129         "data.access.empty"; // not found
130 
131     public static final String DATA_RECORD_INSERTED =
132         "data.record.inserted";
133 
134     public static final String DATA_RECORD_UPDATED =
135         "data.record.updated";
136 
137     public static final String DATA_RECORD_DELETED =
138         "data.record.deleted";
139 
140     public static final String DATA_RECORD_RECYCLED =
141         "data.record.recycled";
142 
143     public static final String DATA_RECORD_RESTORED =
144         "data.record.restored";
145 
146     public static final String DATA_RECORD_RETRIEVED =
147         "data.record.retrieved";
148 
149     public static final String DATA_RECORD_DUPLICATE =
150         "data.record.duplicate";
151 
152     public static final String PROCESS_COMPLETE =
153         "process.complete";
154 
155 
156 
157 // --------------------------------- Common Application Resource tokens
158 
159 
160     public static final String DATA_TRANSFER_ERROR =
161         "data.transfer.error";
162 
163     public static final String PROCESS_MISSING_PARAMETER =
164         "process.missing.parameter";
165 
166 
167 // ------------------------------------------------------ Content types
168 
169     /**
170      * Plain text MIME type. Good for XML.
171      */
172     public static final String TEXT_PLAIN = "text/plain";
173 
174 
175 
176 // ------------------------------------------------- Exception messages
177 
178     /**
179      * Default message for throwing exception (en).
180      */
181     public static final String ALLOCATE_KEY_EXCEPTION =
182         "Unable to allocate key.";
183 
184     /**
185      * Default message for throwing exception (en).
186      */
187     public static final String STORE_EXCEPTION =
188         "Unable to insert or update record.";
189 
190     /**
191      * Default message for throwing exception (en).
192      */
193     public static final String SELECT_EXCEPTION =
194         "Unable to retrieve record.";
195 
196     /**
197      * Default message for throwing exception (en).
198      */
199     public static final String INSERT_EXCEPTION =
200         "Unable to insert record.";
201 
202     /**
203      * Default message for throwing exception (en).
204      */
205     public static final String UPDATE_EXCEPTION =
206         "Unable to update record.";
207 
208     /**
209      * Default message for throwing exception (en).
210      */
211     public static final String NOT_IMPLEMENTED_EXCEPTION =
212         "Method not implemented.";
213 
214     /**
215      * Default message for throwing exception (en).
216      */
217     public static final String INVALID_QUERY_EXCEPTION =
218         "Query not processed; are parameters valid?";
219 
220     /**
221      * Default message for throwing exception (en).
222      */
223     public static final String DATA_ACCESS_EXCEPTION =
224         "Unable to access data.";
225 
226     
227 //	------------------------------------------------------- Log Phrases
228 
229     
230 	 /**
231 	  * Partial string for assembling a message.
232 	  */
233 	 public static final String CLASS =
234 		 "class: ";
235 
236 
237 	 /**
238 	  * Partial string for assembling a message.
239 	  */
240 	 public static final String PATH_MSG =
241 		 "path: ";
242 
243 
244 	 /**
245 	  * Partial string for assembling a message.
246 	  */
247 	 public static final String NAME =
248 		 "name: ";
249 
250 
251 	 /**
252 	  * Partial string for assembling a message.
253 	  */
254 	 public static final String SPACE =
255 		 " ";
256 
257 
258 	 /**
259 	  * Partial string for assembling a message.
260 	  */
261 	 public static final String NOT_FOUND =
262 		 "was not found ";
263 
264 
265 	 /**
266 	  * Error creating object
267 	  */
268 	 public static final String CREATE_OBJECT_ERROR =
269 		 "*** ERROR creating object ";
270 
271 
272 	 /**
273 	  * Prefix for logging exceptions.
274 	  */
275 	 public static final String ACTION_EXCEPTION =
276 		 "*** ACTION EXCEPTION: ";
277 
278 
279 	 /**
280 	  * Prefix for logging exceptions.
281 	  */
282 	 public static final String ACTION_FORM_EXCEPTION =
283 		 "*** ACTION FORM EXCEPTION: ";
284 
285 
286 	 /**
287 	  * Executing base logic.
288 	  */
289 	 public static final String BASE_LOGIC_EXECUTING =
290 		 "Executing base logic ";
291 
292 
293 	 /**
294 	  * Parsing tokens.
295 	  */
296 	 public static final String TOKENS_PARSING =
297 		 "Parsing tokens ";
298 
299 
300 	 /**
301 	  * Creating Helper.
302 	  */
303 	 public static final String HELPER_CREATING =
304 		 "Creating Helper ";
305 
306 
307 	 /**
308 	  * Helper created.
309 	  */
310 	 public static final String HELPER_CREATED =
311 		 "Helper created ";
312 
313 
314 	 /**
315 	  * Helper processing.
316 	  */
317 	 public static final String HELPER_PROCESSING =
318 		 "Processing helper beans ";
319 
320 
321 	 /**
322 	  * Executing helpers.
323 	  */
324 	 public static final String HELPER_EXECUTING =
325 		 "Executing helper beans ";
326 
327 
328 	 /**
329 	  * Populating helper
330 	  */
331 	 public static final String HELPER_POPULATE =
332 		 "Populate helper bean ";
333 
334 
335 	 /**
336 	  * Checking outcome of helper
337 	  */
338 	 public static final String HELPER_OUTCOME =
339 		 "Processing helper outcome ";
340 
341 
342 	 /**
343 	  * Bean helper
344 	  */
345 	 public static final String PROCESS_BEAN_NULL_SCOPE =
346 		 "** ProcessAction: Process result indicates a null scope ";
347 
348 
349 	 /**
350 	  * Process action - Business method should not return null.
351 	  */
352 	 public static final String PROCESS_RESULT_NULL =
353 		 "** ProcessAction: ProcessResult is NULL " ;    
354     
355     
356 // end Tokens
357 
358 }
359 
360 
361 /*
362  *
363  *    Copyright (c) 2002 Synthis Corporation.
364  *    430 10th Street NW, Suite S-108, Atlanta GA 30318, U.S.A.
365  *    All rights reserved.
366  *
367  *    This software is licensed to you free of charge under
368  *    the Apache Software License, so long as this copyright
369  *    statement, list of conditions, and comments,  remains
370  *    in the source code.  See bottom of file for more
371  *    license information.
372  *
373  *    This software was written to support code generation
374  *    for the Apache Struts J2EE architecture by Synthis'
375  *    visual application modeling tool Adalon.
376  *
377  *    For more information on Adalon and Struts code
378  *    generation please visit http://www.synthis.com
379  *
380  */