org.xnap.pkg
Class XNapPackageManager

java.lang.Object
  extended by org.xnap.pkg.PackageManager
      extended by org.xnap.pkg.XNapPackageManager

public class XNapPackageManager
extends PackageManager


Field Summary
static java.lang.String AVAILABLE_FILENAME
           
static java.lang.String SOURCES_FILENAME
           
static java.lang.String STATUS_FILENAME
           
 
Method Summary
 PackageInfo createFakePackage(java.io.File file)
           
 void discover()
          Adds installed packages and saves the list of packages to AVAILABLE_FILENAME.
 void discover(java.io.File path)
          Adds all packages found in path and recursively in all sub directories.
 java.lang.String getDefaultSources()
          Returns a list of urls.
 java.lang.String getDefaultSources(boolean includeUnstable)
           
static XNapPackageManager getInstance()
           
 void initialize()
           
 void update(ProgressMonitor monitor)
          Updates the list of packages from the urls specified in SOURCES_FILENAME.
 void write()
          Saves the list of packages.
 
Methods inherited from class org.xnap.pkg.PackageManager
add, getConflicts, getDependencies, getPackage, getPackageCount, getProviders, markAllUnavailable, packages, read, read, read, read, remove, removeUnavailable, tailSet, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AVAILABLE_FILENAME

public static final java.lang.String AVAILABLE_FILENAME

SOURCES_FILENAME

public static final java.lang.String SOURCES_FILENAME

STATUS_FILENAME

public static final java.lang.String STATUS_FILENAME
Method Detail

getInstance

public static XNapPackageManager getInstance()

createFakePackage

public PackageInfo createFakePackage(java.io.File file)

discover

public void discover()
Adds installed packages and saves the list of packages to AVAILABLE_FILENAME.


discover

public void discover(java.io.File path)
Adds all packages found in path and recursively in all sub directories.


getDefaultSources

public java.lang.String getDefaultSources(boolean includeUnstable)

getDefaultSources

public java.lang.String getDefaultSources()
Description copied from class: PackageManager
Returns a list of urls.

Overrides:
getDefaultSources in class PackageManager
Returns:
the empty string

initialize

public void initialize()

update

public void update(ProgressMonitor monitor)
Updates the list of packages from the urls specified in SOURCES_FILENAME.

This method runs asynchronus. Make sure the package manager is not modified until monitor.done() is invoked.


write

public void write()
Saves the list of packages.



Copyright © 2001-2005 XNap Team. All Rights Reserved.