KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > portlet > admin > BaseAdminObject


1 /*
2  * Copyright 2003,2004,2005 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 package org.apache.pluto.portlet.admin;
17
18
19 /**
20  * Base object that contains convenience logging methods.
21  *
22  * @author Craig Doremus
23  *
24  */

25 public class BaseAdminObject {
26
27     //Name of the subclass
28
private String JavaDoc _className = null;
29     //Identifier for the logging record
30
private String JavaDoc _logId = null;
31
32     /**
33      * Default constructor.
34      *
35      */

36     protected BaseAdminObject() {
37     }
38
39     protected BaseAdminObject(String JavaDoc className) {
40         _className = className;
41     }
42
43     protected BaseAdminObject(String JavaDoc className, String JavaDoc logId) {
44         _className = className;
45         _logId = logId;
46     }
47
48     protected void logMethodStart(String JavaDoc methodName) {
49         PlutoAdminLogger.logMethodStart(_className, methodName);
50     }
51
52     protected void logMethodEnd(String JavaDoc methodName) {
53         PlutoAdminLogger.logMethodEnd(_className, methodName);
54     }
55
56     protected void logMethodEnd(String JavaDoc methodName, Object JavaDoc retVal) {
57         PlutoAdminLogger.logMethodEnd(_className, methodName, retVal);
58     }
59
60     protected void logParam(String JavaDoc methodName, String JavaDoc paramName, Object JavaDoc paramVal) {
61         PlutoAdminLogger.logParam(_className, methodName, paramName, paramVal);
62     }
63
64     protected void logParam(String JavaDoc methodName, String JavaDoc paramName, int paramVal) {
65         PlutoAdminLogger.logParam(_className, methodName, paramName, paramVal);
66     }
67
68     protected void logParam(String JavaDoc methodName, String JavaDoc paramName, boolean paramVal) {
69         PlutoAdminLogger.logParam(_className, methodName, paramName, paramVal);
70     }
71
72     protected void logVar(String JavaDoc methodName, String JavaDoc varName, Object JavaDoc varVal) {
73         PlutoAdminLogger.logParam(_className, methodName, varName, varVal);
74     }
75
76     protected void logVar(String JavaDoc methodName, String JavaDoc varName, int varVal) {
77         PlutoAdminLogger.logParam(_className, methodName, varName, varVal);
78     }
79
80     protected void logVar(String JavaDoc methodName, String JavaDoc varName, boolean varVal) {
81         PlutoAdminLogger.logParam(_className, methodName, varName, varVal);
82     }
83
84     protected void logDebug(String JavaDoc methodName, String JavaDoc msg) {
85         PlutoAdminLogger.logDebug(_className, methodName, msg);
86     }
87
88     protected void logWarn(String JavaDoc methodName, String JavaDoc msg) {
89         PlutoAdminLogger.logWarn(_className, methodName, msg);
90     }
91
92     protected void logError(String JavaDoc methodName, String JavaDoc msg, Throwable JavaDoc e) {
93         PlutoAdminLogger.logError(_className, methodName, msg, e);
94     }
95
96     protected void logError(String JavaDoc methodName, Throwable JavaDoc e) {
97         PlutoAdminLogger.logError(_className, methodName, e);
98     }
99 }
100
Popular Tags