XQuery Function Documentation

Search and Browse

http://exist-db.org/xquery/repo

java:org.exist.xquery.modules.expathrepo.ExpathPackageModule

A module for working with expath repository manager

repo:deploy

repo:deploy($pkgName as xs:string) as element()

Deploy an application package. Installs package contents to the specified target collection, using the permissions defined by the <permissions> element in repo.xml. Pre- and post-install XQuery scripts can be specified via the <prepare> and <finish> elements.

Parameters:
$pkgName package name
Returns:
element() : <status result="ok"/> if deployment was ok. Throws an error otherwise.

repo:deploy

repo:deploy($pkgName as xs:string, $targetCollection as xs:string) as element()

Deploy an application package. Installs package contents to the specified target collection, using the permissions defined by the &lt;permissions&gt; element in repo.xml. Pre- and post-install XQuery scripts can be specified via the &lt;prepare&gt; and &lt;finish&gt; elements.

Parameters:
$pkgName package name
$targetCollection the target collection into which the package will be stored
Returns:
element() : <status result="ok"/> if deployment was ok. Throws an error otherwise.

repo:get-resource

repo:get-resource($pkgName as xs:string, $resource as xs:string) as xs:base64Binary?

Retrieves the specified resource from an installed expath application package.

Parameters:
$pkgName package name
$resource resource path
Returns:
xs:base64Binary? : <status result="ok"/> if deployment was ok. Throws an error otherwise.

repo:get-root

repo:get-root() as xs:string

Returns the root collection into which applications are installed. Corresponds to the collection path defined in conf.xml (<repository root="..."/>) or /db if not configured.

Returns:
xs:string : The application root collection

repo:install

repo:install($pkgName as xs:string) as xs:boolean

Install package from repository.

Parameters:
$pkgName package name
Returns:
xs:boolean : true if successful, false otherwise

repo:install-and-deploy

repo:install-and-deploy($pkgName as xs:string, $publicRepoURL as xs:string) as element()

Downloads, installs and deploys a package from the public repository at $publicRepoURL. Dependencies are resolved automatically. For downloading the package, the package name is appended to the repository URL as parameter 'name'.

Parameters:
$pkgName Unique name of the package to install.
$publicRepoURL The URL of the public repo.
Returns:
element() : <status result="ok"/> if deployment was ok. Throws an error otherwise.

repo:install-and-deploy

repo:install-and-deploy($pkgName as xs:string, $version as xs:string?, $publicRepoURL as xs:string) as element()

Downloads, installs and deploys a package from the public repository at $publicRepoURL. Dependencies are resolved automatically. For downloading the package, the package name and version are appended to the repository URL as parameters 'name' and 'version'.

Parameters:
$pkgName Unique name of the package to install.
$version? Version to install.
$publicRepoURL The URL of the public repo.
Returns:
element() : <status result="ok"/> if deployment was ok. Throws an error otherwise.

repo:install-and-deploy-from-db

repo:install-and-deploy-from-db($path as xs:string) as element()

Installs and deploys a package from a .xar archive file stored in the database. Dependencies are not resolved and will just be ignored.

Parameters:
$path Database path to the package archive (.xar file)
Returns:
element() : <status result="ok"/> if deployment was ok. Throws an error otherwise.

repo:install-and-deploy-from-db

repo:install-and-deploy-from-db($path as xs:string, $publicRepoURL as xs:string) as element()

Installs and deploys a package from a .xar archive file stored in the database. Dependencies will be downloaded from the public repo and installed automatically.

Parameters:
$path Database path to the package archive (.xar file)
$publicRepoURL The URL of the public repo.
Returns:
element() : <status result="ok"/> if deployment was ok. Throws an error otherwise.

repo:install-from-db

repo:install-from-db($path as xs:string) as xs:boolean

Install package stored in database.

Parameters:
$path database path to the package archive (.xar file)
Returns:
xs:boolean : true if successful, false otherwise

repo:list

repo:list() as xs:string*

List repository packages.

Returns:
xs:string* : sequence of strings

repo:remove

repo:remove($pkgName as xs:string) as xs:boolean

Remove package, pkgName, from repository.

Parameters:
$pkgName package name
Returns:
xs:boolean : true if successful, false otherwise

repo:undeploy

repo:undeploy($pkgName as xs:string) as element()

Uninstall the resources belonging to a package from the db. Calls cleanup scripts if defined.

Parameters:
$pkgName package name
Returns:
element() : <status result="ok"/> if deployment was ok. Throws an error otherwise.