1 /* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 android.platform.helpers; 18 19 import java.util.Map; 20 21 public interface IAutoConfigUtility { 22 /** This method is used loading default configuration. */ loadDefaultConfig(Map<String, String> mApplicationConfigMap)23 void loadDefaultConfig(Map<String, String> mApplicationConfigMap); 24 25 /** This method is used to get the resource configuration. */ getResourceConfiguration(String configName, String resourceName)26 AutoConfigResource getResourceConfiguration(String configName, String resourceName); 27 28 /** This method is used to get an array of available options for given menu. */ getAvailableOptions(String menu)29 String[] getAvailableOptions(String menu); 30 31 /** This method is used to add an array of available options for given menu. */ addAvailableOptions(String menu, String[] options)32 void addAvailableOptions(String menu, String[] options); 33 34 /** This method is used to get path for given menu. */ getPath(String menu)35 String[] getPath(String menu); 36 37 /** This method is used to add path for given menu. */ addPath(String menu, String[] options)38 void addPath(String menu, String[] options); 39 40 /** This method is used validate configuration. */ isValidConfiguration(String configName)41 boolean isValidConfiguration(String configName); 42 43 /** This method is used validate configuration resource. */ isValidResource(String configName, String resourceName)44 boolean isValidResource(String configName, String resourceName); 45 46 /** This method is used validate options. */ isValidOption(String menu)47 boolean isValidOption(String menu); 48 49 /** This method is used validate path. */ isValidPath(String menu)50 boolean isValidPath(String menu); 51 } 52