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.4 by tdb, Mon Nov 13 17:08:13 2000 UTC vs.
Revision 1.12 by tdb, Tue May 29 17:08:10 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2  
3   //---IMPORTS---
4 + import uk.org.iscream.cms.server.util.*;
5 + import uk.org.iscream.cms.server.componentmanager.*;
6  
7   /**
8   * <ONE LINE DESCRIPTION>
# Line 16 | Line 18 | class TemplateClass {
18      /**
19       * The current CVS revision of this class
20       */
21 <    public final String REVISION = "$Revision$";
21 >    public static final String REVISION = "$Revision$";
22      
23   //---STATIC METHODS---
24  
# Line 28 | Line 30 | class TemplateClass {
30       * Overrides the {@link java.lang.Object#toString() Object.toString()}
31       * method to provide clean logging (every class should have this).
32       *
33 +     * This uses the uk.org.iscream.cms.server.util.FormatName class
34 +     * to format the toString()
35 +     *
36       * @return the name of this class and its CVS revision
37       */
38      public String toString() {
39 <        return this.getClass().getName() + ":" + REVISION;
39 >        return FormatName.getName(
40 >            _name,
41 >            getClass().getName(),
42 >            REVISION);
43      }
44  
45   //---PRIVATE METHODS---
# Line 39 | Line 47 | class TemplateClass {
47   //---ACCESSOR/MUTATOR METHODS---
48  
49   //---ATTRIBUTES---
50 +
51 +    /**
52 +     * This is the friendly identifier of the
53 +     * component this class is running in.
54 +     * eg, a Filter may be called "filter1",
55 +     * If this class does not have an owning
56 +     * component,  a name from the configuration
57 +     * can be placed here.  This name could also
58 +     * be changed to null for utility classes.
59 +     */
60 +    private String _name = <!THIS SHOULD CALL A STATIC NAME IN THE COMPONENT CLASS FOR THIS OBJECT!>;
61 +
62 +    /**
63 +     * This holds a reference to the
64 +     * system logger that is being used.
65 +     */
66 +    private Logger _logger = ReferenceManager.getInstance().getLogger();
67  
68   //---STATIC ATTRIBUTES---
69  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines