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.1 by ajm, Wed Nov 8 18:16:42 2000 UTC vs.
Revision 1.9 by ajm, Tue Dec 12 18:30:01 2000 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines