|
|||||||||
| 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,
java.util.Map<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.Collection<? extends LocalPackage> |
getLocalPackagesForPrefix(java.lang.String pathPrefix)
|
java.util.Set<RemotePackage> |
getNewPkgs()
Returns the set of new remote packages that are not locally present and that the user could install. |
java.util.Map<java.lang.String,RemotePackage> |
getRemotePackages()
Returns a Map 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(java.util.Map<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
java.util.Map<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 java.util.Map<java.lang.String,RemotePackage> getRemotePackages()
Map from path (the unique ID of a package) to
RemotePackage.
@NonNull
public java.util.Collection<? extends LocalPackage> getLocalPackagesForPrefix(@Nullable
java.lang.String pathPrefix)
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
java.util.Map<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 | ||||||||