Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
../../../../../img/srcFileCovDistChart0.png 88% of files have more coverage
6   76   6   1
0   28   1   6
6     1  
1    
 
  DefaultModuleEventListener       Line # 31 6 6 0% 0.0
 
No Tests
 
1    /* $Id: DefaultModuleEventListener.java,v 1.1 2008/07/26 07:58:29 m31 Exp $
2    *
3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
4    *
5    * Copyright 2000-2008, Michael Meyling <mime@qedeq.org>.
6    *
7    * "Hilbert II" is free software; you can redistribute
8    * it and/or modify it under the terms of the GNU General Public
9    * License as published by the Free Software Foundation; either
10    * version 2 of the License, or (at your option) any later version.
11    *
12    * This program is distributed in the hope that it will be useful,
13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15    * GNU General Public License for more details.
16    */
17   
18    package org.qedeq.kernel.bo.log;
19   
20    import java.io.PrintStream;
21   
22    import org.qedeq.base.utility.DateUtility;
23    import org.qedeq.kernel.bo.QedeqBo;
24   
25    /**
26    * Listener that writes events to a stream.
27    *
28    * @version $Revision: 1.1 $
29    * @author Michael Meyling
30    */
 
31    public class DefaultModuleEventListener implements ModuleEventListener {
32   
33    /** Stream for output. */
34    private PrintStream out = System.out;
35   
36    /**
37    * Constructor.
38    */
 
39  0 toggle public DefaultModuleEventListener() {
40  0 this(System.out);
41    }
42   
43    /**
44    * Constructor.
45    *
46    * @param stream Print to this stream.
47    */
 
48  0 toggle public DefaultModuleEventListener(final PrintStream stream) {
49  0 this.out = stream;
50    }
51   
52    /**
53    * Set output stream.
54    *
55    * @param stream Output stream.
56    */
 
57  0 toggle public final void setPrintStream(final PrintStream stream) {
58  0 this.out = stream;
59    }
60   
 
61  0 toggle public void addModule(final QedeqBo prop) {
62  0 out.println(DateUtility.getTimestamp() + " Module added. "
63    + prop.getStateDescription() + "\n\t" + prop.getUrl());
64    }
65   
 
66  0 toggle public void stateChanged(final QedeqBo prop) {
67  0 out.println(DateUtility.getTimestamp() + " Module state changed. "
68    + prop.getStateDescription() + "\n\t" + prop.getUrl());
69    }
70   
 
71  0 toggle public void removeModule(final QedeqBo prop) {
72  0 out.println(DateUtility.getTimestamp() + " Module removed. "
73    + prop.getStateDescription() + "\n\t" + prop.getUrl());
74    }
75   
76    }