|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.packages.Package
com.android.sdklib.internal.repository.packages.FullRevisionPackage
com.android.sdklib.internal.repository.packages.ToolPackage
public class ToolPackage
Represents a tool XML node in an SDK repository.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.android.sdklib.internal.repository.packages.Package |
|---|
Package.License, Package.UpdateInfo |
| Field Summary | |
|---|---|
static java.lang.String |
INSTALL_ID
The value returned by installId(). |
| Fields inherited from interface com.android.sdklib.internal.repository.packages.IMinPlatformToolsDependency |
|---|
MIN_PLATFORM_TOOLS_REV_INVALID |
| Constructor Summary | |
|---|---|
|
ToolPackage(SdkSource source,
org.w3c.dom.Node packageNode,
java.lang.String nsUri,
java.util.Map<java.lang.String,java.lang.String> licenses)
Creates a new tool package from the attributes and elements of the given XML node. |
protected |
ToolPackage(SdkSource source,
java.util.Properties props,
int revision,
java.lang.String license,
java.lang.String description,
java.lang.String descUrl,
Archive.Os archiveOs,
Archive.Arch archiveArch,
java.lang.String archiveOsPath)
|
| Method Summary | |
|---|---|
static Package |
create(SdkSource source,
java.util.Properties props,
int revision,
java.lang.String license,
java.lang.String description,
java.lang.String descUrl,
Archive.Os archiveOs,
Archive.Arch archiveArch,
java.lang.String archiveOsPath)
Manually create a new package with one archive and the given attributes or properties. |
boolean |
equals(java.lang.Object obj)
|
java.io.File |
getInstallFolder(java.lang.String osSdkRoot,
SdkManager sdkManager)
Computes a potential installation folder if an archive of this package were to be installed right away in the given SDK root. |
java.lang.String |
getListDescription()
Returns a description of this package that is suitable for a list display. |
java.lang.String |
getLongDescription()
Returns a long description for an IDescription. |
FullRevision |
getMinPlatformToolsRevision()
The minimal revision of the tools package required by this package if > 0, or IMinPlatformToolsDependency.MIN_PLATFORM_TOOLS_REV_INVALID if the value was missing. |
java.lang.String |
getShortDescription()
Returns a short description for an IDescription. |
int |
hashCode()
|
java.lang.String |
installId()
Returns a string identifier to install this package from the command line. |
void |
postInstallHook(Archive archive,
ITaskMonitor monitor,
java.io.File installFolder)
The tool package executes tools/lib/post_tools_install[.bat|.sh] Hook called right after an archive has been installed. |
boolean |
sameItemAs(Package pkg)
Check whether 2 tool packages are the same and have the same preview bit. |
boolean |
sameItemAs(Package pkg,
FullRevision.PreviewComparison comparePreview)
Returns whether the given package represents the same item as the current package. |
void |
saveProperties(java.util.Properties props)
Save the properties of the current packages in the given Properties object. |
| Methods inherited from class com.android.sdklib.internal.repository.packages.FullRevisionPackage |
|---|
canBeUpdatedBy, getRevision |
| Methods inherited from class com.android.sdklib.internal.repository.packages.Package |
|---|
compareTo, comparisonKey, getArchives, getDescription, getDescUrl, getLicense, getParentSource, getReleaseNote, getReleaseNoteUrl, hasArchive, hasCompatibleArchive, initializeArchives, isLocal, isObsolete, postUnzipFileHook, preInstallHook, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INSTALL_ID
installId().
| Constructor Detail |
|---|
public ToolPackage(SdkSource source,
org.w3c.dom.Node packageNode,
java.lang.String nsUri,
java.util.Map<java.lang.String,java.lang.String> licenses)
source - The SdkSource where this is loaded from.packageNode - The XML element being parsed.nsUri - The namespace URI of the originating XML document, to be able to deal with
parameters that vary according to the originating XML schema.licenses - The licenses loaded from the XML originating document.
protected ToolPackage(SdkSource source,
java.util.Properties props,
int revision,
java.lang.String license,
java.lang.String description,
java.lang.String descUrl,
Archive.Os archiveOs,
Archive.Arch archiveArch,
java.lang.String archiveOsPath)
| Method Detail |
|---|
public static Package create(SdkSource source,
java.util.Properties props,
int revision,
java.lang.String license,
java.lang.String description,
java.lang.String descUrl,
Archive.Os archiveOs,
Archive.Arch archiveArch,
java.lang.String archiveOsPath)
public FullRevision getMinPlatformToolsRevision()
IMinPlatformToolsDependencyIMinPlatformToolsDependency.MIN_PLATFORM_TOOLS_REV_INVALID if the value was missing.
This attribute is mandatory and should not be normally missing.
It can only happen when dealing with an invalid repository XML.
getMinPlatformToolsRevision in interface IMinPlatformToolsDependencypublic java.lang.String installId()
'android list sdk' will show these IDs and then in turn they can
be provided to 'android update sdk --no-ui --filter' to select
some specific packages.
The identifiers must have the following properties: Package.comparisonKey()
and the Comparable interface.
installId in class Packagepublic java.lang.String getListDescription()
Package.getShortDescription() should be used if you want more details
such as the package revision number or the API, if applicable.
getListDescription in class Packagepublic java.lang.String getShortDescription()
IDescription.
getShortDescription in interface IDescriptiongetShortDescription in class Packagepublic java.lang.String getLongDescription()
IDescription.
getLongDescription in interface IDescriptiongetLongDescription in class Package
public java.io.File getInstallFolder(java.lang.String osSdkRoot,
SdkManager sdkManager)
getInstallFolder in class PackageosSdkRoot - The OS path of the SDK root folder.sdkManager - An existing SDK manager to list current platforms and addons.
File corresponding to the directory to use to install this package.public boolean sameItemAs(Package pkg)
sameItemAs in class Packagepkg - the package to compare.
public boolean sameItemAs(Package pkg,
FullRevision.PreviewComparison comparePreview)
IFullRevisionProvider
sameItemAs in interface IFullRevisionProviderpkg - The package to comparecomparePreview - How to compare previews.
public void saveProperties(java.util.Properties props)
PackageProperties object.
These properties will later be give the constructor that takes a Properties object.
saveProperties in class FullRevisionPackage
public void postInstallHook(Archive archive,
ITaskMonitor monitor,
java.io.File installFolder)
postInstallHook in class Packagearchive - The archive that has been installed.monitor - The ITaskMonitor to display errors.installFolder - The folder where the archive was successfully installed.
Null if the installation failed, in case the archive needs to
do some cleanup after preInstallHook.public int hashCode()
hashCode in class FullRevisionPackagepublic boolean equals(java.lang.Object obj)
equals in class FullRevisionPackage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||