Coverage Report - org.kuali.rice.core.api.config.property.ConfigurationService
 
Classes in this File Line Coverage Branch Coverage Complexity
ConfigurationService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2006-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 
 17  
 package org.kuali.rice.core.api.config.property;
 18  
 
 19  
 import java.util.Properties;
 20  
 
 21  
 /**
 22  
  * This interface defines methods that a Configuration Service must provide. Provides methods for getting string
 23  
  * resources.
 24  
  */
 25  
 public interface ConfigurationService {
 26  
     /**
 27  
          * Given a property name (key), returns the value associated with that key, or null if none is available.
 28  
          * 
 29  
          * @param key
 30  
          * @return String associated with the given key
 31  
          * @throws IllegalArgumentException
 32  
          *                 if the key is null
 33  
          */
 34  
     public String getPropertyString(String key);
 35  
 
 36  
     /**
 37  
          * Given a property name (key), returns the "booleanized" value associated with that key.
 38  
          * 
 39  
          * true, yes, on, or 1 are translated into <b>true</b> - all other values result in <b>false</b>
 40  
          * 
 41  
          * @param key
 42  
          * @return String associated with the given key
 43  
          * @throws IllegalArgumentException
 44  
          *                 if the key is null
 45  
          */
 46  
     public boolean getPropertyAsBoolean(String key);
 47  
 
 48  
     /**
 49  
          * @return Properties instance containing all (key,value) pairs known to the service
 50  
          */
 51  
     public Properties getAllProperties();
 52  
 
 53  
     /**
 54  
          * Returns whether this instance is production based on the configuration options.
 55  
          */
 56  
     public boolean isProductionEnvironment();
 57  
 }