Coverage report

  %line %branch
org.apache.jetspeed.administration.PortalConfigurationImpl
0% 
0% 

 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  * 
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.jetspeed.administration;
 18  
 
 19  
 import java.util.Iterator;
 20  
 import java.util.List;
 21  
 
 22  
 import org.apache.commons.configuration.Configuration;
 23  
 
 24  
 
 25  
 /**
 26  
  * Portal Configuration
 27  
  * 
 28  
  * Retrieve basic data types from the jetspeed.properties configuration
 29  
  * This is a subset of Commons Configuration functionality
 30  
  * Not the best solution wrappering commons configuration, but it does continue 
 31  
  * with the requirements of interface-driven development and zero dependencies in API
 32  
  *
 33  
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
 34  
  * @version $Id: $
 35  
  */
 36  
 public class PortalConfigurationImpl implements PortalConfiguration
 37  
 {
 38  
     Configuration configuration;
 39  
     
 40  
     public PortalConfigurationImpl(Configuration configuration)
 41  0
     {
 42  0
         this.configuration = configuration;
 43  0
     }
 44  
     
 45  
     public boolean getBoolean(String key, class="keyword">boolean defaultValue)
 46  
     {
 47  0
         return configuration.getBoolean(key, defaultValue);
 48  
     }
 49  
 
 50  
     public boolean getBoolean(String key)
 51  
     {
 52  0
         return configuration.getBoolean(key);
 53  
     }
 54  
 
 55  
     public double getDouble(String key, class="keyword">double defaultValue)
 56  
     {
 57  0
         return configuration.getDouble(key, defaultValue);
 58  
     }
 59  
 
 60  
     public double getDouble(String key)
 61  
     {
 62  0
         return configuration.getDouble(key);
 63  
     }
 64  
 
 65  
     public float getFloat(String key, class="keyword">float defaultValue)
 66  
     {
 67  0
         return configuration.getFloat(key, defaultValue);
 68  
     }
 69  
 
 70  
     public float getFloat(String key)
 71  
     {
 72  0
         return configuration.getFloat(key);
 73  
     }
 74  
 
 75  
     public int getInt(String key, class="keyword">int defaultValue)
 76  
     {
 77  0
         return configuration.getInt(key, defaultValue);        
 78  
     }
 79  
 
 80  
     public int getInt(String key)
 81  
     {
 82  0
         return configuration.getInt(key);        
 83  
     }
 84  
 
 85  
     public List getList(String key)
 86  
     {
 87  0
         return configuration.getList(key);
 88  
     }
 89  
 
 90  
     public long getLong(String key, class="keyword">long defaultValue)
 91  
     {
 92  0
         return configuration.getLong(key, defaultValue);        
 93  
     }
 94  
 
 95  
     public long getLong(String key)
 96  
     {
 97  0
         return configuration.getLong(key);        
 98  
     }
 99  
 
 100  
     public String getString(String key, String defaultValue)
 101  
     {
 102  0
         return configuration.getString(key, defaultValue);        
 103  
     }
 104  
 
 105  
     public String getString(String key)
 106  
     {
 107  0
         return configuration.getString(key);        
 108  
     }
 109  
 
 110  
     public String[] getStringArray(String key)
 111  
     {
 112  0
         return configuration.getStringArray(key);                
 113  
     }
 114  
     
 115  
     public Iterator getKeys()
 116  
     {
 117  0
         return configuration.getKeys();
 118  
     }
 119  
     
 120  
     public void setString(String key, String value)
 121  
     {
 122  0
         configuration.setProperty(key, value);
 123  0
     }
 124  
 }

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