org.basex.query.util.pkg
Class RepoManager

java.lang.Object
  extended by org.basex.query.util.pkg.RepoManager

public final class RepoManager
extends java.lang.Object

Repository manager.

Author:
BaseX Team 2005-12, BSD License, Rositsa Shadura

Constructor Summary
RepoManager(Context ctx)
          Constructor.
RepoManager(Context ctx, InputInfo ii)
          Constructor.
 
Method Summary
 void delete(java.lang.String pkg)
          Removes a package from the package repository.
static IOFile file(java.lang.String name, Repo repo)
          Looks for a file with the specified name.
 boolean install(java.lang.String path)
          Installs a package.
 StringList list()
          Returns a list of all packages.
 Table table()
          Returns all installed packages in a table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepoManager

public RepoManager(Context ctx)
Constructor.

Parameters:
ctx - database context

RepoManager

public RepoManager(Context ctx,
                   InputInfo ii)
Constructor.

Parameters:
ctx - database context
ii - input info
Method Detail

install

public boolean install(java.lang.String path)
                throws QueryException
Installs a package.

Parameters:
path - package path
Returns:
true if package was replaced
Throws:
QueryException - query exception

table

public Table table()
Returns all installed packages in a table.

Returns:
table

list

public StringList list()
Returns a list of all packages.

Returns:
packages

delete

public void delete(java.lang.String pkg)
            throws QueryException
Removes a package from the package repository.

Parameters:
pkg - package
Throws:
QueryException - query exception

file

public static IOFile file(java.lang.String name,
                          Repo repo)
Looks for a file with the specified name.

Parameters:
name - name
repo - repository
Returns:
file, or null