Coverage report

  %line %branch
nl.toolforge.karma.core.manifest.DevelopmentManifest
65% 
100% 

 1  
 /*
 2  
 Karma core - Core of the Karma application
 3  
 Copyright (C) 2004  Toolforge <www.toolforge.nl>
 4  
 
 5  
 This library is free software; you can redistribute it and/or
 6  
 modify it under the terms of the GNU Lesser General Public
 7  
 License as published by the Free Software Foundation; either
 8  
 version 2.1 of the License, or (at your option) any later version.
 9  
 
 10  
 This library is distributed in the hope that it will be useful,
 11  
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13  
 Lesser General Public License for more details.
 14  
 
 15  
 You should have received a copy of the GNU Lesser General Public
 16  
 License along with this library; if not, write to the Free Software
 17  
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  
 */
 19  
 package nl.toolforge.karma.core.manifest;
 20  
 
 21  
 import nl.toolforge.karma.core.boot.WorkingContext;
 22  
 import nl.toolforge.karma.core.location.LocationException;
 23  
 import nl.toolforge.karma.core.module.Module;
 24  
 
 25  
 /**
 26  
  * @author D.A. Smedes
 27  
  * @version $Id: DevelopmentManifest.java,v 1.16 2004/11/10 22:25:10 hippe Exp $
 28  
  */
 29  
 public final class DevelopmentManifest extends AbstractManifest {
 30  
 
 31  
   public String getType() {
 32  0
     return Manifest.DEVELOPMENT_MANIFEST;
 33  
   }
 34  
 
 35  
   public DevelopmentManifest(WorkingContext workingContext, String name) throws ManifestException, LocationException {
 36  0
     super(workingContext, name);
 37  0
   }
 38  
 
 39  24
   public DevelopmentManifest(WorkingContext context, ManifestStructure structure) throws LocationException {
 40  45
     super(context, structure);
 41  21
   }
 42  13
 
 43  13
   /**
 44  
    * <p>Applies the current working context to a module in this release manifest.
 45  
    *
 46  
    * <p>This method also checks if the module is available locally. If so, the module will be matched with the module
 47  
    * on disk to check if they are equal. This is to ensure that a changed manifest-definition is reflected on disk. If
 48  
    * the manifest shows another module (which is in fact determined by its location), the version on disk will be
 49  
    * removed.
 50  
    */
 51  
   protected void applyWorkingContext(WorkingContext context, Module module) {
 52  80
 
 53  142
     if (module.hasVersion()) {
 54  63
       setState(module, Module.STATIC);
 55  68
     } else {
 56  56
       if (isLocal(module)) {
 57  0
         setState(module, getState(module));
 58  19
       } else {
 59  7
         setState(module, Module.DYNAMIC);
 60  
       }
 61  91
     }
 62  70
   }
 63  
 
 64  60
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.