ConfigurationFactory.ConfigLoader

class ConfigurationFactory.ConfigLoader
extends Object implements IConfigDefLoader

java.lang.Object
   ↳ com.android.tradefed.config.ConfigurationFactory.ConfigLoader


Implementation of IConfigDefLoader that tracks the included configurations from one root config, and throws an exception on circular includes.

Summary

Public constructors

ConfigurationFactory.ConfigLoader(boolean isGlobalConfig)

Public methods

ConfigurationDef getConfigurationDef(String name, Map<String, String> templateMap)

Retrieve the ConfigurationDef for the given name

boolean isGlobalConfig()

void loadIncludedConfiguration(ConfigurationDef def, String parentName, String name, String deviceTagObject, Map<String, String> templateMap)

Configs that are bundled inside the tradefed.jar can only include other configs also bundled inside tradefed.jar.

Public constructors

ConfigurationFactory.ConfigLoader

ConfigurationFactory.ConfigLoader (boolean isGlobalConfig)

Parameters
isGlobalConfig boolean

Public methods

getConfigurationDef

ConfigurationDef getConfigurationDef (String name, 
                Map<String, String> templateMap)

Retrieve the ConfigurationDef for the given name

Parameters
templateMap Map: map of template-include names to configuration filenames

Returns
ConfigurationDef ConfigurationDef

Throws
ConfigurationException

isGlobalConfig

boolean isGlobalConfig ()

Returns
boolean

loadIncludedConfiguration

void loadIncludedConfiguration (ConfigurationDef def, 
                String parentName, 
                String name, 
                String deviceTagObject, 
                Map<String, String> templateMap)

Configs that are bundled inside the tradefed.jar can only include other configs also bundled inside tradefed.jar. However, local (external) configs can include both local (external) and bundled configs.

Parameters
def ConfigurationDef: the ConfigurationDef to load the data into

parentName String: the name of the parent config

name String: the name of config to include

deviceTagObject String: the name of the current deviceTag or null if not inside a device tag.

templateMap Map: the current map of template to be loaded.

Throws
ConfigurationException