Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: So Sep 2 2007 02:40:58 CEST
file stats: LOC: 54   Methods: 4
NCLOC: 21   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ModuleEventListenerLog.java 100% 80% 75% 81,8%
coverage coverage
 1    /* $Id: ModuleEventListenerLog.java,v 1.4 2007/08/21 21:03:30 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2007, 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.log;
 19   
 20    import org.qedeq.kernel.bo.module.ModuleProperties;
 21   
 22    /**
 23    * Listener that writes events to the {@link org.qedeq.kernel.log.QedeqLog}.
 24    *
 25    * @version $Revision: 1.4 $
 26    * @author Michael Meyling
 27    */
 28    public final class ModuleEventListenerLog implements ModuleEventListener {
 29   
 30    /**
 31    * Constructor.
 32    */
 33  2 public ModuleEventListenerLog() {
 34    }
 35   
 36  33 public void addModule(final ModuleProperties prop) {
 37  32 QedeqLog.getInstance().logSuccessfulState("Module added", prop.getUrl());
 38    }
 39   
 40  108 public void stateChanged(final ModuleProperties prop) {
 41  108 if (prop.getLoadingState().isFailure() || prop.getLogicalState().isFailure()) {
 42  20 QedeqLog.getInstance().logFailureState("Module state changed: "
 43    + prop.getStateDescription(), prop.getUrl(), prop.getException().getMessage());
 44    } else {
 45  88 QedeqLog.getInstance().logSuccessfulState("Module state changed: "
 46    + prop.getStateDescription(), prop.getUrl());
 47    }
 48    }
 49   
 50  0 public void removeModule(final ModuleProperties prop) {
 51  0 QedeqLog.getInstance().logSuccessfulState("Module removed", prop.getUrl());
 52    }
 53   
 54    }