|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.pkg.PackageManager
public class PackageManager
Constructor Summary | |
---|---|
PackageManager()
|
Method Summary | |
---|---|
void |
add(PackageInfo info)
Adds a package. |
PackageInfo[] |
getConflicts(PackageInfo info)
|
java.lang.String |
getDefaultSources()
Returns a list of urls. |
PackageInfo[] |
getDependencies(PackageInfo info)
|
PackageInfo |
getPackage(java.lang.String packageName)
Returns a package by name. |
int |
getPackageCount()
Returns the number of packages. |
PackageInfo[] |
getProviders(java.lang.String packageName)
Returns an array of packages that provide packageName. |
void |
markAllUnavailable()
Marks all packages that are not installed as unavailable. |
java.util.Iterator |
packages()
Returns an iterator over all PackageInfo objects. |
void |
read(java.io.File file)
|
void |
read(java.io.File file,
java.util.Properties table)
Reads package information from a control file. |
void |
read(java.io.InputStream inStream,
java.util.Properties flags)
Reads package information from a stream. |
void |
read(java.lang.String location,
java.util.Properties table)
Reads package information from a url. |
void |
remove(PackageInfo info)
|
void |
removeUnavailable()
Removes all packages that are marked as unavailable. |
java.util.SortedSet |
tailSet(java.lang.String packageName)
|
void |
write(java.io.File file,
java.util.Properties flags)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PackageManager()
Method Detail |
---|
public void add(PackageInfo info)
public PackageInfo[] getConflicts(PackageInfo info) throws ParseException
ParseException
public java.lang.String getDefaultSources()
public PackageInfo[] getDependencies(PackageInfo info) throws ParseException, UnsatisfiedDependenciesException
ParseException
- thrown, if package file is invalid
UnsatisfiedDependenciesException
- thrown, if
dependencies are not satisfiedpublic void markAllUnavailable()
public void read(java.io.File file, java.util.Properties table) throws java.io.IOException
file
- the control file
java.io.IOException
public void read(java.io.File file) throws java.io.IOException
java.io.IOException
public void read(java.lang.String location, java.util.Properties table) throws java.io.IOException
location
- the package file urldownloadUrl
- the base location of the package files
java.io.IOException
public void read(java.io.InputStream inStream, java.util.Properties flags) throws java.io.IOException
inStream
- the streamflags
- additional flags that are added to the PackageInfo
record; if null, flags are ignored
java.io.IOException
public void remove(PackageInfo info)
public void removeUnavailable()
public java.util.Iterator packages()
PackageInfo
objects.
public int getPackageCount()
public PackageInfo getPackage(java.lang.String packageName)
public java.util.SortedSet tailSet(java.lang.String packageName)
public PackageInfo[] getProviders(java.lang.String packageName)
public void write(java.io.File file, java.util.Properties flags) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |