View Javadoc
1 /* 2 Bloof - visualize the evolution of your software project 3 Copyright ( C ) 2003 Lukasz Pekacki <lukasz@pekacki.de> 4 http://bloof.sf.net/ 5 6 This program is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License along with 15 this program; if not, write to the Free Software Foundation, Inc., 16 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 18 $RCSfile: Metric.java,v $ 19 Created on $Date: 2003/10/13 15:52:31 $ 20 */ 21 package net.sf.bloof.metrics; 22 23 import java.sql.SQLException; 24 25 import javax.swing.JComponent; 26 27 import net.n3.nanoxml.XMLElement; 28 import net.sf.bloof.db.Database; 29 30 /*** 31 * Interface for every metric that can be used with Bloof 32 * @author Lukasz Pekacki <pekacki@users.sourceforge.net> 33 * @version $Id: Metric.java,v 1.14 2003/10/13 15:52:31 pekacki Exp $ 34 */ 35 public interface Metric { 36 37 /*** 38 * Returns the description of the metric 39 * @return String description 40 */ 41 String getDescription(); 42 43 /*** 44 * Returns the Name of the metric 45 * @return String 46 */ 47 String getName(); 48 49 /*** 50 * Returns the MetricParameter object of this metric 51 * @return MetricParameter object of this metric, null if none parameters exist 52 */ 53 MetricParameter getParameter(); 54 55 /*** 56 * Returns the metric result as java component 57 * @return Component containing the results 58 */ 59 JComponent getResultComponent(); 60 /*** 61 * Returns the metric result as XML Document 62 * @return XMLElement containing the results 63 */ 64 XMLElement getResultXml(); 65 66 /*** 67 * Runs the metric 68 * @param aDatabase Database for running the metric 69 * @throws SQLException on database connection error 70 */ 71 void runMetric(Database aDatabase) throws SQLException; 72 /*** 73 * Initializes the metric with the specified parameter 74 * @param aMetricParams parameter of the metrics 75 */ 76 void setupMetric(MetricParameter aMetricParams); 77 /****/ 78 public static final String XML_HEAD = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; 79 }

This page was automatically generated by Maven