public final class RepositoryPackages
extends java.lang.Object
| Constructor and Description |
|---|
RepositoryPackages() |
RepositoryPackages(java.util.List<LocalPackage> localPkgs,
java.util.List<RemotePackage> remotePkgs) |
| Modifier and Type | Method and Description |
|---|---|
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,LocalPackage> |
getLocalPackages()
Returns a map of
path (the unique ID of a package) to LocalPackage, for all
packages currently installed. |
java.util.Collection<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()
|
java.util.Collection<RemotePackage> |
getRemotePackagesForPrefix(java.lang.String pathPrefix) |
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.Collection<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.Collection<RemotePackage> packages)
Sets the collection of known
RemotePackages, and recomputes the list of updates and
new packages, if LocalPackages have been set. |
public RepositoryPackages()
public RepositoryPackages(@NonNull
java.util.List<LocalPackage> localPkgs,
@NonNull
java.util.List<RemotePackage> remotePkgs)
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,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()
@NonNull public java.util.Collection<LocalPackage> getLocalPackagesForPrefix(@Nullable java.lang.String pathPrefix)
@NonNull public java.util.Collection<RemotePackage> getRemotePackagesForPrefix(@Nullable java.lang.String pathPrefix)
public void setLocalPkgInfos(@NonNull
java.util.Collection<LocalPackage> packages)
LocalPackages, and recomputes the list of updates and
new packages, if RemotePackages have been set.public void setRemotePkgInfos(@NonNull
java.util.Collection<RemotePackage> packages)
RemotePackages, and recomputes the list of updates and
new packages, if LocalPackages have been set.