1 |
+ |
/* |
2 |
+ |
* i-scream central monitoring system |
3 |
+ |
* Copyright (C) 2000-2002 i-scream |
4 |
+ |
* |
5 |
+ |
* This program is free software; you can redistribute it and/or |
6 |
+ |
* modify it under the terms of the GNU General Public License |
7 |
+ |
* as published by the Free Software Foundation; either version 2 |
8 |
+ |
* of the License, or (at your option) any later version. |
9 |
+ |
* |
10 |
+ |
* This program is distributed in the hope that it will be useful, |
11 |
+ |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
+ |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
+ |
* GNU General Public License for more details. |
14 |
+ |
* |
15 |
+ |
* You should have received a copy of the GNU General Public License |
16 |
+ |
* along with this program; if not, write to the Free Software |
17 |
+ |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 |
+ |
*/ |
19 |
+ |
|
20 |
|
//---PACKAGE DECLARATION--- |
21 |
|
|
22 |
|
//---IMPORTS--- |
23 |
+ |
import uk.org.iscream.cms.server.util.*; |
24 |
+ |
import uk.org.iscream.cms.server.componentmanager.*; |
25 |
|
|
26 |
|
/** |
27 |
|
* <ONE LINE DESCRIPTION> |
28 |
|
* <DETAILED DESCRIPTION> |
29 |
|
* |
9 |
– |
* $Log$ |
10 |
– |
* Revision 1.1 2000/11/08 18:16:42 ajm |
11 |
– |
* initial checkin of template |
12 |
– |
* |
13 |
– |
* |
30 |
|
* @author $Author$ |
31 |
|
* @version $Id$ |
32 |
|
*/ |
33 |
|
class TemplateClass { |
34 |
+ |
|
35 |
|
//---FINAL ATTRIBUTES--- |
36 |
< |
final String REVISION = "$Revision$"; |
36 |
> |
|
37 |
> |
/** |
38 |
> |
* The current CVS revision of this class |
39 |
> |
*/ |
40 |
> |
public static final String REVISION = "$Revision$"; |
41 |
> |
|
42 |
|
//---STATIC METHODS--- |
43 |
|
|
44 |
|
//---CONSTRUCTORS--- |
46 |
|
//---PUBLIC METHODS--- |
47 |
|
|
48 |
|
/** |
49 |
< |
* Overrides the {@link #java.lang.Object.toString() Object.toString()} |
49 |
> |
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
50 |
|
* method to provide clean logging (every class should have this). |
51 |
+ |
* |
52 |
+ |
* This uses the uk.org.iscream.cms.server.util.FormatName class |
53 |
+ |
* to format the toString() |
54 |
+ |
* |
55 |
+ |
* @return the name of this class and its CVS revision |
56 |
|
*/ |
57 |
|
public String toString() { |
58 |
< |
return this.getClass().getName() + REVISION; |
58 |
> |
return FormatName.getName( |
59 |
> |
_name, |
60 |
> |
getClass().getName(), |
61 |
> |
REVISION); |
62 |
|
} |
63 |
|
|
64 |
|
//---PRIVATE METHODS--- |
66 |
|
//---ACCESSOR/MUTATOR METHODS--- |
67 |
|
|
68 |
|
//---ATTRIBUTES--- |
69 |
+ |
|
70 |
+ |
/** |
71 |
+ |
* This is the friendly identifier of the |
72 |
+ |
* component this class is running in. |
73 |
+ |
* eg, a Filter may be called "filter1", |
74 |
+ |
* If this class does not have an owning |
75 |
+ |
* component, a name from the configuration |
76 |
+ |
* can be placed here. This name could also |
77 |
+ |
* be changed to null for utility classes. |
78 |
+ |
*/ |
79 |
+ |
private String _name = <!THIS SHOULD CALL A STATIC NAME IN THE COMPONENT CLASS FOR THIS OBJECT!>; |
80 |
+ |
|
81 |
+ |
/** |
82 |
+ |
* This holds a reference to the |
83 |
+ |
* system logger that is being used. |
84 |
+ |
*/ |
85 |
+ |
private Logger _logger = ReferenceManager.getInstance().getLogger(); |
86 |
|
|
87 |
|
//---STATIC ATTRIBUTES--- |
88 |
|
|