|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.repository.impl.meta.RepositoryPackages
public final class RepositoryPackages
Store of currently-known local and remote packages, in convenient forms. TODO: some of the functionality of this class may no longer be needed. Reevaluate once adoption has progressed further.
| Constructor Summary | |
|---|---|
RepositoryPackages()
|
|
RepositoryPackages(java.util.Map<java.lang.String,LocalPackage> localPkgs,
com.google.common.collect.Multimap<java.lang.String,RemotePackage> remotePkgs)
|
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,UpdatablePackage> |
getConsolidatedPkgs()
Returns a map of package install ids to UpdatablePackages representing all known
local and remote packages. |
java.util.Map<java.lang.String,? extends LocalPackage> |
getLocalPackages()
Returns a map of path (the unique ID of a package) to LocalPackage, for all
packages currently installed. |
java.util.Set<RemotePackage> |
getNewPkgs()
Returns the set of new remote packages that are not locally present and that the user could install. |
com.google.common.collect.Multimap<java.lang.String,RemotePackage> |
getRemotePackages()
Returns a Multimap from path (the unique ID of a package) to RemotePackage. |
long |
getTimestampMs()
Returns the timestamp (in System.currentTimeMillis() time) when this object was
created. |
java.util.Set<UpdatablePackage> |
getUpdatedPkgs()
Returns the set of packages that have local updates available. |
void |
setLocalPkgInfos(java.util.Map<java.lang.String,? extends LocalPackage> packages)
Sets the collection of known LocalPackages, and recomputes the list of updates and
new packages, if RemotePackages have been set. |
void |
setRemotePkgInfos(com.google.common.collect.Multimap<java.lang.String,RemotePackage> packages)
Sets the collection of known RemotePackages, and recomputes the list of updates and
new packages, if LocalPackages have been set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryPackages()
public RepositoryPackages(@NonNull
java.util.Map<java.lang.String,LocalPackage> localPkgs,
@NonNull
com.google.common.collect.Multimap<java.lang.String,RemotePackage> remotePkgs)
| Method Detail |
|---|
public long getTimestampMs()
System.currentTimeMillis() time) when this object was
created.
@NonNull public java.util.Set<UpdatablePackage> getUpdatedPkgs()
@NonNull public java.util.Set<RemotePackage> getNewPkgs()
@NonNull public java.util.Map<java.lang.String,UpdatablePackage> getConsolidatedPkgs()
UpdatablePackages representing all known
local and remote packages. Remote packages corresponding to local packages will be
represented by a single item containing both the local and remote info. IPkgDesc#getInstallId()
@NonNull public java.util.Map<java.lang.String,? extends LocalPackage> getLocalPackages()
path (the unique ID of a package) to LocalPackage, for all
packages currently installed.
@NonNull public com.google.common.collect.Multimap<java.lang.String,RemotePackage> getRemotePackages()
Multimap from path (the unique ID of a package) to RemotePackage. There may be more than one version of the same RemotePackage
available, for example if there is a stable and a preview version available.
public void setLocalPkgInfos(@NonNull
java.util.Map<java.lang.String,? extends LocalPackage> packages)
LocalPackages, and recomputes the list of updates and
new packages, if RemotePackages have been set.
public void setRemotePkgInfos(@NonNull
com.google.common.collect.Multimap<java.lang.String,RemotePackage> packages)
RemotePackages, and recomputes the list of updates and
new packages, if LocalPackages have been set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||