Project Report: fawkez

Packagesummary org.jcoderz.commons.logging

org.jcoderz.commons.logging.DisplayOptions

LineHitsNoteSource
1  /*
2   * $Id: DisplayOptions.java 1299 2009-03-23 20:06:23Z amandel $
3   *
4   * Copyright 2006, The jCoderZ.org Project. 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 are
8   * met:
9   *
10   *    * Redistributions of source code must retain the above copyright
11   *      notice, this list of conditions and the following disclaimer.
12   *    * Redistributions in binary form must reproduce the above
13   *      copyright notice, this list of conditions and the following
14   *      disclaimer in the documentation and/or other materials
15   *      provided with the distribution.
16   *    * Neither the name of the jCoderZ.org Project nor the names of
17   *      its contributors may be used to endorse or promote products
18   *      derived from this software without specific prior written
19   *      permission.
20   *
21   * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
22   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24   * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS
25   * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
28   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32   */
33  package org.jcoderz.commons.logging;
34  
35  /**
36   * This class comprises display options, i.e. which fields are to
37   * display with how many details.
38   *
39   */
40100(1)public final class DisplayOptions
41        implements Cloneable
42  {
43100    private boolean mDisplayParameters = true;
44100    private boolean mDisplaySolution = true;
45100    private boolean mDisplayMethod = false;
46100    private boolean mDisplayThreadId = false;
47100    private boolean mDisplayNodeId = true;
48100    private boolean mDisplayInstanceId = true;
49100    private boolean mDisplayBusinessImpact = false;
50100    private boolean mDisplayCategory = false;
51100    private boolean mDisplayLevel = false;
52100    private boolean mDisplayTimestamp = false;
53100    private boolean mDisplayRecordNumber = false;
54100    private boolean mDisplayClass = false;
55100    private boolean mDisplaySymbol = true;
56100    private boolean mDisplaySymbolId = true;
57100    private boolean mDisplayTrackingNumber = true;
58100    private boolean mDisplayStackTrace = true;
59100    private boolean mDisplayMessageStackTrace = false;
60100    private boolean mDisplayTraceLines = false;
61100    private boolean mThreadName = false;
62  
63     /**
64      * Sets the flag whether the thread id is displayed.
65      *
66      * @param display If true, thread id is displayed; if false do not display
67      * the thread id.
68      */
69     public void displayThreadId (final boolean display)
70     {
710       mDisplayThreadId = display;
720    }
73  
74     /**
75      * Gets the flag whether the thread id is displayed.
76      *
77      * @return true if the thread id is to display; false, else.
78      */
79     public boolean displayThreadId ()
80     {
810       return mDisplayThreadId;
82     }
83  
84     /**
85      * Sets the flag whether the node id is displayed.
86      *
87      * @param display If true, node id is displayed; if false do not display
88      * the node id.
89      */
90     public void displayNodeId (final boolean display)
91     {
920       mDisplayNodeId = display;
930    }
94  
95     /**
96      * Gets the flag whether the node id is displayed.
97      *
98      * @return true if the node id is to display; false, else.
99      */
100     public boolean displayNodeId ()
101     {
1020       return mDisplayNodeId;
103     }
104  
105     /**
106      * Sets the flag whether the instance id is displayed.
107      *
108      * @param display If true, instance id is displayed; if false do not display
109      * the instance id.
110      */
111     public void displayInstanceId (final boolean display)
112     {
1130       mDisplayInstanceId = display;
1140    }
115  
116     /**
117      * Gets the flag whether the instance id is displayed.
118      *
119      * @return true if the instance id is to display; false, else.
120      */
121     public boolean displayInstanceId ()
122     {
1230       return mDisplayInstanceId;
124     }
125  
126     /**
127      * Sets the flag whether the business impact is displayed.
128      *
129      * @param display If true, business impact is displayed; if false do not
130      * display the business impact.
131      */
132     public void displayBusinessImpact (final boolean display)
133     {
1340       mDisplayBusinessImpact = display;
1350    }
136  
137     /**
138      * Gets the flag whether the business impact is displayed.
139      *
140      * @return true if the business impact is to display; false, else.
141      */
142     public boolean displayBusinessImpact ()
143     {
1440       return mDisplayBusinessImpact;
145     }
146  
147     /**
148      * Sets the flag whether the category is displayed.
149      *
150      * @param display If true, category is displayed; if false do not
151      * display the category.
152      */
153     public void displayCategory (final boolean display)
154     {
1550       mDisplayCategory = display;
1560    }
157  
158     /**
159      * Gets the flag whether the category is displayed.
160      *
161      * @return true if the category is to display; false, else.
162      */
163     public boolean displayCategory ()
164     {
1650       return mDisplayCategory;
166     }
167  
168     /**
169      * Sets the flag whether the thread name is displayed.
170      *
171      * @param display If true, the thread name is displayed; if false do not
172      * display the thread name.
173      */
174     public void displayThreadName (final boolean display)
175     {
1760       mThreadName = display;
1770    }
178  
179     /**
180      * Sets the flag whether the thread name should be displayed.
181      * @return true, the thread name is displayed; if false do not
182      * display the thread name.
183      */
184     public boolean displayThreadName ()
185     {
1860       return mThreadName;
187     }
188  
189     /**
190      * Sets the flag whether the logger level / severity is displayed.
191      *
192      * @param display If true, logger level is displayed; if false do not
193      * display the logger level.
194      */
195     public void displayLoggerLevel (final boolean display)
196     {
1970       mDisplayLevel = display;
1980    }
199  
200     /**
201      * Gets the flag whether the logger level is displayed.
202      *
203      * @return true if the logger level is to display; false, else.
204      */
205     public boolean displayLoggerLevel ()
206     {
2070       return mDisplayLevel;
208     }
209  
210     /**
211      * Sets the flag whether the timestamp is displayed.
212      *
213      * @param display If true, timestamp is displayed; if false do not
214      * display the timestamp.
215      */
216     public void displayTimestamp (final boolean display)
217     {
2180       mDisplayTimestamp = display;
2190    }
220  
221     /**
222      * Gets the flag whether the timestamp is displayed.
223      *
224      * @return true if the timestamp is to display; false, else.
225      */
226     public boolean displayTimestamp ()
227     {
2280       return mDisplayTimestamp;
229     }
230  
231     /**
232      * Sets the flag whether the record number of a log file record is displayed.
233      *
234      * @param display If true, record number is displayed; if false do not
235      * display the record number.
236      */
237     public void displayRecordNumber (final boolean display)
238     {
2390       mDisplayRecordNumber = display;
2400    }
241  
242     /**
243      * Gets the flag whether the record number is displayed.
244      *
245      * @return true if the record number is to display; false, else.
246      */
247     public boolean displayRecordNumber ()
248     {
2490       return mDisplayRecordNumber;
250     }
251  
252     /**
253      * Sets the flag whether the source class, where the message was logged, is
254      * displayed.
255      *
256      * @param display If true, source class is displayed; if false do not
257      * display the source class.
258      */
259     public void displaySourceClass (final boolean display)
260     {
2610       mDisplayClass = display;
2620    }
263  
264     /**
265      * Gets the flag whether the source class name is displayed.
266      *
267      * @return true if the source class name is to display; false, else.
268      */
269     public boolean displaySourceClass ()
270     {
2710       return mDisplayClass;
272     }
273  
274     /**
275      * Sets the flag whether the source method, where the message was logged, is
276      * displayed.
277      *
278      * @param display If true, source method is displayed; if false do not
279      * display the source method.
280      */
281     public void displaySourceMethod (final boolean display)
282     {
2830       mDisplayMethod = display;
2840    }
285  
286     /**
287      * Gets the flag whether the source method name is displayed.
288      *
289      * @return true if the source method name is to display; false, else.
290      */
291     public boolean displaySourceMethod ()
292     {
2930       return mDisplayMethod;
294     }
295  
296     /**
297      * Sets the flag whether the possible solution for a message is displayed.
298      *
299      * @param display If true, solution is displayed; if false do not
300      * display the solution.
301      */
302     public void displaySolution (final boolean display)
303     {
3040       mDisplaySolution = display;
3050    }
306  
307     /**
308      * Gets the flag whether the possible solution is displayed.
309      *
310      * @return true if the solution is to display; false, else.
311      */
312     public boolean displaySolution ()
313     {
3140       return mDisplaySolution;
315     }
316  
317     /**
318      * Sets the flag whether the parameters for a message are displayed.
319      *
320      * @param display If true, parameters are displayed; if false do not
321      * display the parameters.
322      */
323     public void displayParameters (final boolean display)
324     {
3250       mDisplayParameters = display;
3260    }
327  
328     /**
329      * Gets the flag whether the parameters are displayed.
330      *
331      * @return true if the parameters are to display; false, else.
332      */
333     public boolean displayParameters ()
334     {
3350       return mDisplayParameters;
336     }
337  
338     /**
339      * Sets the flag whether the symbol is displayed.
340      *
341      * @param display If true, the symbol is displayed; if false do not
342      * display the symbol.
343      */
344     public void displaySymbol (final boolean display)
345     {
3460       mDisplaySymbol = display;
3470    }
348  
349     /**
350      * Gets the flag whether the symbol is displayed.
351      *
352      * @return true if the symbol is to display; false, else.
353      */
354     public boolean displaySymbol ()
355     {
3560       return mDisplaySymbol;
357     }
358  
359     /**
360      * Sets the flag whether the symbol id is displayed.
361      *
362      * @param display If true, the symbol id is displayed; if false do not
363      * display the symbol id.
364      */
365     public void displaySymbolId (final boolean display)
366     {
3670       mDisplaySymbolId = display;
3680    }
369  
370     /**
371      * Gets the flag whether the symbol id is displayed.
372      *
373      * @return true if the symbol id is to display; false, else.
374      */
375     public boolean displaySymbolId ()
376     {
3770       return mDisplaySymbolId;
378     }
379  
380     /**
381      * Sets the flag whether the sequence of tracking numbers is displayed.
382      *
383      * @param display If true, the sequence of tracking numbers is displayed;
384      * if false do not display the sequence of tracking numbers.
385      */
386     public void displayTrackingNumber (final boolean display)
387     {
3880       mDisplayTrackingNumber = display;
3890    }
390  
391     /**
392      * Gets the flag whether the sequence of tracking numbers is displayed.
393      *
394      * @return true if the sequence of tracking numbers is to display;
395      * false, else.
396      */
397     public boolean displayTrackingNumber ()
398     {
3990       return mDisplayTrackingNumber;
400     }
401  
402     /**
403      * Sets the flag whether the stack trace of an exception is displayed.
404      *
405      * @param display If true, the stacktrace of an exception is displayed;
406      * if false do not display an exception's stacktrace.
407      */
408     public void displayStackTrace (final boolean display)
409     {
4100       mDisplayStackTrace = display;
4110    }
412  
413     /**
414      * Gets the flag whether an exception's stacktrace is displayed.
415      *
416      * @return true if the stacktrace of an exception is to display; false, else.
417      */
418     public boolean displayStackTrace ()
419     {
420100       return mDisplayStackTrace;
421     }
422  
423     /**
424      * Sets the flag whether the stack trace of a log message is displayed.
425      *
426      * @param display If true, the stacktrace of a log message is displayed;
427      * if false do not display a log message's stacktrace.
428      */
429     public void displayMessageStackTrace (final boolean display)
430     {
4310       mDisplayMessageStackTrace = display;
4320    }
433  
434     /**
435      * Gets the flag whether a log message's stacktrace is displayed.
436      *
437      * @return true if the stacktrace of an log message is to display;
438      * false, else.
439      */
440     public boolean displayMessageStackTrace ()
441     {
442100       return mDisplayMessageStackTrace;
443     }
444  
445     /**
446      * Sets the flag whether standard trace logs are displayed, i.e. undeclared
447      * log messages, which are generated by standard logger api calls.
448      *
449      * @param display If true, standard trace logs are displayed;
450      * if false do not display standard trace logs.
451      */
452     public void displayTraceLines (final boolean display)
453     {
4540       mDisplayTraceLines = display;
4550    }
456  
457     /**
458      * Gets the flag whether standard trace logs are displayed, i.e. undeclared
459      * log messages, which are generated by standard logger api calls.
460      *
461      * @return true if trace logs are to display; false, else.
462      */
463     public boolean displayTraceLines ()
464     {
4650       return mDisplayTraceLines;
466     }
467  
468     /** {@inheritDoc} */
469     public Object clone ()
470         throws CloneNotSupportedException
471     {
4720        return super.clone();
473     }
474  }

Findings in this File

c (1) 40 : 0 Type Javadoc comment is missing an @author tag.