KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > admingui > handlers > LogViewerHandler


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.tools.admingui.handlers;
24
25 import com.iplanet.jato.RequestContext;
26 import com.iplanet.jato.RequestManager;
27 import com.iplanet.jato.model.DefaultModel;
28 import com.iplanet.jato.util.HtmlUtil;
29 import com.iplanet.jato.view.ContainerView;
30 import com.iplanet.jato.view.View;
31 import com.iplanet.jato.view.event.ChildContentDisplayEvent;
32
33 import com.sun.web.ui.model.CCPropertySheetModelInterface;
34 import com.sun.web.ui.model.CCPropertySheetModel;
35
36 import com.sun.enterprise.tools.admingui.util.MBeanUtil;
37 import com.sun.enterprise.tools.admingui.util.Util;
38 import com.sun.enterprise.tools.guiframework.exception.FrameworkException;
39 import com.sun.enterprise.tools.guiframework.view.DescriptorCCActionTable;
40 import com.sun.enterprise.tools.guiframework.view.HandlerContext;
41 import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor;
42 import com.sun.enterprise.tools.guiframework.view.descriptors.CCPropertySheetDescriptor;
43 import com.sun.enterprise.tools.guiframework.view.DescriptorContainerView;
44 import com.sun.enterprise.tools.guiframework.view.DescriptorCCPageTitle;
45
46 import com.sun.web.ui.common.CCI18N;
47
48 import java.text.DateFormat JavaDoc;
49 import java.text.ParseException JavaDoc;
50 import java.text.SimpleDateFormat JavaDoc;
51 import java.util.ArrayList JavaDoc;
52 import java.util.Hashtable JavaDoc;
53 import java.util.Date JavaDoc;
54 import java.util.EventObject JavaDoc;
55 import java.util.GregorianCalendar JavaDoc;
56 import java.util.Iterator JavaDoc;
57 import java.util.List JavaDoc;
58 import java.util.Locale JavaDoc;
59 import java.util.Properties JavaDoc;
60 import java.util.ResourceBundle JavaDoc;
61 import java.util.StringTokenizer JavaDoc;
62 import java.io.File JavaDoc;
63
64 import javax.management.Attribute JavaDoc;
65 import javax.management.AttributeList JavaDoc;
66 import javax.management.ObjectName JavaDoc;
67 import javax.servlet.ServletRequest JavaDoc;
68 import javax.servlet.http.HttpServletRequest JavaDoc;
69 import javax.servlet.http.HttpSession JavaDoc;
70
71 import java.lang.reflect.Method JavaDoc;
72
73 /**
74  * LogViewerHandler
75  */

76 public class LogViewerHandler {
77
78     /**
79      * This is the main search/filter handler for the LogViewer
80      */

81     public void filter(RequestContext ctx, HandlerContext handlerCtx) {
82     View view = handlerCtx.getView();
83     ServletRequest JavaDoc request = ctx.getRequest();
84
85     // Attempt to read values passed in
86
String JavaDoc archivedLogFile = (String JavaDoc)handlerCtx.getInputValue(ARCHIVED_LOG_FILE);
87     Long JavaDoc fromRecord = (Long JavaDoc)handlerCtx.getInputValue(FROM_RECORD);
88     Boolean JavaDoc after = (Boolean JavaDoc)handlerCtx.getInputValue(AFTER_RECORD);
89     Boolean JavaDoc dateEnabled = (Boolean JavaDoc)handlerCtx.getInputValue(DATE_ENABLED);
90     Object JavaDoc fromDate = handlerCtx.getInputValue(FROM_DATE);
91     Object JavaDoc fromTime = handlerCtx.getInputValue(FROM_TIME);
92     Object JavaDoc toDate = handlerCtx.getInputValue(TO_DATE);
93     Object JavaDoc toTime = handlerCtx.getInputValue(TO_TIME);
94     Object JavaDoc loggers = handlerCtx.getInputValue(LOGGERS);
95     Object JavaDoc logLevel = handlerCtx.getInputValue(LOG_LEVEL);
96     Object JavaDoc customLoggers = handlerCtx.getInputValue(CUSTOM_LOGGERS);
97     Object JavaDoc nvp = handlerCtx.getInputValue(NVP);
98     Integer JavaDoc numberToDisplay = (Integer JavaDoc)handlerCtx.getInputValue(NUMBER_TO_DISPLAY);
99     Boolean JavaDoc onlyLevel =
100         (Boolean JavaDoc)handlerCtx.getInputValue(ONLY_LEVEL);
101     Boolean JavaDoc direction =
102         (Boolean JavaDoc)handlerCtx.getInputValue(LOG_DATE_SORT_DIRECTION);
103     Boolean JavaDoc truncMsg =
104         (Boolean JavaDoc)handlerCtx.getInputValue(TRUNCATE_MESSAGE);
105     Integer JavaDoc truncLenInteger =
106         (Integer JavaDoc)handlerCtx.getInputValue(TRUNCATE_LENGTH);
107         String JavaDoc logManagerObjectName = (String JavaDoc)handlerCtx.getInputValue(LOG_MANAGER_OBJECT_NAME);
108         String JavaDoc instanceName = (String JavaDoc)handlerCtx.getInputValue(INSTANCE_NAME);
109         /*
110         System.out.println("============ In LogViewerHandler: logManagerObjectName = " + logManagerObjectName);
111     System.out.println("============ In LogViewerHandler: instanceName = " + instanceName);
112         System.out.println("============ In LogViewerHandler: archivedLogFile = " + archivedLogFile);
113          */

114
115         if (instanceName==null || "".equals(instanceName)){
116             //System.out.println("===== null instanceName, filter returns. ");
117
handlerCtx.setOutputValue(FIRST_LOG_ROW, "-1");
118         handlerCtx.setOutputValue(LAST_LOG_ROW, "-1");
119             return;
120         }
121
122         // Determine if messages should be truncated
123
boolean truncateMessage = true;
124     if (truncMsg != null) {
125         truncateMessage = truncMsg.booleanValue();
126     }
127     int truncLen = 100;
128     if (truncLenInteger != null) {
129         truncLen = truncLenInteger.intValue();
130     }
131
132         //Determine if archived log file specified or use current log file
133
if (archivedLogFile == null || archivedLogFile.equals("")) {
134             archivedLogFile = null;
135     } else {
136             archivedLogFile= archivedLogFile;
137     }
138
139     // Allow the model to be specified (if not specified, the table model
140
// will be used)
141
DefaultModel model = (DefaultModel)handlerCtx.getInputValue(LOG_MODEL);
142     DescriptorCCActionTable table =
143         (DescriptorCCActionTable)handlerCtx.getInputValue(TABLE);
144
145     if ((table == null) && (model == null)) {
146         throw new FrameworkException("Input parameter '"+TABLE+
147         "' must be specified with the log table View as the value, "+
148         "or the model to populate should be passed in as Request "+
149         "attribute '"+LOG_MODEL+"'.", null, view);
150     }
151
152     // Convert Date/Time fields
153
boolean dateEnabledFlag = false;
154     if (dateEnabled != null) {
155         dateEnabledFlag = dateEnabled.booleanValue();
156     }
157     if (dateEnabledFlag) {
158         // Date is enabled, figure out what the values are
159
fromDate = convertDateTime(
160         request, fromDate, fromTime, table.getViewDescriptor(), view);
161         toDate = convertDateTime(
162         request, toDate, toTime, table.getViewDescriptor(), view);
163         if ((fromDate == null) || (fromDate == null)) {
164         throw new FrameworkException(
165             "'Specific Date Range' was chosen, however, date fields "+
166             "are incomplete.", null, view);
167         }
168         if (((Date JavaDoc)fromDate).after((Date JavaDoc)toDate)) {
169         throw new FrameworkException(
170             "Timestamp value of 'From: ' field " + fromDate +
171             " must not be greater than 'To: ' field value " + toDate,
172             null, view);
173         }
174     } else {
175         // Date not enabled, ignore from/to dates
176
fromDate = null;
177         toDate = null;
178     }
179
180     if (logLevel != null) {
181         if (logLevel.toString().trim().length() == 0) {
182         logLevel = null;
183         }
184     }
185
186     if (onlyLevel == null) {
187         onlyLevel = FALSE;
188     }
189
190     // Convert module array to List
191
List JavaDoc moduleList = null;
192     if (loggers != null) {
193         int len = ((Object JavaDoc[])loggers).length;
194         moduleList = new ArrayList JavaDoc(len);
195         Object JavaDoc val;
196         for (int count=0; count<len; count++) {
197         val = (((Object JavaDoc[])loggers)[count]);
198         if ((val == null) || (val.toString().trim().length() == 0)) {
199             continue;
200         }
201         moduleList.add(val);
202         }
203     }
204
205     // Add custom loggers
206
if ((customLoggers != null) &&
207         (customLoggers.toString().trim().length() != 0)) {
208         StringTokenizer JavaDoc tok = new StringTokenizer JavaDoc(
209         customLoggers.toString(),
210         CUSTOM_LOGGER_DELIMITERS);
211         String JavaDoc token;
212         while (tok.hasMoreTokens()) {
213         token = tok.nextToken();
214         if ((token == null) || (token.length()==0)) {
215             continue;
216         }
217         moduleList.add(token);
218         }
219     }
220
221
222     // Deal w/ NVPs
223
Hashtable JavaDoc nvpProps = null;
224     if ((nvp != null) && (nvp.toString().trim().length() != 0)) {
225         nvpProps = new Properties JavaDoc();
226         int equalsIdx;
227         String JavaDoc token;
228         // Iterate over the entries
229
StringTokenizer JavaDoc tok =
230         new StringTokenizer JavaDoc(nvp.toString(), NVP_DELIMITERS);
231         while (tok.hasMoreTokens()) {
232         token = tok.nextToken();
233         if ((token == null) || (token.length()==0)) {
234             continue;
235         }
236         equalsIdx = token.indexOf(EQUALS);
237         // Make sure = exists and it is not the first character
238
if (equalsIdx < 0) {
239             throw new FrameworkException(
240             "Name-Value Pairs must be in the format \""+
241             "<name>=<value>\".", null, view);
242         }
243
244         // Add this to the Hashtable
245
String JavaDoc key = token.substring(0, equalsIdx++);
246                 ArrayList JavaDoc valueList = (ArrayList JavaDoc) nvpProps.get(key);
247                 if (valueList == null){
248                      valueList = new ArrayList JavaDoc();
249                      valueList.add(token.substring(equalsIdx));
250                      nvpProps.put(key, valueList);
251                 }else{
252                     valueList.add(token.substring(equalsIdx));
253                 }
254         }
255             //nvpProps.list(System.out);
256
}
257
258
259     // Get the number to Display
260
if (numberToDisplay == null) {
261         numberToDisplay = DEFAULT_NUMBER_TO_DISPLAY;
262     }
263
264     // Get the direction
265
if (direction == null) {
266         direction = FALSE;
267     }
268
269     // Get AfterRecord flag
270
if (after == null) {
271         // Not supplied, use direction
272
after = direction;
273     }
274
275     // Build the params object[]
276
Object JavaDoc params[] = new Object JavaDoc[QUERY_SIGNATURE.length];
277         params[0] = archivedLogFile; //log file name. if null, use current.
278
params[1] = fromRecord; // fromRecord
279
params[2] = // next (after or before fromRecord)
280
(fromRecord == null) ? direction : after;
281     params[3] = direction; // forward
282
params[4] = numberToDisplay; // requestedCount
283
params[5] = fromDate; // fromDate
284
params[6] = toDate; // toDate
285
params[7] = logLevel; // logLevel
286
params[8] = onlyLevel; // onlyLevel
287
params[9] = moduleList; // listOfModules
288
params[10] = nvpProps; // nameValueMap
289

290
291     // Search for the log entries
292
AttributeList JavaDoc results = null;
293     try {
294             results = (AttributeList JavaDoc) getLogRecordsUsingQuery(logManagerObjectName, instanceName, params, QUERY_SIGNATURE);
295     }catch (Exception JavaDoc ex) {
296         throw new FrameworkException("Error while querying Log File.",
297         ex, (table == null) ? null : table.getViewDescriptor(), view);
298     }
299
300     // Add the results to the Model
301
if (model == null) {
302         model = (DefaultModel)table.getModel();
303     }
304
305     // Get rid of anything that is already in the Model
306
model.clear();
307
308     String JavaDoc message;
309     List JavaDoc headerRow = (List JavaDoc)(((Attribute JavaDoc)results.get(0)).getValue());
310     List JavaDoc rowList = (List JavaDoc)(((Attribute JavaDoc)results.get(1)).getValue());
311     List JavaDoc row;
312     Iterator JavaDoc it = rowList.iterator();
313     while (it.hasNext()) {
314         row = (List JavaDoc)it.next();
315         if (row.size() != headerRow.size()) {
316         throw new FrameworkException(
317             "Row had '"+row.size()+"' columns, header has '"+
318             headerRow.size()+"' columns!", table.getViewDescriptor(),
319             view);
320         }
321         model.appendRow();
322
323         // FIXME: Use the Header row to pull off right stuff (vs. indexes)
324

325         model.setValue("recNumber", row.get(0));
326         /*
327             if (archivedLogFile != null) {
328         ":"+instanceName+":"+archivedLogFile);
329                 model.setValue("recNumber", row.get(0)+":"+instanceName+":"+archivedLogFile);
330         } else {
331                 model.setValue("recNumber", row.get(0)+":"+instanceName+":");
332         }
333         */

334         model.setValue("dateTime", formatDateForDisplay(
335         request.getLocale(), (Date JavaDoc)row.get(1)));
336             String JavaDoc msgId = (String JavaDoc) row.get(6);
337             //System.out.println("msgId=" + msgId);
338
// Set the image if appropriate
339
String JavaDoc level = (String JavaDoc)row.get(2);
340             //only SEVERE msg provoides diagnostic info.
341
if (level.equalsIgnoreCase("severe")) {
342         // NOTE: Image name/location is hard-coded
343
model.setValue("levelImage", Util.getMessage("common.errorGif"));
344         model.setValue(SHOW_LEVEL_IMAGE, new Boolean JavaDoc(true));
345                 model.setValue("diagnosticCauses", getDiagnosticCauses(msgId));
346                 model.setValue("diagnosticChecks", getDiagnosticChecks(msgId));
347                 model.setValue("diagnosticURI", getDiagnosticURI(msgId));
348                 //System.out.println("=== after setting diagnostic for msgId=" + msgId);
349
} else {
350         model.setValue(SHOW_LEVEL_IMAGE, new Boolean JavaDoc(false));
351                 model.setValue("diagnostic", "");
352         }
353         model.setValue("level", level);
354         model.setValue("productName", row.get(3));
355         model.setValue("logger", row.get(4));
356         model.setValue("nvp", row.get(5));
357         model.setValue("messageID", msgId );
358         message = ((String JavaDoc)row.get(7)).trim();
359         if (truncateMessage && (message.length() > truncLen)) {
360         message = message.substring(0, truncLen).concat("...\n");
361         }
362         model.setValue("message", formatMessageForDisplay(message));
363     }
364
365     // Set the first / last record numbers as attributes
366
if (rowList.size() > 0) {
367         handlerCtx.setOutputValue(FIRST_LOG_ROW,
368         ((List JavaDoc)rowList.get(0)).get(0));
369         handlerCtx.setOutputValue(LAST_LOG_ROW,
370         ((List JavaDoc)rowList.get(rowList.size()-1)).get(0));
371     } else {
372         handlerCtx.setOutputValue(FIRST_LOG_ROW, "-1");
373         handlerCtx.setOutputValue(LAST_LOG_ROW, "-1");
374     }
375     }
376
377
378     /**
379      * This handler generates the HTML that appears on the bottom of the
380      * table for navigation. This handler is only valid for endDisplay.
381      */

382     public String JavaDoc generateResultNavBar(RequestContext ctx, HandlerContext handlerCtx) {
383     if (!(handlerCtx.getEvent() instanceof ChildContentDisplayEvent)) {
384         throw new FrameworkException(getClass().getName()+
385         ".generateResultNavBar is only valid for endDisplay events.",
386         null, handlerCtx.getView());
387     }
388
389     // Get the first/last row numbers
390
String JavaDoc firstLogRow = (String JavaDoc)handlerCtx.getInputValue(FIRST_LOG_ROW);
391     String JavaDoc lastLogRow = (String JavaDoc)handlerCtx.getInputValue(LAST_LOG_ROW);
392         if (firstLogRow == null) {
393             firstLogRow="0";
394     }
395         if (lastLogRow == null) {
396             lastLogRow="0";
397     }
398     int firstRow = 0;
399     try {
400         firstRow = Integer.parseInt(firstLogRow);
401         int lastRow = Integer.parseInt(lastLogRow);
402         if (firstRow > lastRow) {
403         String JavaDoc temp = firstLogRow;
404         firstLogRow = lastLogRow;
405         lastLogRow = temp;
406         firstRow = lastRow;
407         }
408     } catch (NumberFormatException JavaDoc ex) {
409         // ignore
410
}
411
412     // Next get the button Strings
413
String JavaDoc prevButtonString = (String JavaDoc)handlerCtx.getInputValue(PREV_BUTTON_STRING);
414     String JavaDoc nextButtonString = (String JavaDoc)handlerCtx.getInputValue(NEXT_BUTTON_STRING);
415
416     // Get the localized strings that we need
417
// Try to get the resource bundle
418
String JavaDoc bundle = (String JavaDoc)handlerCtx.getInputValue(RESOURCE_BUNDLE);
419     if (bundle == null) {
420         bundle = handlerCtx.getViewDescriptor().getResourceBundle();
421     }
422     if (bundle == null) {
423         throw new FrameworkException("You MUST specify the resource "+
424         "bundle via input parameter: '"+RESOURCE_BUNDLE+"'.",
425         null, handlerCtx.getView());
426     }
427     CCI18N i18n = new CCI18N(ctx, bundle);
428
429 // ResourceBundle bundle = table.getModel().getResourceBundle();
430
// String priorMatches = bundle.getString("logViewer.priorMatches");
431
// String logResultSummary = bundle.getString("logViewer.logResultSummary");
432
// String logResultSummaryThrough = bundle.getString("logViewer.logResultSummaryThrough");
433
// String nextMatches = bundle.getString("logViewer.nextMatches");
434
String JavaDoc priorMatches = i18n.getMessage("logViewer.priorMatches");
435     String JavaDoc logResultSummary = i18n.getMessage("logViewer.logResultSummary");
436     String JavaDoc logResultSummaryThrough = i18n.getMessage("logViewer.logResultSummaryThrough");
437     String JavaDoc nextMatches = i18n.getMessage("logViewer.nextMatches");
438
439         StringBuffer JavaDoc content =
440         new StringBuffer JavaDoc(((ChildContentDisplayEvent)handlerCtx.getEvent()).getContent());
441     int mark = content.lastIndexOf("</table>");
442     if (mark > 0) {
443 // Insert new tr w/ colspan 6??
444
StringBuffer JavaDoc newRow = new StringBuffer JavaDoc("\n");
445         newRow.append("\t <tr><td class=\"TblActTd\" colspan=\"6\" "
446             + "nowrap=\"nowrap\">\n");
447         newRow.append("\t\t<div style=\"margin-top:6px;\">\n");
448
449         // UP Button
450
if (firstRow > 0) {
451         newRow.append(prevButtonString);
452         }
453
454         newRow.append("\t\t <img SRC=\"../images/spacer.gif\" "
455             + "alt=\"\" width=\"10\" height=\"8\" />\n");
456         newRow.append("\t\t <span class=\"LblLev2Txt\">\n");
457         newRow.append("\t\t\t<label for=\"page\">"+logResultSummary+" "+
458         firstLogRow+" "+logResultSummaryThrough+" "+
459         lastLogRow+"</label>\n");
460         newRow.append("\t\t </span><img SRC=\"../images/spacer.gif\""
461             + "alt=\"\" width=\"10\" height=\"1\" />\n");
462
463         // DOWN Button
464
newRow.append(nextButtonString);
465
466         newRow.append("\t\t</div></td></tr>\n");
467
468         // Insert at the end of the Table
469
content.insert(mark, newRow.toString());
470
471         // Try to insert the same row at the top of the table
472
// WARNING: The following is fragile and replies on the current
473
// implementation of the LH table
474
mark = content.indexOf("<tr>");
475         if (mark > 0) {
476         // Try to add in the button row before the first <tr>
477
content.insert(mark, newRow.toString());
478         }
479     }
480
481     // Return the result
482
return content.toString();
483     }
484
485
486     /**
487      * <P>This method returns the current date (as a String). The DATE_FORMAT
488      * must be specified, if it is not this method will fail. You may set it
489      * to "short", "medium", "long", or "FULL".</P>
490      *
491      * <P>If you do not set it to one of these values, you may set it to a
492      * valid format string.</P>
493      */

494     public void getDate(RequestContext ctx, HandlerContext handlerCtx) {
495         // Get the required attribute
496
String JavaDoc formatString = (String JavaDoc)handlerCtx.getInputValue(DATE_FORMAT);
497     if ((formatString == null) || (formatString.trim().length() == 0)) {
498         throw new FrameworkException("You MUST specify the attribute: '"+
499             DATE_FORMAT+"' in order for getDate to work!",
500         null, handlerCtx.getView());
501     }
502
503     // Get the type
504
int formatType = -1;
505     if (formatString.equals(GET_DATE_SHORT)) {
506         formatType = DateFormat.SHORT;
507     } else if (formatString.equals(GET_DATE_MEDIUM)) {
508         formatType = DateFormat.MEDIUM;
509     } else if (formatString.equals(GET_DATE_LONG)) {
510         formatType = DateFormat.LONG;
511     } else if (formatString.equals(GET_DATE_FULL)) {
512         formatType = DateFormat.FULL;
513     }
514     DateFormat JavaDoc df = null;
515     if (formatType == -1) {
516         df = DateFormat.getDateInstance(
517         DateFormat.SHORT, ctx.getRequest().getLocale());
518         ((SimpleDateFormat JavaDoc)df).applyLocalizedPattern(formatString);
519     } else {
520         df = DateFormat.getDateInstance(
521         formatType, ctx.getRequest().getLocale());
522     }
523
524     // Set the return value
525
handlerCtx.setOutputValue(DATE_VALUE, df.format(new Date JavaDoc()));
526     }
527
528       public void getFormatedDateTime(RequestContext ctx, HandlerContext handlerCtx) {
529           String JavaDoc ts = (String JavaDoc )handlerCtx.getInputValue("timestamp");
530           Date JavaDoc date = null;
531           if (ts == null || "".equals(ts)){
532             date = new Date JavaDoc(System.currentTimeMillis());
533           }else{
534               date = new Date JavaDoc( Long.parseLong(ts));
535           }
536           DateFormat JavaDoc df = DateFormat.getDateInstance(DateFormat.SHORT, ctx.getRequest().getLocale());
537           DateFormat JavaDoc tf = DateFormat.getTimeInstance(DateFormat.MEDIUM, ctx.getRequest().getLocale());
538           ((SimpleDateFormat JavaDoc)tf).applyLocalizedPattern(" HH:mm:ss.SSS");
539           
540           String JavaDoc ftime = tf.format(date);
541           String JavaDoc fdate = df.format(date);
542           handlerCtx.setOutputValue("valueTime", ftime);
543           handlerCtx.setOutputValue("valueDate", fdate);
544        }
545
546     
547     /**
548      * <P>This method puts the current time (as a String) in the desired
549      * attribute. The result attribute must be specified via an attribute
550      * named "getTimeResultAttribute"</P>
551      */

552     public void getTime(RequestContext ctx, HandlerContext handlerCtx) {
553     DateFormat JavaDoc df = DateFormat.getTimeInstance(
554         DateFormat.SHORT, ctx.getRequest().getLocale());
555     ((SimpleDateFormat JavaDoc)df).applyLocalizedPattern(TIME_FORMAT);
556
557     // Set the return value
558
handlerCtx.setOutputValue(GET_TIME_RESULT, df.format(new Date JavaDoc()));
559     }
560     
561     /**
562      * <P>This method returns the current log file name stored the log-service config element </P>
563      */

564     public void getCurrentLogFileName(RequestContext ctx, HandlerContext handlerCtx) {
565        String JavaDoc instanceName = (String JavaDoc )handlerCtx.getInputValue("instanceName");
566        String JavaDoc configName = (String JavaDoc)MBeanUtil.getAttribute("com.sun.appserv:type=server,category=config,name="+instanceName, "config-ref");
567        String JavaDoc fileName = (String JavaDoc) MBeanUtil.getAttribute("com.sun.appserv:type=log-service,category=config,config="+configName, "file");
568        File JavaDoc file = new File JavaDoc(fileName);
569        String JavaDoc fn = file.getName();
570     // Set the return value
571
handlerCtx.setOutputValue("currentLogFileName", fn);
572     }
573
574
575     /**
576      * This method formats the log message to be displayed appropriately for
577      * HTML (it converts '\n' characters to &lt;br&gt;'s.
578      */

579     protected String JavaDoc formatMessageForDisplay(String JavaDoc message) {
580     return HtmlUtil.escape(message).replaceAll("\n", "<br>");
581     }
582
583     /**
584      * This method formats the diagnostic to be displayed for HTML
585      * Add '<br>' to each elements of the ArrayList and returns the String.
586      */

587     protected String JavaDoc formatArrayListForDisplay(ArrayList JavaDoc diag) {
588         if ((diag == null) || (diag.size() == 0)) {
589         return "";
590     }
591         StringBuffer JavaDoc buf = new StringBuffer JavaDoc("<br>");
592         for(int i=0; i<diag.size(); i++){
593             buf.append( (String JavaDoc)diag.get(i));
594         buf.append("<br>");
595         }
596         return buf.toString();
597     }
598
599     /**
600      * This method formats a log file date to a more readable date (based on
601      * locale).
602      */

603     public static String JavaDoc formatDateForDisplay(Locale JavaDoc locale, Date JavaDoc date) {
604     DateFormat JavaDoc dateFormat = DateFormat.getDateInstance(
605         DateFormat.MEDIUM, locale);
606     if (dateFormat instanceof SimpleDateFormat JavaDoc) {
607         SimpleDateFormat JavaDoc fmt = (SimpleDateFormat JavaDoc)dateFormat;
608         fmt.applyLocalizedPattern(fmt.toLocalizedPattern()+TIME_FORMAT);
609         return fmt.format(date);
610     } else {
611         dateFormat = DateFormat.getDateTimeInstance(
612         DateFormat.MEDIUM, DateFormat.LONG, locale);
613         return dateFormat.format(date);
614     }
615     }
616
617
618     /**
619      * This method converts a date/time string to a Date.
620      *
621      * @param request The ServletRequest
622      * @param date The date as a String (or the date/time as a Date)
623      * @param time The time as a String (or null)
624      * @param vd The ViewDescriptor (for exception handling)
625      * @param view The View (for exception handling)
626      */

627     protected Date JavaDoc convertDateTime(
628         ServletRequest JavaDoc request, Object JavaDoc date, Object JavaDoc time,
629         ViewDescriptor vd, View view) {
630         // If Date is already a Date, then do nothing
631
if (date instanceof Date JavaDoc) {
632         return (Date JavaDoc)date;
633     }
634     // If Date is null or empty, return null
635
if ((date == null) || (date.toString().trim().length() == 0)) {
636         return null;
637     }
638
639     // Get the date / time string
640
if (time.toString().trim().length() == 0) {
641         time = null;
642     }
643     String JavaDoc dateTime = date.toString()+
644         ((time == null) ? "" : (" "+time.toString()));
645     DateFormat JavaDoc df = DateFormat.getDateInstance(
646         DateFormat.SHORT, request.getLocale());
647     if ((time != null) && (df instanceof SimpleDateFormat JavaDoc)) {
648         SimpleDateFormat JavaDoc fmt = (SimpleDateFormat JavaDoc)df;
649         String JavaDoc formatPrefix = fmt.toLocalizedPattern();
650         try {
651         // Try w/ HH:mm:ss.SSS
652
date = parseDateString(
653             fmt, formatPrefix+TIME_FORMAT, dateTime);
654         } catch (ParseException JavaDoc ex) {
655         try {
656             // Try w/ HH:mm:ss
657
date = parseDateString(
658             fmt, formatPrefix+TIME_FORMAT_2, dateTime);
659         } catch (ParseException JavaDoc ex2) {
660             try {
661             // Try w/ HH:mm
662
date = parseDateString(
663                 fmt, formatPrefix+TIME_FORMAT_3, dateTime);
664             } catch (ParseException JavaDoc ex3) {
665             throw new FrameworkException(
666                 "Unable to parse Date/Time: '"+dateTime+"'.",
667                 ex3, vd, view);
668             }
669         }
670         }
671     } else if (time != null) {
672         // I don't think this ever happens
673
df = DateFormat.getDateTimeInstance(
674         DateFormat.SHORT, DateFormat.LONG, request.getLocale());
675         try {
676         date = df.parse(dateTime);
677         } catch (ParseException JavaDoc ex) {
678         throw new FrameworkException(
679             "Unable to parse Date/Time: '"+dateTime+"'.",
680             ex, vd, view);
681         }
682     } else {
683         try {
684         date = df.parse(dateTime);
685         } catch (ParseException JavaDoc ex) {
686         throw new FrameworkException(
687             "Unable to parse Date/Time: '"+dateTime+"'.",
688             ex, vd, view);
689         }
690     }
691
692     // Return the result
693
return (Date JavaDoc)date;
694     }
695
696
697     /**
698      * This method simply takes the given SimpleDateFormat and parses the
699      * given String after applying the given format String.
700      */

701     private Date JavaDoc parseDateString(SimpleDateFormat JavaDoc fmt, String JavaDoc format, String JavaDoc dateTime) throws ParseException JavaDoc {
702     fmt.applyLocalizedPattern(format);
703     return fmt.parse(dateTime);
704     }
705
706     /**
707      * * This method get the diagnostic based on the message id
708      */

709     private String JavaDoc getDiagnosticCauses(String JavaDoc msgId){
710
711         if (msgId == null || "".equals(msgId))
712             return formatArrayListForDisplay(null);
713         String JavaDoc params[] = {msgId};
714         String JavaDoc signatures[] = {"String"};
715         try {
716         ArrayList JavaDoc results = (ArrayList JavaDoc)MBeanUtil.invoke(
717         "com.sun.appserv:name=logmanager,category=runtime,server=server",
718         "getDiagnosticCausesForMessageId",
719         params,
720         signatures);
721              String JavaDoc res = formatArrayListForDisplay(results);
722              return res;
723     } catch (Exception JavaDoc ex) {
724         throw new FrameworkException("Error while retrieving diagnostic from messageId.", ex);
725     }
726     }
727
728    /**
729      * * This method get the diagnostic Checks based on the message id
730      */

731     private String JavaDoc getDiagnosticChecks(String JavaDoc msgId){
732
733         if (msgId == null || "".equals(msgId))
734             return formatArrayListForDisplay(null);
735         String JavaDoc params[] = {msgId};
736         String JavaDoc signatures[] = {"String"};
737         try {
738         ArrayList JavaDoc results = (ArrayList JavaDoc)MBeanUtil.invoke(
739         "com.sun.appserv:name=logmanager,category=runtime,server=server",
740         "getDiagnosticChecksForMessageId",
741         params,
742         signatures);
743              String JavaDoc res = formatArrayListForDisplay(results);
744              return res;
745     } catch (Exception JavaDoc ex) {
746         throw new FrameworkException("Error while retrieving diagnostic checks from messageId.", ex);
747     }
748     }
749
750     /**
751      * * This method get the diagnostic Checks based on the message id
752      */

753     private String JavaDoc getDiagnosticURI(String JavaDoc msgId){
754
755         if (msgId == null || "".equals(msgId))
756             return "";
757         String JavaDoc params[] = {msgId};
758         String JavaDoc signatures[] = {"String"};
759         try {
760         String JavaDoc res = (String JavaDoc)MBeanUtil.invoke(
761         "com.sun.appserv:name=logmanager,category=runtime,server=server",
762         "getDiagnosticURIForMessageId",
763         params,
764         signatures);
765             return res;
766             //return "http://www.google.com";
767
} catch (Exception JavaDoc ex) {
768         throw new FrameworkException("Error while retrieving diagnostic URI from messageId.", ex);
769     }
770     }
771
772
773     /**
774      * This handler returns true if there are results to display, false
775      * otherwise.
776      */

777     public boolean hasResults(RequestContext ctx, HandlerContext handlerCtx) {
778     DescriptorCCActionTable table = (DescriptorCCActionTable)
779         ctx.getRequest().getAttribute(TABLE);
780         if (table == null) {
781             return false;
782     }
783         DefaultModel model = (DefaultModel)table.getModel();
784     try {
785             int size = model.getSize();
786             if (size > 0) {
787                 handlerCtx.setOutputValue("hasResults", "true");
788                 return true;
789             } else {
790                 handlerCtx.setOutputValue("hasResults", "false");
791                 return false;
792             }
793     } catch (Exception JavaDoc ex) {
794             //Log exception ??
795
return false;
796     }
797     }
798
799
800     /**
801      * This handler switches the result output order.
802      */

803     public void switchDateSort(RequestContext ctx, HandlerContext handlerCtx) {
804     HttpSession JavaDoc session = ctx.getRequest().getSession();
805
806     // Get the existing value.
807
Boolean JavaDoc dir = (Boolean JavaDoc)handlerCtx.getInputValue(LOG_DATE_SORT_DIRECTION);
808     if (dir == null) {
809         dir = TRUE;
810     } else {
811         dir = new Boolean JavaDoc(dir.booleanValue()^true);
812     }
813     handlerCtx.setOutputValue(SWITCH_DATE_SORT_RESULT, dir);
814
815 // FIXME: Add this as its own handler
816
// The following makes sure the triangle points the right direction
817
// NOTE: We don't call LH's setSort() method b/c it is private,
818
// however, the following does the same thing. Note, that we
819
// only have one sortable column. If we have more in the
820
// future, the following line of code will not be sufficient.
821
// Also, if LH's implementation changes this may break.
822
ContainerView cv = (ContainerView)handlerCtx.getView().getParent();
823     HttpServletRequest JavaDoc request = ctx.getRequest();
824     cv.setDisplayFieldValue(
825         DescriptorCCActionTable.CHILD_PRIMARY_SORT_ORDER_HIDDEN_FIELD,
826         request.getParameter("sortOrder"));
827     cv.setDisplayFieldValue(
828         DescriptorCCActionTable.CHILD_PRIMARY_SORT_NAME_HIDDEN_FIELD,
829         request.getParameter("sortName"));
830     }
831
832     public void testRunning(RequestContext ctx, HandlerContext handlerCtx) {
833         View view = handlerCtx.getView();
834         ServletRequest JavaDoc request = ctx.getRequest();
835         String JavaDoc instanceName = (String JavaDoc)handlerCtx.getInputValue(INSTANCE_NAME);
836         if (isServerRunning(instanceName))
837             handlerCtx.setOutputValue("isRunning", "true" );
838         else
839             handlerCtx.setOutputValue("isRunning", "false" );
840     }
841
842     public void getLogFilesDirectory(RequestContext ctx, HandlerContext handlerCtx) {
843         ServletRequest JavaDoc request = ctx.getRequest();
844         String JavaDoc instanceName = (String JavaDoc)handlerCtx.getInputValue("instanceName");
845         try {
846             String JavaDoc dir = getLogFilesDirectory(instanceName);
847             handlerCtx.setOutputValue("logFileDirectory", dir);
848         }catch (Exception JavaDoc ex){
849             handlerCtx.setOutputValue("logFileDirectory", "");
850         }
851     }
852
853     public void displayAdvancedSearchOptions(RequestContext ctx, HandlerContext handlerCtx) {
854     View view = handlerCtx.getView();
855     if (!(view instanceof DescriptorContainerView)) {
856             View parent = view.getParent();
857             if (!(parent instanceof DescriptorContainerView)) {
858         throw new FrameworkException("View is not a DescriptorContainerView!", null, view);
859             } else {
860                 view = parent;
861             }
862         }
863         if (view instanceof DescriptorCCPageTitle) {
864             view = view.getParent();
865         }
866     DescriptorContainerView descView = (DescriptorContainerView)view;
867         ViewDescriptor propertySheetDescriptor = descView.getViewDescriptor();
868
869     if (propertySheetDescriptor == null) {
870         throw new FrameworkException("propertySheetDescriptor is null", propertySheetDescriptor, view);
871     }
872     if(!(propertySheetDescriptor instanceof CCPropertySheetDescriptor)) {
873         throw new FrameworkException("propertySheetDescriptor is of wrong type", propertySheetDescriptor, view);
874     }
875         CCPropertySheetModelInterface model = ((CCPropertySheetDescriptor)propertySheetDescriptor).getModel();
876         boolean searchAdvance = new Boolean JavaDoc(""+ctx.getRequest().getAttribute("ShowAdvanceSearch")).booleanValue();
877     if (searchAdvance) {
878         model.setVisible("advanceSearch", true);
879             model.setVisible("advanceLink", false);
880             model.setVisible("basicLink", true);
881             handlerCtx.setOutputValue("showAdvance", "true");
882     } else {
883         model.setVisible("advanceSearch", false);
884             model.setVisible("advanceLink", true);
885             model.setVisible("basicLink", false);
886             handlerCtx.setOutputValue("showAdvance", "false");
887         }
888      }
889    public String JavaDoc setEndDisplayString(RequestContext ctx, HandlerContext handlerCtx) {
890        // Get the input parameter
891
String JavaDoc endDisplayString = (String JavaDoc)handlerCtx.getInputValue(END_DISPLAY_STRING);
892        if (endDisplayString == null) {
893            throw new FrameworkException("'"+END_DISPLAY_STRING+"' cannot be null!");
894        }
895                                                                                                                                                           
896        // Return the value
897
return endDisplayString;
898    }
899    
900    
901     private static boolean isEmpty(String JavaDoc test) {
902         return ((test == null) || "".equals(test));
903     }
904
905      public static String JavaDoc getLogFilesDirectory(String JavaDoc instanceName){
906         if (isEmpty(instanceName))
907             return "";
908         String JavaDoc dir = "";
909         try{
910             if (MBeanUtil.isValidMBean("com.sun.appserv:name=logmanager,category=runtime,server="+instanceName)){
911                 dir = (String JavaDoc) MBeanUtil.invoke(
912                 "com.sun.appserv:name=logmanager,category=runtime,server="+instanceName,
913                 "getLogFilesDirectory",
914                 null,
915                 null);
916             }else{
917                 //go through node agent proxy
918
Class JavaDoc provider = Class.forName("com.sun.enterprise.ee.tools.admingui.handlers.NodeAgentLogProvider");
919                 Class JavaDoc[] type = new Class JavaDoc[]{ String JavaDoc.class };
920                 Method JavaDoc method = provider.getMethod("getLogFilesDirectory", type);
921                 Object JavaDoc[] args = new Object JavaDoc[] {instanceName};
922                 dir = (String JavaDoc) method.invoke(null, args);
923             }
924         }catch(Exception JavaDoc ex){
925         }
926         return dir;
927      }
928
929      public static boolean isServerRunning(String JavaDoc instanceName){
930          if(isEmpty(instanceName))
931              return false;
932          return MBeanUtil.isValidMBean("com.sun.appserv:name=logmanager,category=runtime,server="+instanceName);
933      }
934
935
936      private AttributeList JavaDoc getLogRecordsUsingQuery(String JavaDoc logManagerObjectName, String JavaDoc instanceName, Object JavaDoc[]params, String JavaDoc[] QUERY_SIGNATURE)
937      {
938          AttributeList JavaDoc results = null;
939          if (MBeanUtil.isValidMBean(logManagerObjectName)){
940          results = (AttributeList JavaDoc)MBeanUtil.invoke(
941         logManagerObjectName,
942         "getLogRecordsUsingQuery",
943         params,
944         QUERY_SIGNATURE);
945             return results;
946          }
947          try {
948              //go through node agent proxy
949
Class JavaDoc provider = Class.forName("com.sun.enterprise.ee.tools.admingui.handlers.NodeAgentLogProvider");
950              Class JavaDoc[] type = new Class JavaDoc[]{
951                             String JavaDoc.class,
952                             Object JavaDoc[].class};
953             Method JavaDoc method = provider.getMethod("getLogRecordsUsingQuery", type);
954             Object JavaDoc[] args = new Object JavaDoc[] { instanceName, params};
955             results = (AttributeList JavaDoc) method.invoke(null, args);
956          }catch (Exception JavaDoc ex){
957             throw new FrameworkException (ex);
958          }
959          return results;
960      }
961
962
963     /**
964      *
965      */

966     public static final Integer JavaDoc ONE = new Integer JavaDoc(1);
967
968     /**
969      * FALSE
970      */

971     public static final Boolean JavaDoc FALSE = new Boolean JavaDoc(false);
972
973     /**
974      * TRUE
975      */

976     public static final Boolean JavaDoc TRUE = new Boolean JavaDoc(true);
977
978     /**
979      * This is the log query method signature.
980      */

981     public static final String JavaDoc[] QUERY_SIGNATURE = {
982             "java.lang.String", //Added the extra parameter to bring up the page. Need to revisit.
983
"java.lang.Long", // fromRecord
984
"java.lang.Boolean", // next?
985
"java.lang.Boolean", // forward?
986
"java.lang.Integer", // requestedCount
987
"java.util.Date", // fromDate
988
"java.util.Date", // toDate
989
"java.lang.String", // logLevel
990
"java.lang.Boolean", // onlyLevel?
991
"java.util.List", // listOfModules
992
"java.util.Properties" // nameValueMap
993
};
994
995
996     /**
997      * Attribute Input "logTable", the table used to display the output
998      */

999     public static final String JavaDoc TABLE = "logTable";
1000
1001    /**
1002     * Attribute Input "logModel", the model to use
1003     */

1004    public static final String JavaDoc LOG_MODEL = "logModel";
1005
1006    /**
1007     * Attribute Input "dateEnabled"
1008     */

1009    public static final String JavaDoc DATE_ENABLED = "dateEnabled";
1010
1011    /**
1012     * Attribute Input "afterRecord"
1013     */

1014    public static final String JavaDoc AFTER_RECORD = "afterRecord";
1015
1016    /**
1017     * Attribute Input "fromRecord"
1018     */

1019    public static final String JavaDoc FROM_RECORD = "fromRecord";
1020
1021    /**
1022     * Attribute Input "archivedLogFile"
1023     */

1024    public static final String JavaDoc ARCHIVED_LOG_FILE = "archivedLogFile";
1025
1026
1027    /**
1028     * Attribute Input "fromDate"
1029     */

1030    public static final String JavaDoc FROM_DATE = "fromDate";
1031
1032    /**
1033     * Attribute Input "fromTime"
1034     */

1035    public static final String JavaDoc FROM_TIME = "fromTime";
1036
1037    /**
1038     * Attribute Input "toDate"
1039     */

1040    public static final String JavaDoc TO_DATE = "toDate";
1041
1042    /**
1043     * Attribute Input "toTime"
1044     */

1045    public static final String JavaDoc TO_TIME = "toTime";
1046
1047    /**
1048     * Attribute Input "loggers"
1049     */

1050    public static final String JavaDoc LOGGERS = "loggers";
1051
1052    /**
1053     * Attribute Input "logLevel"
1054     */

1055    public static final String JavaDoc LOG_LEVEL = "logLevel";
1056
1057    /**
1058     * Attribute Input "customLogger";
1059     */

1060    public static final String JavaDoc CUSTOM_LOGGERS = "customLogger";
1061
1062    /**
1063     * Attribute Input "nvp";
1064     */

1065    public static final String JavaDoc NVP = "nvp";
1066
1067    /**
1068     * Attribute Input "numberToDisplay";
1069     */

1070    public static final String JavaDoc NUMBER_TO_DISPLAY = "numberToDisplay";
1071
1072    /**
1073     * Attribute Input "only";
1074     */

1075    public static final String JavaDoc ONLY_LEVEL = "only";
1076
1077    /**
1078     * This is a Session key to the sort direction.
1079     */

1080    public static final String JavaDoc LOG_DATE_SORT_DIRECTION = "LOG_DATE_SORT_DIRECTION";
1081    public static final String JavaDoc SWITCH_DATE_SORT_RESULT = "result";
1082
1083    /**
1084     *
1085     */

1086    public static final String JavaDoc FIRST_LOG_ROW = "firstLogRow";
1087
1088    /**
1089     *
1090     */

1091    public static final String JavaDoc LAST_LOG_ROW = "lastLogRow";
1092
1093    /**
1094     * If the number to display is not specified, this value will be used
1095     * (40).
1096     */

1097    public static final Integer JavaDoc DEFAULT_NUMBER_TO_DISPLAY = new Integer JavaDoc(40);
1098
1099    /**
1100     * The following constant defines the valid delimiters that can be used
1101     * to seperate custom loggers on input. (" \t\n\r\f,;:")
1102     */

1103    public static final String JavaDoc CUSTOM_LOGGER_DELIMITERS = " \t\n\r\f,;:";
1104
1105    /**
1106     * The following constant defines the valid delimiters that can be used
1107     * to seperate nvp entries on input. (" \t\n\r\f,;:")
1108     */

1109    public static final String JavaDoc NVP_DELIMITERS = " \t\n\r\f,;:";
1110
1111    /**
1112     * This is the delimiter between the property name and property value.
1113     */

1114    public static final char EQUALS = '=';
1115
1116    /**
1117     * This specifies how TIME fields are input and displayed. We need to do
1118     * this in order to get a display/input that works with milliseconds.
1119     * Perhaps in the future we may want to just append the milliseconds?
1120     */

1121    public static final String JavaDoc TIME_FORMAT = " HH:mm:ss.SSS";
1122    public static final String JavaDoc TIME_FORMAT_2 = " HH:mm:ss";
1123    public static final String JavaDoc TIME_FORMAT_3 = " HH:mm";
1124
1125    /**
1126     * This defines the output parameter for the getTime handler. ("value")
1127     */

1128    public static final String JavaDoc GET_TIME_RESULT = "value";
1129
1130    /**
1131     * This specifies the attribute used to define the date format (short,
1132     * medium, long, full). ("dateFormat")
1133     */

1134    public static final String JavaDoc DATE_FORMAT = "dateFormat";
1135
1136    /**
1137     * This specifies the output value used to return the date. ("value")
1138     */

1139    public static final String JavaDoc DATE_VALUE = "value";
1140
1141    /**
1142     * This defines the short date format, used by DATE_FORMAT. ("short")
1143     */

1144    public static final String JavaDoc GET_DATE_SHORT = "short";
1145
1146    /**
1147     * This defines the medium date format, used by DATE_FORMAT. ("medium")
1148     */

1149    public static final String JavaDoc GET_DATE_MEDIUM = "medium";
1150
1151    /**
1152     * This defines the long date format, used by DATE_FORMAT. ("long")
1153     */

1154    public static final String JavaDoc GET_DATE_LONG = "long";
1155
1156    /**
1157     * This defines the full date format, used by DATE_FORMAT. ("full")
1158     */

1159    public static final String JavaDoc GET_DATE_FULL = "full";
1160
1161    /**
1162     * This attribute key should have a value of "false" in order to retrieve
1163     * the full messages.
1164     */

1165    public static final String JavaDoc TRUNCATE_MESSAGE = "truncateMessage";
1166
1167    /**
1168     * This attribute is used if TRUNCATE_MESSAGE is true. The attribute
1169     * associated with this key should be a number representing the number of
1170     * characters shown before the message is truncated.
1171     */

1172    public static final String JavaDoc TRUNCATE_LENGTH = "truncateLength";
1173
1174    /**
1175     * This model key is set by the filter method, it is true if a
1176     * level image should be displayed.
1177     */

1178    public static final String JavaDoc SHOW_LEVEL_IMAGE = "showLevelImage";
1179
1180    /**
1181     * This is the root directory of the alert images
1182     */

1183    public static final String JavaDoc LEVEL_IMAGE_ROOT =
1184    "/com_sun_web_ui/images/alerts/";
1185
1186    /**
1187     * Input parameter to specify the resource bundle.
1188     */

1189    public static final String JavaDoc RESOURCE_BUNDLE = "resourceBundle";
1190
1191    /**
1192     * The input value key for the String representing the previous button.
1193     */

1194    public static final String JavaDoc PREV_BUTTON_STRING = "prevButtonString";
1195
1196    /**
1197     * The input value key for the String representing the next button.
1198     */

1199    public static final String JavaDoc NEXT_BUTTON_STRING = "nextButtonString";
1200    
1201    /**
1202     * The input value key for the String representing search links.
1203     */

1204    public static final String JavaDoc END_DISPLAY_STRING = "endDisplayString";
1205
1206    /**
1207     * Input parameter to specify the server instance name.
1208     */

1209    public static final String JavaDoc LOG_MANAGER_OBJECT_NAME = "logManagerObjectName";
1210    public static final String JavaDoc INSTANCE_NAME = "instanceName";
1211}
1212
Popular Tags