ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/DBReporter/ReportPage.java
Revision: 1.9
Committed: Sun Jan 7 19:13:14 2001 UTC (24 years, 11 months ago) by pjm2
Branch: MAIN
Changes since 1.8: +18 -5 lines
Log Message:
All generated pages are now stored as metadata in ReportPages.  This will
allow the index pages to be created more easily.

File Contents

# User Rev Content
1 pjm2 1.1 //---PACKAGE DECLARATION---
2    
3     //---IMPORTS---
4    
5     /**
6     * An object to store page/link data.
7     *
8 pjm2 1.2 * @author $Author: pjm2 $
9     * @version $Id: ReportPage.java,v 1.1 2000/12/11 21:26:46 pjm2 Exp $
10 pjm2 1.1 */
11     public class ReportPage {
12    
13     //---FINAL ATTRIBUTES---
14    
15     /**
16     * The current CVS revision of this class
17     */
18 pjm2 1.2 public final String REVISION = "$Revision: 1.1 $";
19 pjm2 1.1
20 pjm2 1.5 public static final int HOUR = 0;
21     public static final int DAY = 1;
22     public static final int WEEK = 2;
23     public static final int MONTH = 3;
24    
25    
26 pjm2 1.1 //---STATIC METHODS---
27    
28     //---CONSTRUCTORS---
29    
30 pjm2 1.9 public ReportPage(String location, String machine_name, String when, String report, int type){
31 pjm2 1.1
32 pjm2 1.2 if (type < HOUR || type > MONTH){
33 pjm2 1.1 System.out.println("Could not add the page.");
34     }
35    
36     _location = location;
37 pjm2 1.9 _machine_name = machine_name;
38     _when = when;
39     _report = report;
40 pjm2 1.1 _type = type;
41     }
42    
43     //---PUBLIC METHODS---
44    
45    
46     /**
47     * Overrides the {@link java.lang.Object#toString() Object.toString()}
48     * method to provide clean logging (every class should have this).
49     *
50     * @return the name of this class and its CVS revision
51     */
52     public String toString() {
53     return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")";
54     }
55    
56     //---PRIVATE METHODS---
57    
58    
59     //---ACCESSOR/MUTATOR METHODS---
60    
61     public String getLocation(){
62     return _location;
63     }
64    
65 pjm2 1.9 public String getMachineName(){
66     return _machine_name;
67     }
68    
69     public String getWhen(){
70     return _when;
71     }
72    
73     public String getReport(){
74     return _report;
75 pjm2 1.1 }
76    
77     public int getType(){
78     return _type;
79     }
80 pjm2 1.9
81 pjm2 1.1
82    
83     //---ATTRIBUTES---
84    
85     private String _location;
86 pjm2 1.9 private String _machine_name;
87     private String _when;
88     private String _report;
89 pjm2 1.1 private int _type;
90    
91     //---STATIC ATTRIBUTES---
92    
93     }