to top
public interface

IConfiguration

com.android.tradefed.config.IConfiguration
Known Indirect Subclasses

Class Overview

Configuration information for a TradeFederation invocation. Each TradeFederation invocation has a single IConfiguration. An IConfiguration stores all the delegate objects that should be used during the invocation, and their associated Option's

Summary

Public Methods
abstract IConfiguration clone()
Create a copy of this object.
abstract IBuildProvider getBuildProvider()
Gets the IBuildProvider from the configuration.
abstract ICommandOptions getCommandOptions()
Gets the ICommandOptions to use from the configuration.
abstract Object getConfigurationObject(String typeName)
Generic interface to get the configuration object with the given type name.
abstract List<?> getConfigurationObjectList(String typeName)
Similar to getConfigurationObject(String), but for configuration object types that support multiple objects.
abstract TestDeviceOptions getDeviceOptions()
Gets the TestDeviceOptions to use from the configuration.
abstract IDeviceRecovery getDeviceRecovery()
Gets the IDeviceRecovery to use from the configuration.
abstract IDeviceSelection getDeviceRequirements()
Gets the IDeviceSelection to use from the configuration.
abstract ILeveledLogOutput getLogOutput()
Gets the ILeveledLogOutput to use from the configuration.
abstract ILogSaver getLogSaver()
Gets the ILogSaver to use from the configuration.
abstract List<ITargetPreparer> getTargetPreparers()
Gets the ITargetPreparers from the configuration.
abstract List<ITestInvocationListener> getTestInvocationListeners()
Gets the ITestInvocationListeners to use from the configuration.
abstract List<IRemoteTest> getTests()
Gets the IRemoteTests to run from the configuration.
abstract void injectOptionValue(String optionName, String optionKey, String optionValue)
Inject a option value into the set of configuration objects.
abstract void injectOptionValue(String optionName, String optionValue)
Inject a option value into the set of configuration objects.
abstract void printCommandUsage(boolean importantOnly, PrintStream out)
Outputs a command line usage help text for this configuration to given printStream.
abstract void setBuildProvider(IBuildProvider provider)
Replace the current IBuildProvider in the configuration.
abstract void setCommandOptions(ICommandOptions cmdOptions)
Set the ICommandOptions, replacing any existing values
abstract void setConfigurationObject(String name, Object configObject)
Generic method to set the config object with the given name, replacing any existing value.
abstract void setConfigurationObjectList(String name, List<?> configList)
Generic method to set the config object list for the given name, replacing any existing value.
abstract void setDeviceOptions(TestDeviceOptions deviceOptions)
Set the TestDeviceOptions, replacing any existing values
abstract void setDeviceRecovery(IDeviceRecovery recovery)
Set the IDeviceRecovery, replacing any existing value.
abstract void setDeviceRequirements(IDeviceSelection deviceSelection)
Set the IDeviceSelection, replacing any existing values
abstract void setLogOutput(ILeveledLogOutput logger)
Set the ILeveledLogOutput, replacing any existing value.
abstract void setLogSaver(ILogSaver logSaver)
Set the ILogSaver, replacing any existing value.
abstract void setOptionsFromCommandLineArgs(List<String> listArgs)
Set the config Option fields with given set of command line arguments

abstract void setTargetPreparer(ITargetPreparer preparer)
Set the ITargetPreparer, replacing any existing value.
abstract void setTest(IRemoteTest test)
Convenience method to set a single IRemoteTest in this configuration, replacing any existing values
abstract void setTestInvocationListener(ITestInvocationListener listener)
Convenience method to set a single ITestInvocationListener
abstract void setTestInvocationListeners(List<ITestInvocationListener> listeners)
Set the list of ITestInvocationListeners, replacing any existing values
abstract void setTests(List<IRemoteTest> tests)
Set the list of IRemoteTests in this configuration, replacing any existing values
abstract void validateOptions()
Validate option values.

Public Methods

public abstract IConfiguration clone ()

Create a copy of this object.

Returns
  • a {link IConfiguration} copy

public abstract IBuildProvider getBuildProvider ()

Gets the IBuildProvider from the configuration.

Returns

public abstract ICommandOptions getCommandOptions ()

Gets the ICommandOptions to use from the configuration.

Returns

public abstract Object getConfigurationObject (String typeName)

Generic interface to get the configuration object with the given type name.

Parameters
typeName the unique type of the configuration object
Returns
  • the configuration object or null if the object type with given name does not exist.

public abstract List<?> getConfigurationObjectList (String typeName)

Similar to getConfigurationObject(String), but for configuration object types that support multiple objects.

Parameters
typeName the unique type name of the configuration object
Returns
  • the list of configuration objects or null if the object type with given name does not exist.

public abstract TestDeviceOptions getDeviceOptions ()

Gets the TestDeviceOptions to use from the configuration.

Returns

public abstract IDeviceRecovery getDeviceRecovery ()

Gets the IDeviceRecovery to use from the configuration.

Returns

public abstract IDeviceSelection getDeviceRequirements ()

Gets the IDeviceSelection to use from the configuration.

Returns

public abstract ILeveledLogOutput getLogOutput ()

Gets the ILeveledLogOutput to use from the configuration.

Returns

public abstract ILogSaver getLogSaver ()

Gets the ILogSaver to use from the configuration.

Returns
  • the ILogSaver provided in the configuration.

public abstract List<ITargetPreparer> getTargetPreparers ()

Gets the ITargetPreparers from the configuration.

Returns

public abstract List<ITestInvocationListener> getTestInvocationListeners ()

Gets the ITestInvocationListeners to use from the configuration.

Returns

public abstract List<IRemoteTest> getTests ()

Gets the IRemoteTests to run from the configuration.

Returns
  • the tests provided in the configuration

public abstract void injectOptionValue (String optionName, String optionKey, String optionValue)

Inject a option value into the set of configuration objects.

Useful to provide values for options that are generated dynamically.

Parameters
optionName the map option name
optionKey the map option key
optionValue the map option value
Throws
ConfigurationException if failed to set the option's value

public abstract void injectOptionValue (String optionName, String optionValue)

Inject a option value into the set of configuration objects.

Useful to provide values for options that are generated dynamically.

Parameters
optionName the option name
optionValue the option value
Throws
ConfigurationException if failed to set the option's value

public abstract void printCommandUsage (boolean importantOnly, PrintStream out)

Outputs a command line usage help text for this configuration to given printStream.

Parameters
importantOnly if true only print help for the important options
out the PrintStream to use.

public abstract void setBuildProvider (IBuildProvider provider)

Replace the current IBuildProvider in the configuration.

Parameters
provider the new IBuildProvider

public abstract void setCommandOptions (ICommandOptions cmdOptions)

Set the ICommandOptions, replacing any existing values

public abstract void setConfigurationObject (String name, Object configObject)

Generic method to set the config object with the given name, replacing any existing value.

Parameters
name the unique name of the config object type.
configObject the config object
Throws
ConfigurationException if the configObject was not the correct type

public abstract void setConfigurationObjectList (String name, List<?> configList)

Generic method to set the config object list for the given name, replacing any existing value.

Parameters
name the unique name of the config object type.
configList the config object list
Throws
ConfigurationException if any objects in the list are not the correct type

public abstract void setDeviceOptions (TestDeviceOptions deviceOptions)

Set the TestDeviceOptions, replacing any existing values

public abstract void setDeviceRecovery (IDeviceRecovery recovery)

Set the IDeviceRecovery, replacing any existing value.

public abstract void setDeviceRequirements (IDeviceSelection deviceSelection)

Set the IDeviceSelection, replacing any existing values

public abstract void setLogOutput (ILeveledLogOutput logger)

Set the ILeveledLogOutput, replacing any existing value.

public abstract void setLogSaver (ILogSaver logSaver)

Set the ILogSaver, replacing any existing value.

public abstract void setOptionsFromCommandLineArgs (List<String> listArgs)

Set the config Option fields with given set of command line arguments

Parameters
listArgs the command line arguments

public abstract void setTargetPreparer (ITargetPreparer preparer)

Set the ITargetPreparer, replacing any existing value.

public abstract void setTest (IRemoteTest test)

Convenience method to set a single IRemoteTest in this configuration, replacing any existing values

public abstract void setTestInvocationListener (ITestInvocationListener listener)

Convenience method to set a single ITestInvocationListener

public abstract void setTestInvocationListeners (List<ITestInvocationListener> listeners)

Set the list of ITestInvocationListeners, replacing any existing values

public abstract void setTests (List<IRemoteTest> tests)

Set the list of IRemoteTests in this configuration, replacing any existing values

public abstract void validateOptions ()

Validate option values.

Currently this will just validate that all mandatory options have been set

Throws
ConfigurationException if config is not valid