View Javadoc

1   /*
2    * The contents of this file are subject to the terms 
3    * of the Common Development and Distribution License 
4    * (the "License").  You may not use this file except 
5    * in compliance with the License.
6    * 
7    * You can obtain a copy of the license at 
8    * http://www.sun.com/cddl/cddl.html. 
9    * See the License for the specific language governing 
10   * permissions and limitations under the License.
11   * 
12   * When distributing Covered Code, include this CDDL 
13   * HEADER in each file and include the License file at 
14   * license.txt.  If applicable, add the following below 
15   * this CDDL HEADER, with the fields enclosed by brackets 
16   * "[]" replaced with your own identifying information: 
17   * Portions Copyright [yyyy] [name of copyright owner]
18   * 
19   * Portions Copyright 2004 eBay, Inc.
20   */
21  package com.ebay.carad.os.vitalsigns;
22  
23  
24  /***
25   * Configuration object for the reports that are run by ReportAgent.
26   * 
27   * @author Jeremy Kraybill
28   * @author Jeremy Thomerson
29   * @version $Id$
30   */
31  public interface IDashboardReport extends Comparable, IReportingListenerContainer {
32  	
33      
34      /***
35       * Causes this report to run; based on this report's configuration, may cause logging and/or
36       * report generation to occur.
37       * 
38       * @param reportTime the time this report run was kicked off (in ms since epoch)
39       * @throws ReportingException if bad things happen during the run
40       */
41      public void run(IDashboardAgent agent, long reportTime) throws ReportingException;
42      
43      /***
44       * @return The data from the most recent run.
45       */
46      Float getThisRunData();
47      
48      /***
49       * @return the data from the run prior to the most recent run
50       */
51      Float getPreviousData();
52  
53      /***
54  	 * Returns the ID of this report, used to key off the report's datasource.
55  	 * 
56  	 * @return the ID of the report
57  	 */
58  	public int getID();
59  
60  	/***
61  	 * Returns the title of this report.
62  	 * 
63  	 * @return the title of this report
64  	 */
65  	public String getTitle();
66  	
67  	/***
68  	 * Returns the sub-title of this report, which will appear under the report's main title.
69  	 * 
70  	 * @return the sub-title
71  	 */
72  	public String getSubTitle();
73  
74  	/***
75  	 * Returns the display sort order of this report.
76  	 * 
77  	 * @return the sortorder for display purposes
78  	 */
79  	public int getSortOrder();
80  	
81  	/***
82  	 * Returns whether this report represents a value that should be increasing over time.
83  	 * 
84  	 * @return if true, this report is "happy" when its value has increased
85  	 */
86  	public boolean getMoreIsBetter();
87  	
88  	/***
89  	 * Gets the frequency in minutes for the logging and generation of this report.
90  	 * 
91  	 * @return the frequency in minutes
92  	 */
93  	public int getFrequencyInMinutes();
94  	
95  	/***
96  	 * @return whether this report should be included in any summaries generated regarding reports
97  	 */
98  	public boolean getIncludeInSummary();
99  
100 }