2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 * ===========================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END====================================================
22 package org.onap.aaf.misc.env;
26 public interface EnvProps extends Env {
27 public interface EnvProperty {
28 public String getProperty(String input);
32 * Obtain a Property (String) based on a Key. Implementor decides how
33 * that works, i.e. from a complex set of Configurations, or just
34 * "System" (Java standard)
37 * @return APIException
39 public String getProperty(String key);
42 * Obtain a Property (String) based on a Key. Implementor decides how
43 * that works, i.e. from a complex set of Configurations, or just
44 * "System" (Java standard)
46 * If Property Value is null, then default will be used.
48 * @return APIException
50 public String getProperty(String tag, String defaultValue);
53 * Set a Property (String) based on a Key accessible to all in Env. Implementor decides how
54 * that works, i.e. from a complex set of Configurations, or just
55 * "System" (Java standard)
58 * @return APIException
60 public String setProperty(String key, String value);
63 * Get the SubProperties based on key.
65 * use "false" to remove prefix, "true" to leave prefix in.
68 * @return APIException
69 * Given a known property set (or in this case, properties starting with key),
70 * return map of all properties with appropriate key names
72 public Map<String, String> getSubProperties(String key, boolean includePrefix);
75 * Get all of the properties in the Environment
78 public Map<String, String> getProperties();