Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ConfigurationService |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-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 | package org.kuali.rice.core.api.config.property; | |
17 | ||
18 | import java.util.Map; | |
19 | ||
20 | /** | |
21 | * ConfigurationService is an abstraction of system configuration for KNS clients which provides methods for getting string | |
22 | * resources, including Kuali message resource strings. | |
23 | */ | |
24 | public interface ConfigurationService { | |
25 | /** | |
26 | * Given a property name (key), returns the value associated with that key, or null if none is available. | |
27 | * | |
28 | * @param key | |
29 | * @return String associated with the given key | |
30 | * @throws IllegalArgumentException | |
31 | * if the key is null | |
32 | */ | |
33 | String getPropertyValueAsString(String key); | |
34 | ||
35 | /** | |
36 | * Given a property name (key), returns the "booleanized" value associated with that key. | |
37 | * | |
38 | * true, yes, on, or 1 are translated into <b>true</b> - all other values result in <b>false</b> | |
39 | * | |
40 | * @param key | |
41 | * @return String associated with the given key | |
42 | * @throws IllegalArgumentException | |
43 | * if the key is null | |
44 | */ | |
45 | boolean getPropertyValueAsBoolean(String key); | |
46 | ||
47 | /** | |
48 | * @return Properties instance containing all (key,value) pairs known to the service | |
49 | */ | |
50 | Map<String, String> getAllProperties(); | |
51 | } |