Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
../../../../../img/srcFileCovDistChart9.png 30% of files have more coverage
5   54   5   1,25
2   21   1   4
4     1,25  
1    
 
  ModuleEventListenerLog       Line # 28 5 5 81,8% 0.8181818
 
  (37)
 
1    /* $Id: ModuleEventListenerLog.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 org.qedeq.kernel.bo.QedeqBo;
21   
22    /**
23    * Listener that writes events to the {@link org.qedeq.kernel.bo.log.QedeqLog}.
24    *
25    * @version $Revision: 1.1 $
26    * @author Michael Meyling
27    */
 
28    public final class ModuleEventListenerLog implements ModuleEventListener {
29   
30    /**
31    * Constructor.
32    */
 
33  39 toggle public ModuleEventListenerLog() {
34    }
35   
 
36  111 toggle public void addModule(final QedeqBo prop) {
37  111 QedeqLog.getInstance().logSuccessfulState("Module added", prop.getUrl());
38    }
39   
 
40  846 toggle public void stateChanged(final QedeqBo prop) {
41  846 if (prop.hasFailures()) {
42  90 QedeqLog.getInstance().logFailureState("Module state changed: "
43    + prop.getStateDescription(), prop.getUrl(), prop.getException().getMessage());
44    } else {
45  756 QedeqLog.getInstance().logSuccessfulState("Module state changed: "
46    + prop.getStateDescription(), prop.getUrl());
47    }
48    }
49   
 
50  0 toggle public void removeModule(final QedeqBo prop) {
51  0 QedeqLog.getInstance().logSuccessfulState("Module removed", prop.getUrl());
52    }
53   
54    }