|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.commons.pkg.PackageManager
public class PackageManager
Constructor Summary | |
---|---|
PackageManager()
|
Method Summary | |
---|---|
void |
add(PackageInfo info)
Adds a package. |
PackageInfo[] |
getConflicts(PackageInfo info)
|
String |
getDefaultSources()
Returns a list of urls. |
PackageInfo[] |
getDependencies(PackageInfo info)
|
PackageInfo |
getPackage(String packageName)
Returns a package by name. |
int |
getPackageCount()
Returns the number of packages. |
PackageInfo[] |
getProviders(String packageName)
Returns an array of packages that provide packageName. |
void |
markAllUnavailable()
Marks all packages that are not installed as unavailable. |
Iterator |
packages()
Returns an iterator over all PackageInfo objects. |
void |
read(File file)
|
void |
read(File file,
Properties table)
Reads package information from a control file. |
void |
read(InputStream inStream,
Properties flags)
Reads package information from a stream. |
void |
read(String location,
Properties table)
Reads package information from a url. |
void |
remove(PackageInfo info)
|
void |
removeUnavailable()
Removes all packages that are marked as unavailable. |
SortedSet |
tailSet(String packageName)
|
void |
write(File file,
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 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(File file, Properties table) throws IOException
file
- the control file
IOException
public void read(File file) throws IOException
IOException
public void read(String location, Properties table) throws IOException
location
- the package file urldownloadUrl
- the base location of the package files
IOException
public void read(InputStream inStream, Properties flags) throws IOException
inStream
- the streamflags
- additional flags that are added to the PackageInfo
record; if null, flags are ignored
IOException
public void remove(PackageInfo info)
public void removeUnavailable()
public Iterator packages()
PackageInfo
objects.
public int getPackageCount()
public PackageInfo getPackage(String packageName)
public SortedSet tailSet(String packageName)
public PackageInfo[] getProviders(String packageName)
public void write(File file, Properties flags) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |