|
|||||||||
| 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.MajorRevisionPackage
com.android.sdklib.internal.repository.packages.MinToolsPackage
com.android.sdklib.internal.repository.packages.ExtraPackage
public class ExtraPackage
Represents a extra 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 |
|---|
| Fields inherited from interface com.android.sdklib.internal.repository.packages.IMinApiLevelDependency |
|---|
MIN_API_LEVEL_NOT_SPECIFIED |
| Fields inherited from interface com.android.sdklib.internal.repository.packages.IMinToolsDependency |
|---|
MIN_TOOLS_REV_NOT_SPECIFIED |
| Constructor Summary | |
|---|---|
|
ExtraPackage(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 |
ExtraPackage(SdkSource source,
java.util.Properties props,
java.lang.String vendorId,
java.lang.String path,
int revision,
java.lang.String license,
java.lang.String description,
java.lang.String descUrl,
Archive.Os archiveOs,
Archive.Arch archiveArch,
java.lang.String archiveOsPath)
Constructor used to create a mock ExtraPackage. |
| Method Summary | |
|---|---|
protected java.lang.String |
comparisonKey()
For extra packages, we want to add vendor|path to the sorting key before the revision number. |
static Package |
create(SdkSource source,
java.util.Properties props,
java.lang.String vendor,
java.lang.String path,
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.lang.String |
getDisplayName()
|
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. |
int |
getMinApiLevel()
Returns the minimal API level required by this extra package, if > 0, or IMinApiLevelDependency.MIN_API_LEVEL_NOT_SPECIFIED if there is no such requirement. |
java.lang.String[] |
getOldPaths()
Returns the old_paths, a list of obsolete path names for the extra package. |
java.lang.String |
getPath()
Returns the sanitized path folder name. |
java.lang.String[] |
getProjectFiles()
The project-files listed by this extra package. |
java.lang.String |
getShortDescription()
Returns a short description for an IDescription. |
java.lang.String |
getVendorDisplay()
|
java.lang.String |
getVendorId()
Returns the vendor id. |
int |
hashCode()
|
java.lang.String |
installId()
Returns a string identifier to install this package from the command line. |
boolean |
sameItemAs(Package pkg)
Returns whether the give 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.MinToolsPackage |
|---|
getMinToolsRevision |
| Methods inherited from class com.android.sdklib.internal.repository.packages.MajorRevisionPackage |
|---|
canBeUpdatedBy, getRevision |
| Methods inherited from class com.android.sdklib.internal.repository.packages.Package |
|---|
compareTo, getArchives, getDescription, getDescUrl, getLicense, getParentSource, getReleaseNote, getReleaseNoteUrl, hasArchive, hasCompatibleArchive, initializeArchives, isLocal, isObsolete, postInstallHook, postUnzipFileHook, preInstallHook, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExtraPackage(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 ExtraPackage(SdkSource source,
java.util.Properties props,
java.lang.String vendorId,
java.lang.String path,
int revision,
java.lang.String license,
java.lang.String description,
java.lang.String descUrl,
Archive.Os archiveOs,
Archive.Arch archiveArch,
java.lang.String archiveOsPath)
ExtraPackage.
Most of the attributes here are optional.
When not defined, they will be extracted from the props properties.
| Method Detail |
|---|
public static Package create(SdkSource source,
java.util.Properties props,
java.lang.String vendor,
java.lang.String path,
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 void saveProperties(java.util.Properties props)
Properties object.
These properties will later be give the constructor that takes a Properties object.
saveProperties in class MinToolsPackagepublic int getMinApiLevel()
IMinApiLevelDependency.MIN_API_LEVEL_NOT_SPECIFIED if there is no such requirement.
getMinApiLevel in interface IMinApiLevelDependencypublic java.lang.String[] getProjectFiles()
File.separatorChar of the current platform. It's up to the
user to adequately interpret the paths.
Similarly, no guarantee is made on the validity of the paths.
Users are expected to apply all usual sanity checks such as removing
"./" and "../" and making sure these paths don't reference files outside
of the installed archive.
public java.lang.String[] getOldPaths()
public java.lang.String getPath()
public java.lang.String getVendorId()
public java.lang.String getVendorDisplay()
public java.lang.String getDisplayName()
public 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.
The long description is whatever the XML contains for the <description> field,
or the short description if the former is empty.
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. Must NOT be null.sdkManager - An existing SDK manager to list current platforms and addons.
Not used in this implementation.
File corresponding to the directory to use to install this package.public boolean sameItemAs(Package pkg)
Package
sameItemAs in class Packagepkg - the package to compare.
protected java.lang.String comparisonKey()
Package.compareTo(Package).
The key is a string.
The base package class return a string that encodes the package type,
the revision number and the platform version, if applicable, in the form:
t:N|v:NNNN.P|r:NNNN|
All fields must start by a "letter colon" prefix and end with a vertical pipe (|, ASCII 124).
The string format may change between releases and clients should not
store them outside of the session or expect them to be consistent between
different releases. They are purely an internal implementation details of the
Package.compareTo(Package) method.
Derived classes should get the string from the super class and then append
or insert their own |-separated content.
For example an extra vendor name & path can be inserted before the revision
number, since it has more sorting weight.
comparisonKey in class Packagepublic int hashCode()
hashCode in class MinToolsPackagepublic boolean equals(java.lang.Object obj)
equals in class MinToolsPackage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||