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.

TODO: Split the configuration dump part to another class

Summary

Fields

public static final OPTION_IGNORED_ELEMENTS

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.

IConfiguration createConfigurationFromArgs(String[] arrayArgs, SandboxConfigDump.DumpCmd command)

When running the dump for a command.

static SandboxConfigurationFactory getInstance()

Get the singleton IConfigurationFactory instance.

Protected methods

ConfigurationDef createConfigurationDef(String name)

Internal method to create ConfigurationDef

ConfigurationDef getConfigurationDef(String name, boolean isGlobal, templateMap)

Retrieve the ConfigurationDef for the given name

Fields

OPTION_IGNORED_ELEMENTS

public static final  OPTION_IGNORED_ELEMENTS

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

createConfigurationFromArgs

public IConfiguration createConfigurationFromArgs (String[] arrayArgs, 
                SandboxConfigDump.DumpCmd command)

When running the dump for a command. Create a config with specific expectations.

Parameters
arrayArgs String: the command line for the run.

command SandboxConfigDump.DumpCmd: The dump command in progress

Returns
IConfiguration a IConfiguration valid for the VERSIONED Sandbox.

Throws
ConfigurationException

getInstance

public static SandboxConfigurationFactory getInstance ()

Get the singleton IConfigurationFactory instance.

Returns
SandboxConfigurationFactory

Protected methods

createConfigurationDef

protected ConfigurationDef createConfigurationDef (String name)

Internal method to create ConfigurationDef

Parameters
name String

Returns
ConfigurationDef

getConfigurationDef

protected ConfigurationDef getConfigurationDef (String name, 
                boolean isGlobal, 
                 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

Returns
ConfigurationDef ConfigurationDef

Throws
ConfigurationException