Coverage Report - de.jollyday.parameter.BaseManagerParameter
 
Classes in this File Line Coverage Branch Coverage Complexity
BaseManagerParameter
100%
15/15
100%
4/4
1,4
 
 1  
 package de.jollyday.parameter;
 2  
 
 3  
 import java.util.Properties;
 4  
 
 5  
 import de.jollyday.ManagerParameter;
 6  
 
 7  
 public abstract class BaseManagerParameter implements ManagerParameter {
 8  
 
 9  1260
         private Properties properties = new Properties();
 10  
         
 11  1263
         public BaseManagerParameter(Properties properties){
 12  1272
                 if(properties != null){
 13  7
                         this.properties.putAll(properties);
 14  
                 }
 15  1270
         }
 16  
         
 17  
         @Override
 18  
         public void mergeProperties(Properties properties) {
 19  2533
                 if(properties != null){
 20  2525
                         Properties mergedProperties = new Properties();
 21  2521
                         mergedProperties.putAll(properties);
 22  2523
                         mergedProperties.putAll(this.properties);
 23  2526
                         this.properties = mergedProperties;
 24  
                 }
 25  2534
         }
 26  
         
 27  
         @Override
 28  
         public String getProperty(String key){
 29  1630
                 return properties.getProperty(key);
 30  
         }
 31  
         
 32  
         @Override
 33  
         public void setProperty(String key, String value){
 34  5
                 this.properties.setProperty(key, value);
 35  5
         }
 36  
         
 37  
         @Override
 38  
         public String getManangerImplClassName() {
 39  159
                 return getProperty(MANAGER_IMPL_CLASS_PREFIX);
 40  
         }
 41  
 
 42  
 }