SandboxConfigurationFactory

public class SandboxConfigurationFactory
extends ConfigurationFactory

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


Special Configuration factory to handle creation of configurations for Sandboxing purpose.

Summary

Public constructors

SandboxConfigurationFactory()

Public methods

IConfiguration createConfigurationFromArgs(String[] args, IKeyStoreClient keyStoreClient, ISandbox sandbox, IRunUtil runUtil)

Create a IConfiguration based on the command line and sandbox provided.

static SandboxConfigurationFactory getInstance()

Get the singleton IConfigurationFactory instance.

Protected methods

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

Retrieve the ConfigurationDef for the given name

Public constructors

SandboxConfigurationFactory

public SandboxConfigurationFactory ()

Public methods

createConfigurationFromArgs

public IConfiguration createConfigurationFromArgs (String[] args, 
                IKeyStoreClient keyStoreClient, 
                ISandbox sandbox, 
                IRunUtil runUtil)

Create a IConfiguration based on the command line and sandbox provided.

Parameters
args String: the command line for the run.

keyStoreClient IKeyStoreClient: the IKeyStoreClient where to load the key from.

sandbox ISandbox: the ISandbox used for the run.

runUtil IRunUtil: the IRunUtil to run commands.

Returns
IConfiguration a IConfiguration valid for the sandbox.

Throws
ConfigurationException

getInstance

public static SandboxConfigurationFactory getInstance ()

Get the singleton IConfigurationFactory instance.

Returns
SandboxConfigurationFactory

Protected methods

getConfigurationDef

protected ConfigurationDef getConfigurationDef (String name, 
                boolean isGlobal, 
                Map<String, String> templateMap)

Retrieve the ConfigurationDef for the given name

Parameters
name String: the name of a built-in configuration to load or a file path to configuration xml to load

isGlobal boolean

templateMap Map

Returns
ConfigurationDef ConfigurationDef

Throws
ConfigurationException