Clover coverage report - Maven Clover report
Coverage timestamp: Thu Oct 11 2007 08:41:48 CEST
file stats: LOC: 91   Methods: 12
NCLOC: 65   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DefaultInteroperable.java - 56.2% 41.7% 50%
coverage coverage
 1    /*
 2    * Copyright (C) 2007 Eric MIGNOT - mignots.eric@free.fr
 3    *
 4    * This library is free software; you can redistribute it and/or
 5    * modify it under the terms of the GNU Lesser General Public
 6    * License as published by the Free Software Foundation; either
 7    * version 2.1 of the License, or (at your option) any later version.
 8    *
 9    * This library 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 GNU
 12    * Lesser General Public License for more details.
 13    *
 14    * You should have received a copy of the GNU Lesser General Public
 15    * License along with this library; if not, write to the Free Software
 16    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 17    */
 18    package org.ericmignot.modeler.helpers;
 19   
 20    import org.ericmignot.modeler.Interoperable;
 21    import org.ericmignot.modeler.data.BusinessObject;
 22    import org.ericmignot.modeler.gui.Controller;
 23    import org.ericmignot.modeler.util.action.NotifyableAction;
 24   
 25    public class DefaultInteroperable implements Interoperable
 26    {
 27    private Controller controller;
 28    private NotifyableAction action;
 29    private BusinessObject bo;
 30    private String event;
 31   
 32    private boolean lastEventIsDo;
 33   
 34  4 public boolean isLastEventIsDo()
 35    {
 36  4 return lastEventIsDo;
 37    }
 38  0 public void setLastEventIsDo(boolean lastEventIsDo)
 39    {
 40  0 this.lastEventIsDo = lastEventIsDo;
 41    }
 42  0 public void setController(Controller controller)
 43    {
 44  0 this.controller = controller;
 45    }
 46  0 public Controller getController()
 47    {
 48  0 return this.controller;
 49    }
 50   
 51  0 public void setData(String xml) throws IllegalArgumentException
 52    {
 53  0 this.controller.setData(xml);
 54    }
 55   
 56  0 public String getData()
 57    {
 58  0 return this.controller.getModel().getXML();
 59    }
 60   
 61  11 public void fireDoEvent(NotifyableAction action, BusinessObject bo)
 62    {
 63  11 this.action = action;
 64  11 this.bo = bo;
 65  11 this.lastEventIsDo = true;
 66    }
 67  6 public void fireUndoEvent(NotifyableAction action, BusinessObject target)
 68    {
 69  6 this.action = action;
 70  6 this.bo = target;
 71  6 this.lastEventIsDo = false;
 72    }
 73  0 public void fireEvent(String event)
 74    {
 75  0 this.event = event;
 76    }
 77  6 public NotifyableAction getLastAction()
 78    {
 79  6 return this.action;
 80    }
 81  6 public BusinessObject getLastBusinessObject()
 82    {
 83  6 return this.bo;
 84    }
 85  0 public String getLastEvent()
 86    {
 87  0 return this.event;
 88    }
 89   
 90   
 91    }