public abstract class Package extends Object implements Cloneable, Serializable
| Constructor and Description |
|---|
Package() |
| Modifier and Type | Method and Description |
|---|---|
abstract Object |
clone() |
boolean |
equals(Package toCompare)
Compare the supplied package to this package.
|
abstract List<Dependency> |
getBaseSystemDependency()
Gets the dependency on the base system that this package requires.
|
abstract List<Dependency> |
getDependencies()
Get the list of packages that this package depends on.
|
abstract List<Dependency> |
getIncompatibleDependencies()
Gets a list of installed packages that this package depends on that are
currently incompatible with this package.
|
abstract List<Dependency> |
getIncompatibleDependencies(List<Package> packages)
Gets those packages from the supplied list that this package depends on and
are currently incompatible with this package.
|
abstract List<Dependency> |
getMissingDependencies()
Gets a list of packages that this package depends on that are not currently
installed.
|
abstract List<Dependency> |
getMissingDependencies(List<Package> packages)
Gets a list of packages that this package depends on that are not in the
supplied list of packages.
|
abstract String |
getName()
Convenience method to return the name of this package.
|
Map<?,?> |
getPackageMetaData()
Get the meta data for this package.
|
Object |
getPackageMetaDataElement(Object key)
Gets the package meta data element associated with the supplied key.
|
abstract URL |
getPackageURL()
Convenience method that returns the URL to the package (i.e the provider's
URL).
|
abstract void |
install()
Install this package.
|
abstract boolean |
isCompatibleBaseSystem()
Returns true if this package is compatible with the currently installed
version of the base system.
|
abstract boolean |
isInstalled()
Returns true if this package is already installed
|
void |
setPackageMetaData(Map<?,?> metaData)
Set the meta data for this package.
|
abstract void |
setPackageMetaDataElement(Object key,
Object value)
Adds a key, value pair to the meta data map.
|
public void setPackageMetaData(Map<?,?> metaData)
metaData - the meta data for this package.public Map<?,?> getPackageMetaData()
public abstract String getName()
public abstract URL getPackageURL() throws Exception
Exception - if the URL can't be retrieved for some reasonpublic boolean equals(Package toCompare)
toCompare - the package to compare against.public abstract List<Dependency> getDependencies() throws Exception
Exception - if a problem occurs while getting the list of
dependencies.public abstract boolean isInstalled()
public abstract void install()
throws Exception
Exception - if something goes wrong during installation.public abstract boolean isCompatibleBaseSystem()
throws Exception
Exception - if a problem occurs while checking compatibility.public abstract List<Dependency> getBaseSystemDependency() throws Exception
Exception - if the base system dependency can't be determined for
some reason.public abstract List<Dependency> getMissingDependencies() throws Exception
Exceptionpublic abstract List<Dependency> getMissingDependencies(List<Package> packages) throws Exception
packages - a list of packages to compare this package's dependencies
against.Exception - if the list of missing depenencies can't be determined
for some reason.public abstract List<Dependency> getIncompatibleDependencies() throws Exception
Exceptionpublic abstract List<Dependency> getIncompatibleDependencies(List<Package> packages) throws Exception
packages - a list of packages to compare this package's dependencies
againstException - if the list of incompatible dependencies can't be
generated for some reason.public Object getPackageMetaDataElement(Object key)
key - the key to use to look up a value in the meta datapublic abstract void setPackageMetaDataElement(Object key, Object value) throws Exception
key - the keyvalue - the value to addException - if there is no meta data map to add to.Copyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.