|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.updater.SdkUpdaterLogic
public class SdkUpdaterLogic
The logic to compute which packages to install, based on the choices made by the user. This adds required packages as needed.
When the user doesn't provide a selection, looks at local package to find those that can be updated and compute dependencies too.
| Constructor Summary | |
|---|---|
SdkUpdaterLogic(IUpdaterData updaterData)
|
|
| Method Summary | |
|---|---|
void |
addNewPlatforms(java.util.Collection<ArchiveInfo> archives,
SdkSources sources,
Package[] localPkgs,
boolean includeAll)
Finds new packages that the user does not have in his/her local SDK and adds them to the list of archives to install. |
java.util.List<ArchiveInfo> |
computeUpdates(java.util.Collection<Archive> selectedArchives,
SdkSources sources,
Package[] localPkgs,
boolean includeAll)
Compute which packages to install by taking the user selection and adding required packages as needed. |
ArchiveInfo[] |
createLocalArchives(Package[] localPkgs)
Create a array of ArchiveInfo based on all local (already installed)
packages. |
protected void |
fetchRemotePackages(java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources)
Fetch all remote packages only if really needed. |
ArchiveInfo |
findExactApiLevelDependency(IExactApiLevelDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
Resolves platform dependencies for add-ons. |
protected ArchiveInfo |
findMinApiLevelDependency(IMinApiLevelDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
Resolves platform dependencies for extras. |
ArchiveInfo |
findPlatformDependency(IPlatformDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
Resolves dependencies on platform for an addon. |
ArchiveInfo |
findPlatformToolsDependency(IMinPlatformToolsDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
Resolves dependencies on platform-tools. |
ArchiveInfo |
findToolsDependency(IMinToolsDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
Resolves dependencies on tools. |
java.util.List<ArchiveInfo> |
getAllRemoteArchives(SdkSources sources,
Package[] localPkgs,
boolean includeAll)
Retrieves an unfiltered list of all remote archives. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SdkUpdaterLogic(IUpdaterData updaterData)
| Method Detail |
|---|
public java.util.List<ArchiveInfo> getAllRemoteArchives(SdkSources sources,
Package[] localPkgs,
boolean includeAll)
public java.util.List<ArchiveInfo> computeUpdates(java.util.Collection<Archive> selectedArchives,
SdkSources sources,
Package[] localPkgs,
boolean includeAll)
public void addNewPlatforms(java.util.Collection<ArchiveInfo> archives,
SdkSources sources,
Package[] localPkgs,
boolean includeAll)
archives - The in-out list of archives to install. Typically the
list is not empty at first as it should contain any archives that is
already scheduled for install. This method will add to the list.sources - The list of all sources, to fetch them as necessary.localPkgs - The list of all currently installed packages.includeAll - When true, this will list all platforms.
(included these lower than the highest installed one) as well as
all obsolete packages of these platforms.public ArchiveInfo[] createLocalArchives(Package[] localPkgs)
ArchiveInfo based on all local (already installed)
packages. The array is always non-null but may be empty.
The local ArchiveInfo are guaranteed to have one non-null archive
that you can retrieve using ArchiveReplacement.getNewArchive().
public ArchiveInfo findToolsDependency(IMinToolsDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
public ArchiveInfo findPlatformToolsDependency(IMinPlatformToolsDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
public ArchiveInfo findPlatformDependency(IPlatformDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
protected ArchiveInfo findMinApiLevelDependency(IMinApiLevelDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
public ArchiveInfo findExactApiLevelDependency(IExactApiLevelDependency pkg,
java.util.Collection<ArchiveInfo> outArchives,
java.util.Collection<Archive> selectedArchives,
java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives)
protected void fetchRemotePackages(java.util.Collection<Package> remotePkgs,
SdkSource[] remoteSources)
remotePkgs - An in-out list of packages available from remote sources.
This list must not be null.
It can be empty or already contain some packages.remoteSources - A list of available remote sources to fetch from.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||