Utility functions to find, install, upload and remove packages from the package repository.
apputil:get-resource($app as xs:string, $path as xs:string) as document-node()?
Retrieve an XML resource from the application package identified by the unique name given in the first parameter. The resource is parsed an returned as an XML document node.
$app | the unique name of the application |
$path | $path |
apputil:install-from-repo($name as xs:string?, $package-path as xs:anyURI?, $serverUri as xs:anyURI) as item()*
$name? | $name? |
$package-path? | $package-path? |
$serverUri | $serverUri |
apputil:install-from-repo($name as xs:string?, $package-path as xs:anyURI?, $serverUri as xs:anyURI, $version as xs:string?) as item()*
Install a package from the public repository. The package is either specified by its unique name in the first parameter or its file name, e.g. "dashboard-0.1.xar".
$name? | unique name of the package to install (optional) |
$package-path? | the file name of the package to install (optional) |
$serverUri | the URI of the public-repo app on the server |
$version? | $version? |
apputil:is-installed($pkgURI as xs:anyURI, $version as xs:string?) as element()?
Check if the application identified by the given unique name is installed. Returns the package descriptor of the application if found or the empty sequence otherwise.
$pkgURI | unique name of the application |
$version? | $version? |
apputil:link-to-app($uri as xs:string, $relLink as xs:string?) as xs:string
Locates the package identified by $uri and returns a path which can be used to link
to this package from within the HTML view of another package.
$uri the unique name of the package to locate
$relLink a relative path to be added to the returned path
$uri | $uri |
$relLink? | $relLink? |
apputil:remove($package-url as xs:string) as xs:boolean
Remove the package identified by its unique name.
$package-url | $package-url |
apputil:resolve($uri as xs:string) as xs:string?
Try to find an application by its unique name and return the relative path to which it has been deployed inside the database.
$uri | $uri |
apputil:resolve-abbrev($abbrev as xs:string) as xs:string?
Try to find an application by its abbreviated name and return the relative path to which it has been deployed inside the database.
$abbrev | $abbrev |
apputil:scan-repo($callback as function(*)) as item()*
Scan all installed application and library packages. Calls the provided callback function once for every package, passing the package URI as first parameter, the expath pkg descriptor XML as second, and the repo.xml descriptor as third.
$callback | the callback function to call for every package found |
apputil:upload($serverUri as xs:anyURI) as xs:string
$serverUri | $serverUri |