Coverage Report - org.kuali.rice.core.config.SimpleConfig
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleConfig
0%
0/21
0%
0/4
1.375
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  *
 4  
  *
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  *
 9  
  * http://www.opensource.org/licenses/ecl2.php
 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.kuali.rice.core.config;
 18  
 
 19  
 import java.util.ArrayList;
 20  
 import java.util.HashMap;
 21  
 import java.util.List;
 22  
 import java.util.Map;
 23  
 import java.util.Properties;
 24  
 
 25  
 /**
 26  
  * A simple Config implementation which has no base properties
 27  
  * or base objects.
 28  
  *
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  */
 31  
 public class SimpleConfig extends BaseConfig {
 32  
 
 33  
         private Properties baseProperties;
 34  
         private Map<String, Object> baseObjects;
 35  
 
 36  
         public SimpleConfig() {
 37  0
                 super(new ArrayList<String>());
 38  0
         }
 39  
 
 40  
         public SimpleConfig(Properties properties) {
 41  0
                 super(new ArrayList<String>());
 42  0
                 this.baseProperties = properties;
 43  0
         }
 44  
 
 45  
         public SimpleConfig(List<String> fileLocs, Properties baseProperties) {
 46  0
                 super(fileLocs);
 47  0
                 this.baseProperties = baseProperties;
 48  0
         }
 49  
 
 50  
         public SimpleConfig(List<String> fileLocs) {
 51  0
                 super(fileLocs);
 52  0
         }
 53  
 
 54  
         public SimpleConfig(String fileLoc) {
 55  0
                 this(fileLoc, null);
 56  0
         }
 57  
 
 58  
         public SimpleConfig(String fileLoc, Properties baseProperties) {
 59  0
                 super(fileLoc);
 60  0
                 this.baseProperties = baseProperties;
 61  0
         }
 62  
 
 63  
         @Override
 64  
         public Map<String, Object> getBaseObjects() {
 65  0
                 if (this.baseObjects == null) {
 66  0
                     this.baseObjects = new HashMap<String, Object>();
 67  
                 }
 68  0
                 return this.baseObjects;
 69  
         }
 70  
 
 71  
         @Override
 72  
         public Properties getBaseProperties() {
 73  0
                 if (this.baseProperties == null) {
 74  0
                         return new Properties();
 75  
                 }
 76  0
                 return this.baseProperties;
 77  
         }
 78  
         
 79  
 }