ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/TemplateClass.java
(Generate patch)

Comparing projects/cms/source/TemplateClass.java (file contents):
Revision 1.6 by ajm, Thu Dec 7 19:49:27 2000 UTC vs.
Revision 1.13 by tdb, Sat May 18 18:15:56 2002 UTC

# Line 1 | Line 1
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>
# Line 28 | Line 49 | class TemplateClass {
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 uk.ac.iscream.util.IscreamNamer.formatName(
59 <            uk.ac.iscream.util.ReferenceManager.getInstance().getName(),
60 <            this.getClass().getName(),
58 >        return FormatName.getName(
59 >            _name,
60 >            getClass().getName(),
61              REVISION);
62      }
63  
# Line 42 | Line 66 | class TemplateClass {
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines