AndroidBuildRemoteFileResolver

public class AndroidBuildRemoteFileResolver
extends Object implements IRemoteFileResolver

java.lang.Object
   ↳ com.google.android.tradefed.config.remote.AndroidBuildRemoteFileResolver


Implementation of IRemoteFileResolver that allows downloading from Android Build Server.

Summary

Constants

String BUILD_BRANCH_STRING

String BUILD_ID_STRING

String BUILD_PATTERN_STRING

String BUILD_TARGET_STRING

String ENABLE_RESOLVE_SYM_LINKS

String EXCLUDE_FILTERS

String INCLUDE_FILTERS

String OS_STRING

String PROTOCOL

String USE_CAS

Fields

public static final Pattern DOWNLOAD_PATTERN

Public constructors

AndroidBuildRemoteFileResolver()

Public methods

String getSupportedProtocol()

Returns the associated protocol supported for download.

IRemoteFileResolver.ResolvedFile resolveRemoteFile(IRemoteFileResolver.RemoteFileResolverArgs args)

Resolve the remote file in a future-proof interface

Protected methods

IFileDownloader getAndroidBuildDownloader(RemoteBuildInfo info, boolean useCas)
RemoteBuildInfo performBuildApiQuery(String buildId, String branch, String buildFlavor, String pattern)

Constants

BUILD_BRANCH_STRING

public static final String BUILD_BRANCH_STRING

Constant Value: "branch"

BUILD_ID_STRING

public static final String BUILD_ID_STRING

Constant Value: "buildid"

BUILD_PATTERN_STRING

public static final String BUILD_PATTERN_STRING

Constant Value: "pattern"

BUILD_TARGET_STRING

public static final String BUILD_TARGET_STRING

Constant Value: "target"

public static final String ENABLE_RESOLVE_SYM_LINKS

Constant Value: "enable-resolve-sym-links"

EXCLUDE_FILTERS

public static final String EXCLUDE_FILTERS

Constant Value: "exclude_filters"

INCLUDE_FILTERS

public static final String INCLUDE_FILTERS

Constant Value: "include_filters"

OS_STRING

public static final String OS_STRING

Constant Value: "linux"

PROTOCOL

public static final String PROTOCOL

Constant Value: "ab"

USE_CAS

public static final String USE_CAS

Constant Value: "use-cas"

Fields

DOWNLOAD_PATTERN

public static final Pattern DOWNLOAD_PATTERN

Public constructors

AndroidBuildRemoteFileResolver

public AndroidBuildRemoteFileResolver ()

Public methods

getSupportedProtocol

public String getSupportedProtocol ()

Returns the associated protocol supported for download.

Returns
String

resolveRemoteFile

public IRemoteFileResolver.ResolvedFile resolveRemoteFile (IRemoteFileResolver.RemoteFileResolverArgs args)

Resolve the remote file in a future-proof interface

Parameters
args IRemoteFileResolver.RemoteFileResolverArgs: RemoteFileResolverArgs describing the remote to download and how.

Returns
IRemoteFileResolver.ResolvedFile The resolved local file representation.

Throws
BuildRetrievalError

Protected methods

getAndroidBuildDownloader

protected IFileDownloader getAndroidBuildDownloader (RemoteBuildInfo info, 
                boolean useCas)

Parameters
info RemoteBuildInfo

useCas boolean

Returns
IFileDownloader

performBuildApiQuery

protected RemoteBuildInfo performBuildApiQuery (String buildId, 
                String branch, 
                String buildFlavor, 
                String pattern)

Parameters
buildId String

branch String

buildFlavor String

pattern String

Returns
RemoteBuildInfo

Throws
BuildRetrievalError