View Javadoc
1 /*** 2 * ReportHandler.java 3 * 4 * Project: Dependency Tool 5 * 6 * WHEN WHO WHAT 7 * 06.06.2003 pko initial public release 8 * 30.10.2002 pko creation 9 * 10 * Copyright 2003 ELCA Informatique SA 11 * Av. de la Harpe 22-24, 1000 Lausanne 13, Switzerland 12 * www.elca.ch 13 * 14 * This library is free software; you can redistribute it and/or 15 * modify it under the terms of the GNU Lesser General Public License 16 * as published by the Free Software Foundation; either version 2.1 of 17 * the License, or (at your option) any later version. 18 * 19 * This library is distributed in the hope that it will be useful, but 20 * WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 * Lesser General Public License for more details. 23 * 24 * You should have received a copy of the GNU Lesser General Public 25 * License along with this library; if not, write to the Free Software 26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 27 * USA 28 */ 29 30 package ch.elca.dependency.report; 31 32 import java.io.IOException; 33 34 import org.apache.log4j.Logger; 35 36 import ch.elca.dependency.util.StringManager; 37 38 /*** 39 * Abstract superclass for all Handlers that have to output a 40 * formatted Report. 41 * 42 * @author Pawel Kowalski 43 * @version 1.0-beta 44 */ 45 abstract class ReportHandler { 46 47 /*** 48 * Log4j Logger. 49 */ 50 static final Logger LOG = Logger.getLogger(ReportHandler.class); 51 52 /*** 53 * A StringManager to access Strings 54 */ 55 static final StringManager STRING_MANAGER = StringManager.getManager(ReportHandler.class); 56 57 /*** 58 * Filename of the file for writing a Report. 59 */ 60 private String m_filename = ""; 61 62 /*** 63 * Set the filename of the file for writing a Report. This 64 * property will not necessarily be used by a subclass. 65 * 66 * @param filename a <code>String</code> value 67 */ 68 void setFileName(String filename) { 69 m_filename = filename; 70 } 71 72 /*** 73 * Get the filename of the file for writing a Report. 74 * 75 * @return a <code>String</code> value 76 */ 77 String getFileName() { 78 return m_filename; 79 } 80 81 //*********************************************************************************/ 82 // output method 83 //*********************************************************************************/ 84 85 /*** 86 * Output a formatted Report. This is an abstract method that must 87 * be overwritten by all concrete subclasses of this 88 * ReportHandler. 89 * 90 * @param report a <code>String</code> value 91 */ 92 abstract void output(String report) throws IOException; 93 94 }

This page was automatically generated by Maven