View Javadoc

1   /*
2    * $HeadURL: https://mindtreeinsight.svn.sourceforge.net/svnroot/mindtreeinsight/insight/insight-ui/trunk/src/main/java/com/mindtree/techworks/insight/InsightConstants.java $
3    * $Date: 2007-12-25 22:16:32 -0700 (Tue, 25 Dec 2007) $
4    * $Revision: 83 $
5    * $Author: bindul $
6    * 
7    * Copyright (c) 2005 MindTree Consulting Ltd. 
8    * 
9    * This file is part of Insight.
10   * 
11   * Insight is free software: you can redistribute it and/or modify it under the 
12   * terms of the GNU General Public License as published by the Free Software 
13   * Foundation, either version 3 of the License, or (at your option) any later 
14   * version.
15   * 
16   * Insight is distributed in the hope that it will be useful, but 
17   * WITHOUT ANY WARRANTY; without even the implied warranty of 
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General 
19   * Public License for more details.
20   * 
21   * You should have received a copy of the GNU General Public License along with 
22   * Insight.  If not, see <http://www.gnu.org/licenses/>.
23   */
24  package com.mindtree.techworks.insight;
25  
26  import java.awt.Color;
27  import java.awt.Font;
28  import java.io.File;
29  import java.util.HashMap;
30  
31  /**
32   * 
33   * The <code>InsightConstants</code> class is a convenient placeholder for all
34   * information constant for the Insight application. Constant data defined in
35   * this interface may be externalized if necessary.
36   * 
37   * @author Regunath B
38   * @version 1.0, 04/10/25
39   * @see com.mindtree.techworks.insight.gui.Insight
40   */
41  
42  public abstract class InsightConstants {
43  
44  	/**
45  	 * The system variable to identify Insight home
46  	 */
47  	public static final String INSIGHT_HOME = "INSIGHT_HOME";
48  
49  	/**
50  	 * Title for the Insight Window
51  	 */
52  	public static final String FRAME_TITLE = "Insight";
53  
54  	/**
55  	 * Default color for backgrounds if none is specified
56  	 */
57  	public static final Color DEFAULT_BACKGROUND = Color.white;
58  
59  	/**
60  	 * Default color for foreground if none is specified
61  	 */
62  	public static final Color DEFAULT_FOREGROUND = Color.black;
63  
64  	/**
65  	 * Constant for minimum Preference name size
66  	 */
67  	public static final int PREFERENCE_NAME_MIN_SIZE = 5;
68  
69  	/**
70  	 * Array of colors available for distinguishing namespaces in the display
71  	 */
72  	public static final Color[] NAMESPACE_COLORS = { new Color(227, 228, 255), // Light
73  																				// violet
74  			new Color(255, 245, 255), // Light Magenta
75  			new Color(237, 255, 237), // Light green
76  			new Color(240, 236, 236), // Light Gray
77  			new Color(235, 254, 255), // Light Blue
78  			new Color(255, 255, 192), // Light Yellow
79  			new Color(252, 220, 210), // Skin Color
80  			new Color(163, 217, 216), // Dirty Blue
81  			new Color(189, 205, 189), // Dirty Green
82  			new Color(255, 221, 255), // Medium Magenta
83  			new Color(200, 201, 145), // Light grayish yellow
84  			new Color(255, 211, 163), // Orange
85  			new Color(192, 255, 255), // Blue
86  			new Color(216, 212, 212), // Gray
87  			new Color(215, 179, 179), // Light Brown
88  			new Color(191, 169, 191), // Dirty Magenta
89  			new Color(199, 205, 25), // Dirty Yellow
90  			new Color(192, 192, 255), // Violet
91  			new Color(255, 192, 255), // Magenta
92  			new Color(128, 255, 128), // Green
93  	};
94  
95  	/**
96  	 * Canonical name for the text highlight color in the active PLAF
97  	 */
98  	public static final String TEXT_HIGHLIGHT = "textHighlight";
99  
100 	/**
101 	 * Default fonts for display
102 	 */
103 	public static final Font DEFAULT_FONT = new Font("Dialog", Font.PLAIN, 12);
104 
105 	/**
106 	 * Default fonts for display
107 	 */
108 	public static final Font DEFAULT_SMALL_FONT = new Font("Dialog",
109 			Font.PLAIN, 11);
110 
111 	/**
112 	 * Useful constant to specify the spacing between distinct tool bar button
113 	 * groups
114 	 */
115 	public static final int TOOL_BAR_GROUP_SPACING = 50;
116 
117 	/**
118 	 * Stores the encoding used by URLEncode, URLDecode and XML related classes
119 	 */
120 	public static final String CHARACTER_ENCODING = "UTF-8";
121 
122 	/**
123 	 * Useful constant to store the file protocol prefix
124 	 */
125 	public static final String FILE_PROTOCOL_PREFIX = "file:///";
126 
127 	/**
128 	 * Root Directory for Caching
129 	 */
130 	public static final String ROOT_CACHE_DIR = "/insight-cache/";
131 
132 	/**
133 	 * Text Separator
134 	 */
135 	public static final String TEXT_SEPARATOR = " >> ";
136 
137 	/**
138 	 * For indentation
139 	 */
140 	public static final String TEXT_INDENT = "     ";
141 
142 	/**
143 	 * Page Separator
144 	 */
145 	public static final String PAGE_STATUS_SEPARATOR = " / ";
146 
147 	/**
148 	 * Start of Search Results status display
149 	 */
150 	public static final String SEARCH_RESULT_DISP_STATUS_START = "  [";
151 
152 	/**
153 	 * End of Search Results status display
154 	 */
155 	public static final String SEARCH_RESULT_DISP_STATUS_END = "]";
156 
157 	/**
158 	 * Status indicator for Search Results
159 	 */
160 	public static final String SEARCH_RESULT_DISP_STATUS = "SR ";
161 
162 	/**
163 	 * File Separator
164 	 */
165 	public static final String FILE_SEPARATOR = File.separator;
166 
167 	/**
168 	 * File Extension of the temp files
169 	 */
170 	public static final String FILE_EXT = ".pag";
171 
172 	/**
173 	 * Constant that holds the number of LogEvents per Page.
174 	 */
175 	public static final int DEFAULT_PAGE_SIZE = 1000;
176 
177 	/**
178 	 * Useful constant for the Status bar
179 	 */
180 	public static final int SB_PARTITION_COUNT = 2;
181 
182 	/**
183 	 * Display refresh interval
184 	 */
185 	public static final int DISPLAY_INTERVAL = 4000;
186 
187 	/**
188 	 * Useful constants to store the receiver format keys
189 	 */
190 	public static final String LOG_FORMAT_KEY = "com.mindtree.techworks.insight.logformat";
191 
192 	/**
193 	 * The default value of the remote port
194 	 */
195 	public static final int REMOTE_PORT_DEFAULT_VALUE = 1241;
196 
197 	public static final String LOOK_AND_FEEL_THEME = "insight.ui.lookandfeel.theme";
198 
199 	public static final String LOOK_AND_FEEL = "insight.ui.lookandfeel";
200 
201 	/**
202 	 * Hashmap containing message literals
203 	 */
204 	public static final HashMap MESSAGE_LITERALS = new HashMap();
205 
206 	/**
207 	 * Static block that loads the Message literals
208 	 */
209 	static {
210 		MESSAGE_LITERALS.put("FILE_MENU", "File");
211 		MESSAGE_LITERALS.put("EDIT_MENU", "Edit");
212 		MESSAGE_LITERALS.put("PREFERENCES_MENU", "Preferences");
213 		MESSAGE_LITERALS.put("LOAD_FILE", "Open File");
214 		MESSAGE_LITERALS.put("LOAD_REMOTE_FILE", "Open Remote File");
215 		MESSAGE_LITERALS.put("STOP_RECEIVER", "Stop Receiving Events");
216 		MESSAGE_LITERALS.put("CLEAR_DISPLAY", "Clear Display");
217 		MESSAGE_LITERALS.put("FILTER_DATA", "Filter Events");
218 		MESSAGE_LITERALS.put("FIND_DATA", "Find In Text");
219 		MESSAGE_LITERALS.put("SEARCH_DATA", "Search Events");
220 		MESSAGE_LITERALS.put("MAINTAIN_PREFERENCES", "Maintain Preferences");
221 		MESSAGE_LITERALS.put("EXIT", "Exit");
222 		MESSAGE_LITERALS.put("LOAD_FILE_STATUS", "Loading File : ");
223 		MESSAGE_LITERALS.put("ERROR_FILESET_EMPTY",
224 				"Empty Fileset: Please select another fileset!!");
225 		MESSAGE_LITERALS.put("ERROR_NO_FILE_SELECTED",
226 				"No Files Selected: Please select a file!!");
227 		MESSAGE_LITERALS.put("FILTER_STATUS", "Filtering data...");
228 		MESSAGE_LITERALS.put("FILE_ALREADY_LOADED",
229 				"The specified file has been loaded already!");
230 		MESSAGE_LITERALS.put("ERROR_LOAD_PREFERENCES",
231 				"Unable to load the preferences!");
232 		MESSAGE_LITERALS.put("ERROR_STORE_PREFERENCES",
233 				"Unable to store the preferences!");
234 		MESSAGE_LITERALS.put("ERROR_LOG4J_PATTERN",
235 				"Unable to interpret log4j pattern. Bad pattern format!");
236 		MESSAGE_LITERALS.put("ERROR_FIND_FAILURE",
237 				"Search text not found in event details!");
238 		MESSAGE_LITERALS.put("ERROR_PREF_UI",
239 				"UI for preference not found/incompatible");
240 		MESSAGE_LITERALS.put("ERROR_LOCATE_FAILURE",
241 				"Please select the event to locate!");
242 		MESSAGE_LITERALS.put("ERROR_FILTER_NO_CRITERIA",
243 				"Please select the filter criteria!");
244 		MESSAGE_LITERALS
245 				.put("ERROR_INVALID_INSIGHT_HOME",
246 						"Environment variable INSIGHT_HOME not defined (or) is invalid!");
247 		MESSAGE_LITERALS.put("OPEN_FILE_TOOL_TIP", "Open Log File");
248 		MESSAGE_LITERALS.put("OPEN__REMOTE_FILE_TOOL_TIP",
249 				"Open Remote Log File");
250 		MESSAGE_LITERALS.put("CLEAR_ENTRIES_TOOL_TIP", "Clear Display");
251 		MESSAGE_LITERALS.put("STOP_RECEIVER_TOOL_TIP", "Stop Receiving Events");
252 		MESSAGE_LITERALS.put("FILTER_ENTRIES_TOOL_TIP", "Filter Events");
253 		MESSAGE_LITERALS.put("FIND_TOOL_TIP", "Find in Event details Text");
254 		MESSAGE_LITERALS.put("SEARCH_TOOL_TIP", "Search for matching events");
255 		MESSAGE_LITERALS.put("MAINTAIN_PREFERENCES_TOOL_TIP",
256 				"Maintain Application Preferences");
257 		MESSAGE_LITERALS.put("FIND_TITLE", "Find");
258 		MESSAGE_LITERALS.put("FIND_WHAT", "Find what");
259 		MESSAGE_LITERALS.put("FIND", "Find");
260 		MESSAGE_LITERALS.put("SAVE", "Save");
261 		MESSAGE_LITERALS.put("CANCEL", "Cancel");
262 		MESSAGE_LITERALS.put("FIRST_PAGE_TOOL_TIP", "Show the First Page");
263 		MESSAGE_LITERALS.put("PREV_PAGE_TOOL_TIP", "Show the Previous Page");
264 		MESSAGE_LITERALS.put("NEXT_PAGE_TOOL_TIP", "Show the Next Page");
265 		MESSAGE_LITERALS.put("LAST_PAGE_TOOL_TIP", "Show the Last Page");
266 
267 		MESSAGE_LITERALS.put("LOGGER_NAME", "Category");
268 		MESSAGE_LITERALS.put("MESSAGE_LABEL", "Message");
269 		MESSAGE_LITERALS.put("EXCEPTION_LABEL", "Exception Class Name");
270 		MESSAGE_LITERALS.put("THREAD_NAME_LABEL", "Thread");
271 		MESSAGE_LITERALS.put("PRIORITY_LABEL", "Priority");
272 		MESSAGE_LITERALS.put("CLASS_LABEL", "Class");
273 		MESSAGE_LITERALS.put("RELATIVETIME_LABEL", "Relative Time");
274 		MESSAGE_LITERALS.put("LINE_LABEL", "Line");
275 		MESSAGE_LITERALS.put("METHOD_LABEL", "Method");
276 		MESSAGE_LITERALS.put("FILE_LABEL", "File");
277 		MESSAGE_LITERALS.put("LOGNAMESPACE_LABEL", "Log Namespace");
278 		MESSAGE_LITERALS.put("TIME_LABEL", "Time");
279 		MESSAGE_LITERALS.put("TO_LABEL", "To");
280 		MESSAGE_LITERALS.put("FROM_LABEL", "From");
281 		MESSAGE_LITERALS
282 				.put("PASSWORD_DECRYTPTION_FAILED",
283 						"Couldn't decrypt password!! Please enter the password again!!");
284 		MESSAGE_LITERALS.put("PREV_PAGE_MENU", "Prev Page");
285 		MESSAGE_LITERALS.put("NEXT_PAGE_MENU", "Next Page");
286 		MESSAGE_LITERALS.put("FIRST_PAGE_MENU", "First Page");
287 		MESSAGE_LITERALS.put("LAST_PAGE_MENU", "Last Page");
288 		MESSAGE_LITERALS.put("VIEW_MENU", "View");
289 
290 		MESSAGE_LITERALS.put("FIRST_PAGE", "FIRST");
291 		MESSAGE_LITERALS.put("PREV_PAGE", "PREVIOUS");
292 		MESSAGE_LITERALS.put("NEXT_PAGE", "NEXT");
293 		MESSAGE_LITERALS.put("LAST_PAGE", "LAST");
294 
295 		MESSAGE_LITERALS.put("LOCATE_EVENT", "Locate Event");
296 		MESSAGE_LITERALS.put("LOCATE_TOOL_TIP", "Locate the selected event");
297 
298 		MESSAGE_LITERALS.put("PRIMARY_PATTERN", "Primary Pattern");
299 		MESSAGE_LITERALS.put("SECONDARY_PATTERN", "Secondary Pattern");
300 		MESSAGE_LITERALS.put("LOG4J_PATTERNS", "Log Patterns");
301 		MESSAGE_LITERALS.put("SAMPLE_PATTERN", "Sample Pattern: ");
302 		MESSAGE_LITERALS.put("ABOUT_TITLE", "About");
303 		MESSAGE_LITERALS.put("LOADED_NAMESPACES", "Loaded Namespaces");
304 		MESSAGE_LITERALS.put("OK", "Ok");
305 		MESSAGE_LITERALS.put("HELP_MENU", "Help");
306 		MESSAGE_LITERALS.put("ABOUT_DIALOG", "About");
307 
308 		MESSAGE_LITERALS.put("SEARCH_TITLE", "Find");
309 		MESSAGE_LITERALS.put("SEARCH_WHAT", "Search what");
310 		MESSAGE_LITERALS.put("SEARCH_ON", "Search On");
311 		MESSAGE_LITERALS.put("SEARCH", "Search");
312 		MESSAGE_LITERALS.put("ERROR_NO_SEARCH_TEXT",
313 				"Please specify text to search!");
314 		MESSAGE_LITERALS.put("ERROR_NO_SEARCH_FIELDS",
315 				"Please select fields to search on!");
316 		MESSAGE_LITERALS
317 				.put("ERROR_NO_MODEL_LOADED",
318 						"Please load a log file before proceeding with this operation.");
319 		MESSAGE_LITERALS.put("FIRST_SEARCH_MATCH", "First Event");
320 		MESSAGE_LITERALS.put("NEXT_SEARCH_MATCH", "Next Event");
321 		MESSAGE_LITERALS.put("PREV_SEARCH_MATCH", "Previous Event");
322 		MESSAGE_LITERALS.put("NEXT_SEARCH_MATCH_TOOL_TIP",
323 				"Next Matching Event");
324 		MESSAGE_LITERALS.put("PREV_SEARCH_MATCH_TOOL_TIP",
325 				"Previous Matching Event");
326 		MESSAGE_LITERALS.put("NO_MATCHES_FOUND",
327 				"No matching search results were found");
328 		MESSAGE_LITERALS.put("SEARCH_COMPLETE",
329 				"Search Complete. Total matching log events: ");
330 		MESSAGE_LITERALS.put("SEARCHING", "Searching for ");
331 		MESSAGE_LITERALS.put("ERROR_INVALID_REGEX_PATTERN",
332 				"The regular expression search string is invalid.");
333 		MESSAGE_LITERALS.put("NO_NAVIGATE",
334 				"Cannot go beyond the current match in this direction.");
335 		MESSAGE_LITERALS.put("NO_SEARCH_RESULTS",
336 				"No search results to navigate.");
337 
338 		MESSAGE_LITERALS.put("NAMESPACE", "Namespace");
339 		MESSAGE_LITERALS.put("THROWABLE", "Throwable");
340 
341 		MESSAGE_LITERALS.put("ERROR", "Error");
342 		MESSAGE_LITERALS.put("ERROR_NO_MATCHING_ENTRIES",
343 				"Specified log pattern doesnot match data in:");
344 		MESSAGE_LITERALS.put("ERROR_NO_FILTERED_ENTRIES",
345 				"No matches found for specified filter criteria!");
346 		MESSAGE_LITERALS.put("EVENTS", "Events: ");
347 		MESSAGE_LITERALS.put("DETAILS", "Details:");
348 		MESSAGE_LITERALS.put("NAMESPACE_DETAILS", "Namespace Details:");
349 		MESSAGE_LITERALS.put("TIMESTAMP_FORMAT", "Timestamp Format");
350 		MESSAGE_LITERALS.put("NODE", "Node Id");
351 
352 		MESSAGE_LITERALS.put("HTTP_PROXY_HOST", "HTTP Proxy Host");
353 		MESSAGE_LITERALS.put("PROXY_PORT", "Port");
354 		MESSAGE_LITERALS.put("FTP_PROXY_HOST", "FTTP Proxy Host");
355 		MESSAGE_LITERALS.put("SOCKS_PROXY_HOST", "SOCKS Proxy Host");
356 		MESSAGE_LITERALS.put("REQUIRES_AUTHENTICATION",
357 				"Requires Authentication");
358 		MESSAGE_LITERALS.put("USER", "User");
359 		MESSAGE_LITERALS.put("PASSWORD", "Password");
360 
361 		MESSAGE_LITERALS.put("CONFIGURED_FILESETS", "Configured File sets");
362 		MESSAGE_LITERALS.put("ADD", "Add");
363 		MESSAGE_LITERALS.put("EDIT", "Edit");
364 		MESSAGE_LITERALS.put("REMOVE", "Remove");
365 		MESSAGE_LITERALS.put("FILESET_DETAILS", "Fileset Details:");
366 		MESSAGE_LITERALS.put("NAME", "Name");
367 		MESSAGE_LITERALS.put("URLS", "URLs");
368 		MESSAGE_LITERALS.put("NEW_URL", "New URL");
369 		MESSAGE_LITERALS.put("IGNORE_PROXY",
370 				"Ignore proxy settings for this Fileset");
371 		MESSAGE_LITERALS.put("APPLY_FILESET_CHANGES", "Apply Fileset Changes");
372 		MESSAGE_LITERALS.put("ERROR_FILESET_NAME",
373 				"Fileset name must be greater than or equal to : ");
374 		MESSAGE_LITERALS.put("AVAILABLE_COLUMNS", "Available Columns");
375 		MESSAGE_LITERALS.put("SELECTED_COLUMNS", "Selected Columns");
376 		// File Set Definitions
377 		MESSAGE_LITERALS.put("SHOW_FILESETS", "Show Filesets on load");
378 		MESSAGE_LITERALS.put("FILESET_TYPE", "Fileset Type");
379 		MESSAGE_LITERALS.put("FILESETS", "Filesets:");
380 		MESSAGE_LITERALS.put("LOCAL_FILESETS", "Local Filesets");
381 		MESSAGE_LITERALS.put("FTP_FILESETS", "FTP Filesets");
382 		MESSAGE_LITERALS.put("SFTP_FILESETS", "SFTP Filesets");
383 		MESSAGE_LITERALS.put("HTTP_FILESETS", "HTTP Filesets");
384 		MESSAGE_LITERALS.put("BROWSE", "Browse");
385 		MESSAGE_LITERALS.put("SELECT_FILES", "Select Files");
386 		MESSAGE_LITERALS.put("SELECTED_FILES", "Selected Files:");
387 		MESSAGE_LITERALS.put("HOST", "Host");
388 		MESSAGE_LITERALS.put("PORT", "Port");
389 		MESSAGE_LITERALS.put("HOME_DIR", "Home Dir");
390 		MESSAGE_LITERALS.put("ERROR_HOST_NAME",
391 				"The host field cannot be empty!");
392 		MESSAGE_LITERALS.put("ERROR_PORT_NO",
393 				"The port number field must be numeric!");
394 		MESSAGE_LITERALS.put("ERROR_BROWSE_REMOTE",
395 				"Error attempting remote browse : ");
396 		MESSAGE_LITERALS.put("ENABLE_TAILING", "Enable Tailing of Local Files");
397 
398 		// Error messages for download component
399 		MESSAGE_LITERALS.put("DOWNLOADING_FILE", "Downloading file: ");
400 		MESSAGE_LITERALS
401 				.put(
402 						"DOWNLOAD_FAILED",
403 						"Insight could not download the requested file. See error message for more details.");
404 
405 		// SFTP Browse and download
406 		MESSAGE_LITERALS
407 				.put("REMOTE_CONNECTING", "Connecting to remote host..");
408 		MESSAGE_LITERALS.put("DOWNLOAD_SFTP_FILE", "Now downloading: ");
409 		MESSAGE_LITERALS.put("DOWNLOAD_SFTP_FILE_COMPLETE",
410 				"Completed downloading: ");
411 
412 		// SFTP SSH Key verification
413 		MESSAGE_LITERALS.put("SSH_KEY_ALLOW_YES", "Yes");
414 		MESSAGE_LITERALS.put("SSH_KEY_ALLOW_NO", "No");
415 		MESSAGE_LITERALS.put("SSH_KEY_ALLOW_ALWAYS", "Always");
416 		MESSAGE_LITERALS
417 				.put("SSH_KEY_HOST_FILE_NOT_WRITABLE",
418 						"Cannot permanently add the host, allowed hosts file is not writeable");
419 		MESSAGE_LITERALS.put("SSH_KEY_ALLOW_HOST_QUESTION",
420 				"Do you want to allow this host key?");
421 		MESSAGE_LITERALS.put("SSH_KEY_DIALOG_TITLE", "SSH Host Key");
422 		MESSAGE_LITERALS.put("SSH_KEY_CANNOT_CONTINUE",
423 				"Cannot continue without a valid host key");
424 		MESSAGE_LITERALS
425 				.put(
426 						"SSH_KEY_UNKNOWN_HOST_MSG_FORMAT",
427 						"The host {0} is currently unknown to the system.\nThe host key fingerprint is: {1}");
428 		MESSAGE_LITERALS
429 				.put("SSH_KEY_MISMATCH_MSG_FORMAT",
430 						"The host key supplied by {0} is: {1}\nThe current allowed key for {0} is: {2}");
431 
432 		MESSAGE_LITERALS.put("SCROLL_LOCK_UNLOCK", "Scroll Lock/Unlock");
433 		MESSAGE_LITERALS.put("SCROLL_LOCK_TOOL_TIP", "Scroll lock the display");
434 		MESSAGE_LITERALS.put("SCROLL_UNLOCK_TOOL_TIP",
435 				"Scroll unlock the display");
436 
437 		MESSAGE_LITERALS.put("START_RECEIVER", "Start Receiver");
438 		MESSAGE_LITERALS
439 				.put("START_RECEIVER_TOOL_TIP", "Start Socket Receiver");
440 
441 		// Remote Protocol
442 		MESSAGE_LITERALS.put("REMOTE_PORT", "Port to listen on");
443 		MESSAGE_LITERALS.put("REMOTE_PROTOCOL_LISTENING",
444 				"The Remote Protocol is listening on port ");
445 
446 		// Filter Frame
447 		MESSAGE_LITERALS.put("FILTER_FRAME_TITLE", "Log Filter");
448 		MESSAGE_LITERALS.put("FILTER_FIELD_EXCEPTION", "Exception Class Name");
449 		MESSAGE_LITERALS.put("FILTER_FIELD_THREAD", "Thread");
450 		MESSAGE_LITERALS.put("FILTER_FIELD_PRIORITY", "Priority");
451 		MESSAGE_LITERALS.put("FILTER_FIELD_CATEGORY", "Category");
452 		MESSAGE_LITERALS.put("FILTER_FIELD_NAMESPACE", "Log Namespace");
453 		MESSAGE_LITERALS.put("FILTER_FIELD_TIME", "Time");
454 		MESSAGE_LITERALS.put("FILTER_FIELD_TIME_FROM", "From");
455 		MESSAGE_LITERALS.put("FILTER_FIELD_TIME_TO", "To");
456 		MESSAGE_LITERALS.put("FILTER_BUTTON_FILTER", "Filter");
457 		MESSAGE_LITERALS.put("FILTER_BUTTON_CANCEL", "Cancel");
458 		MESSAGE_LITERALS.put("FILTER_BUTTON_ADVANCED_SHOW", "Advanced >>");
459 		MESSAGE_LITERALS.put("FILTER_BUTTON_ADVANCED_HIDE", "Advanced <<");
460 		MESSAGE_LITERALS.put("FILTER_INVALID_DATE_RANGE",
461 				"Supplied date range is invalid.");
462 		MESSAGE_LITERALS.put("FILTER_DATE_FORMAT", "yyyy-MM-dd HH:mm:ss,SSS");
463 		MESSAGE_LITERALS.put("ERROR_FILTER_OPERATION",
464 				"Filter Operation Failed.");
465 		MESSAGE_LITERALS.put("ERROR_FILTER_INVALID_CRITERIA",
466 				"The Filter Criteria selected is ill formed.");
467 		MESSAGE_LITERALS
468 				.put("FILTER_ADV_PNL_TITLE", "Advanced Filter Criteria");
469 		MESSAGE_LITERALS.put("FILTER_ELEM_OPERSEP", "Operator / Seperators");
470 		MESSAGE_LITERALS.put("FILTER_BUTTON_ADD_CRITERION", "Add Criterion");
471 		MESSAGE_LITERALS.put("FILTER_BUTTON_ADD_OPERSEP",
472 				"Add Operator / Seperator");
473 		MESSAGE_LITERALS.put("FILTER_BUTTON_CLEAR", "Clear Current Criteria");
474 		MESSAGE_LITERALS.put("FILTER_CURRENT_CRITERIA",
475 				"Current Search Criteria String:");
476 		MESSAGE_LITERALS.put("FILTER_RECENT_CRITERIA",
477 				"Recent Search Criterias");
478 		MESSAGE_LITERALS.put("FILTER_BUTTON_SAVE_CRITERIA",
479 				"Save Current Criteria");
480 		MESSAGE_LITERALS.put("FILTER_BUTTON_LOAD_CRITERIA",
481 				"Load Saved Criteria");
482 		MESSAGE_LITERALS.put("FILTER_BUTTON_DELETE_CRITERIA",
483 				"Delete Saved Criteria");
484 		MESSAGE_LITERALS.put("ERROR_STORED_FILTER_LOAD",
485 				"Error loading preference, stored preferences will not work.");
486 		MESSAGE_LITERALS.put("ERROR_NO_STORED_CRITERIA",
487 				"Select a stored filter criteria to proceed.");
488 		MESSAGE_LITERALS
489 				.put("FILTER_CONFIRM_DELETE",
490 						"Are you sure you want to delete the filter criteria: {0} ({1})");
491 		MESSAGE_LITERALS.put("FILTER_DELETE_DIALOG_TITLE",
492 				"Delete Stored Filter");
493 		MESSAGE_LITERALS
494 				.put("FILTER_SAVE_DIALOG_TITLE", "Save Filter Criteria");
495 		MESSAGE_LITERALS.put("FILTER_SAVE_FILTER_NAME", "Criteria Name");
496 		MESSAGE_LITERALS.put("FILTER_SAVE_SERIALIZED_FILTER", "Criteria:");
497 		MESSAGE_LITERALS.put("FILTER_SAVE_BUTTON_SAVE", "Save");
498 		MESSAGE_LITERALS.put("FILTER_SAVE_BUTTON_CANCEL", "Cancel");
499 		MESSAGE_LITERALS.put("FILTER_SAVE_INVALID_NAME",
500 				"Criteria Name should be atleast 5 characters long.");
501 		MESSAGE_LITERALS
502 				.put(
503 						"FILTER_SAVE_NAME_OVERWRITE_MSG",
504 						"Criteria with that name exists, click Overwrite to delete existing criteria or enter a new name.");
505 		MESSAGE_LITERALS.put("FILTER_SAVE_BUTTON_OVERWRITE", "Overwrite");
506 		MESSAGE_LITERALS
507 				.put("FILTER_SAVE_MAX_OVERWRITE_MSG",
508 						"Criterias exceeded max limit, click Overwrite to delete oldest criteria.");
509 		MESSAGE_LITERALS
510 				.put("ERROR_FILTER_SAVE",
511 						"Criterias save failed. Change criteria or name and try again.");
512 	}
513 
514 	/**
515 	 * Gets the message literal for the specified key
516 	 * 
517 	 * @param key
518 	 *            the unique literal key
519 	 * @return the message lietarl or the key itself if none is found
520 	 */
521 	public static String getLiteral(String key) {
522 		String message = (String) MESSAGE_LITERALS.get(key);
523 		return message == null ? key : message;
524 	}
525 	
526 }